Skip to content

MarcosLeonardoMendezGerencir/hb-glfw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

hb-glfw is a Harbour module providing bindings for the GLFW library. It provides a simple API for creating windows, contexts and surfaces, receiving input and events.

Getting Started

Installing hb-glfw requires GLFW including its headers. For more info see getting started.

Example code

#include "hbglfw.ch"

FUNCTION Main()

   LOCAL window

   IF ! glfwInit()
      RETURN - 1
   ENDIF

   window := glfwCreateWindow( 640, 480, "Hello World", NIL, NIL )

   IF window == NIL
      glfwTerminate()
      RETURN - 1
   ENDIF

   glfwMakeContextCurrent( window )

   DO WHILE ! glfwWindowShouldClose( window )

      glClear( GL_COLOR_BUFFER_BIT )

      glfwSwapBuffers( window )

      glfwPollEvents()

   ENDDO

   glfwTerminate()

   RETURN 0

License

License

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published