doc.txt 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. Generates the files:
  2. - glapi.c
  3. - functions to load the OpenGL pointers from dll/shared object
  4. glapiLoad()
  5. glapiVersion()
  6. glapiProc()
  7. ...
  8. - declarations of all the pointers which will be loaded as "static"
  9. - definitions of OpenGL functions which will be called by Go.
  10. These functions call the POINTERS loaded previously.
  11. Have the names of the original OpenGL functions declared in "glcorearb.h"
  12. void glCullFace(GLenum mode) {
  13. pglCullFace(mode);
  14. // Optional error check
  15. }
  16. - glapi.h
  17. - declarations of loader functions Only
  18. - glqueue.c
  19. - gl.go
  20. - Declaration of all OpenGL defines as constants
  21. - Go function which call the loader api:
  22. ApiLoad()
  23. ApiVersion()
  24. ...
  25. - Go functions which calls the respective OpenGL functions
  26. func CulFace(mode) {
  27. C.glCullFace(mode)
  28. }
  29. //void glDeleteTextures (GLsizei n, const GLuint *textures) {
  30. func DeleteTexturesQ(textures []uint) {
  31. p := ParamDeleteTextures{}
  32. p.textures = textures
  33. queue = append(queue, Func{C.glDeleteTextures, p})
  34. }