bbopengl_.monkey2 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. 'Note: This module actually has a depdndancy on SDL2, but we don't talk about that as it would create a circular dependancy.
  2. Namespace opengl
  3. #If __TARGET__="windows"
  4. #If __ARCH__="x86"
  5. #Import "../angle/bin/libEGL.dll"
  6. #Import "../angle/bin/libGLESv2.dll"
  7. #Import "../angle/bin/d3dcompiler_47.dll"
  8. #Elseif __ARCH__="x64"
  9. #Import "../angle/bin/x64/libEGL.dll"
  10. #Import "../angle/bin/x64/libGLESv2.dll"
  11. #Import "../angle/bin/x64/d3dcompiler_47.dll"
  12. #endif
  13. ' #include <GL/gl.h>
  14. #Import "bbopengl.c"
  15. #Import "bbopengl.h"
  16. #Else If __TARGET__="macos"
  17. #Import "<OpenGL.framework>"
  18. ' #include <OpenGL/gl.h>
  19. #Import "bbopengl.c"
  20. #Import "bbopengl.h"
  21. #Else If __TARGET__="linux"
  22. #Import "<libGL.a>"
  23. ' #define GL_GLEXT_PROTOTYPES
  24. ' #include <GL/gl.h>
  25. #Import "bbopengl.c"
  26. #Import "bbopengl.h"
  27. #Else If __TARGET__="raspbian"
  28. #Import "<libGLESv1_CM.a>"
  29. #Import "<libGLESv2.a>"
  30. #Import "<libEGL.a>"
  31. ' #Import "<GLES2/gl2.h>"
  32. #Import "bbopengl.c"
  33. #Import "bbopengl.h"
  34. #Else If __TARGET__="emscripten"
  35. ' #Import "<GLES2/gl2.h>"
  36. #Import "bbopengl.c"
  37. #Import "bbopengl.h"
  38. #Else If __TARGET__="android"
  39. #Import "<libGLESv1_CM.a>"
  40. #Import "<libGLESv2.a>"
  41. ' #Import "<GLES2/gl2.h>"
  42. #Import "bbopengl.c"
  43. #Import "bbopengl.h"
  44. #Else If __TARGET__="ios"
  45. #Import "<OpenGLES.framework>"
  46. ' #import "<OpenGLES/ES2/gl.h>"
  47. #Import "bbopengl.c"
  48. #Import "bbopengl.h"
  49. #Endif
  50. Extern
  51. Alias GLvoid:Void
  52. Alias GLenum:UInt
  53. Alias GLboolean:Bool
  54. Alias GLbitfield:UInt
  55. Alias GLbyte:Byte
  56. Alias GLshort:Short
  57. Alias GLint:Int
  58. Alias GLsizei:Int
  59. Alias GLubyte:UByte
  60. Alias GLushort:UShort
  61. Alias GLuint:UInt
  62. Alias GLfloat:Float
  63. Alias GLclampf:Float
  64. Alias GLdouble:Double
  65. Alias GLclampd:Double
  66. Alias GLfixed:Int
  67. Alias GLclampx:Int
  68. Alias GLintptr:Long
  69. Alias GLsizeiptr:Long
  70. Struct GLchar="GLchar"
  71. End
  72. Struct GLcchar="const GLchar"
  73. End
  74. Function bbglInit()
  75. Global BBGL_ES:Bool
  76. Global BBGL_draw_buffers:Bool
  77. Global BBGL_depth_texture:Bool
  78. Global BBGL_seamless_cube_map:Bool
  79. Global BBGL_texture_filter_anisotropic:Bool
  80. Global BBGL_standard_derivatives:Bool
  81. ${DEFS}
  82. ${DECLS}