opengl3 0.0.1.pre1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (158) hide show
  1. data/.gitignore +21 -0
  2. data/Gemfile +4 -0
  3. data/LICENSE.txt +22 -0
  4. data/README.md +87 -0
  5. data/Rakefile +17 -0
  6. data/examples/math3d.rb +65 -0
  7. data/examples/ogl-2_1-basic.rb +107 -0
  8. data/examples/ogl-3_2-basic.rb +128 -0
  9. data/examples/ogl-3_2-cube.rb +203 -0
  10. data/examples/ogl-4_0-quad_tessellation.rb +283 -0
  11. data/examples/ogl-4_0-triangle_tessellation.rb +262 -0
  12. data/lib/glut.rb +125 -0
  13. data/lib/opengl.rb +7 -0
  14. data/lib/opengl/constants.rb +15 -0
  15. data/lib/opengl/constants/core/2_x/GL_VERSION_1_1.yml +230 -0
  16. data/lib/opengl/constants/core/2_x/GL_VERSION_1_2.yml +36 -0
  17. data/lib/opengl/constants/core/2_x/GL_VERSION_1_3.yml +59 -0
  18. data/lib/opengl/constants/core/2_x/GL_VERSION_1_4.yml +16 -0
  19. data/lib/opengl/constants/core/2_x/GL_VERSION_1_5.yml +28 -0
  20. data/lib/opengl/constants/core/2_x/GL_VERSION_2_0.yml +80 -0
  21. data/lib/opengl/constants/core/2_x/GL_VERSION_2_1.yml +16 -0
  22. data/lib/opengl/constants/core/3_0/GL_ARB_depth_buffer_float.yml +3 -0
  23. data/lib/opengl/constants/core/3_0/GL_ARB_framebuffer_object.yml +77 -0
  24. data/lib/opengl/constants/core/3_0/GL_ARB_framebuffer_sRGB.yml +1 -0
  25. data/lib/opengl/constants/core/3_0/GL_ARB_half_float_vertex.yml +1 -0
  26. data/lib/opengl/constants/core/3_0/GL_ARB_map_buffer_range.yml +6 -0
  27. data/lib/opengl/constants/core/3_0/GL_ARB_texture_compression_rgtc.yml +4 -0
  28. data/lib/opengl/constants/core/3_0/GL_ARB_texture_rg.yml +22 -0
  29. data/lib/opengl/constants/core/3_0/GL_ARB_vertex_array_object.yml +1 -0
  30. data/lib/opengl/constants/core/3_0/GL_VERSION_3_0.yml +224 -0
  31. data/lib/opengl/constants/core/3_1/GL_ARB_copy_buffer.yml +4 -0
  32. data/lib/opengl/constants/core/3_1/GL_ARB_uniform_buffer_object.yml +33 -0
  33. data/lib/opengl/constants/core/3_1/GL_VERSION_3_1.yml +65 -0
  34. data/lib/opengl/constants/core/3_2/GL_ARB_depth_clamp.yml +1 -0
  35. data/lib/opengl/constants/core/3_2/GL_ARB_provoking_vertex.yml +4 -0
  36. data/lib/opengl/constants/core/3_2/GL_ARB_seamless_cube_map.yml +1 -0
  37. data/lib/opengl/constants/core/3_2/GL_ARB_sync.yml +15 -0
  38. data/lib/opengl/constants/core/3_2/GL_ARB_texture_multisample.yml +21 -0
  39. data/lib/opengl/constants/core/3_2/GL_VERSION_3_2.yml +76 -0
  40. data/lib/opengl/constants/core/3_3/GL_ARB_blend_func_extended.yml +5 -0
  41. data/lib/opengl/constants/core/3_3/GL_ARB_occlusion_query2.yml +1 -0
  42. data/lib/opengl/constants/core/3_3/GL_ARB_sampler_objects.yml +1 -0
  43. data/lib/opengl/constants/core/3_3/GL_ARB_texture_rgb10_a2ui.yml +1 -0
  44. data/lib/opengl/constants/core/3_3/GL_ARB_texture_swizzle.yml +5 -0
  45. data/lib/opengl/constants/core/3_3/GL_ARB_timer_query.yml +2 -0
  46. data/lib/opengl/constants/core/3_3/GL_ARB_vertex_type_2_10_10_10_rev.yml +2 -0
  47. data/lib/opengl/constants/core/3_3/GL_VERSION_3_3.yml +25 -0
  48. data/lib/opengl/constants/core/4_0/GL_ARB_draw_indirect.yml +2 -0
  49. data/lib/opengl/constants/core/4_0/GL_ARB_gpu_shader5.yml +6 -0
  50. data/lib/opengl/constants/core/4_0/GL_ARB_gpu_shader_fp64.yml +13 -0
  51. data/lib/opengl/constants/core/4_0/GL_ARB_shader_subroutine.yml +11 -0
  52. data/lib/opengl/constants/core/4_0/GL_ARB_tessellation_shader.yml +37 -0
  53. data/lib/opengl/constants/core/4_0/GL_ARB_transform_feedback2.yml +6 -0
  54. data/lib/opengl/constants/core/4_0/GL_ARB_transform_feedback3.yml +2 -0
  55. data/lib/opengl/constants/core/4_0/GL_VERSION_4_0.yml +88 -0
  56. data/lib/opengl/constants/core/4_1/GL_ARB_ES2_compatibility.yml +16 -0
  57. data/lib/opengl/constants/core/4_1/GL_ARB_get_program_binary.yml +4 -0
  58. data/lib/opengl/constants/core/4_1/GL_ARB_separate_shader_objects.yml +9 -0
  59. data/lib/opengl/constants/core/4_1/GL_ARB_viewport_array.yml +13 -0
  60. data/lib/opengl/constants/core/4_1/GL_VERSION_4_1.yml +44 -0
  61. data/lib/opengl/constants/core/4_2/GL_ARB_compressed_texture_pixel_storage.yml +8 -0
  62. data/lib/opengl/constants/core/4_2/GL_ARB_internalformat_query.yml +1 -0
  63. data/lib/opengl/constants/core/4_2/GL_ARB_map_buffer_alignment.yml +1 -0
  64. data/lib/opengl/constants/core/4_2/GL_ARB_shader_atomic_counters.yml +29 -0
  65. data/lib/opengl/constants/core/4_2/GL_ARB_shader_image_load_store.yml +64 -0
  66. data/lib/opengl/constants/core/4_2/GL_ARB_texture_storage.yml +1 -0
  67. data/lib/opengl/constants/core/4_2/GL_VERSION_4_2.yml +116 -0
  68. data/lib/opengl/constants/core/4_3/GL_ARB_ES3_compatibility.yml +13 -0
  69. data/lib/opengl/constants/core/4_3/GL_ARB_compute_shader.yml +18 -0
  70. data/lib/opengl/constants/core/4_3/GL_ARB_explicit_uniform_location.yml +1 -0
  71. data/lib/opengl/constants/core/4_3/GL_ARB_framebuffer_no_attachments.yml +9 -0
  72. data/lib/opengl/constants/core/4_3/GL_ARB_internalformat_query2.yml +115 -0
  73. data/lib/opengl/constants/core/4_3/GL_ARB_program_interface_query.yml +50 -0
  74. data/lib/opengl/constants/core/4_3/GL_ARB_shader_storage_buffer_object.yml +18 -0
  75. data/lib/opengl/constants/core/4_3/GL_ARB_stencil_texturing.yml +1 -0
  76. data/lib/opengl/constants/core/4_3/GL_ARB_texture_buffer_range.yml +3 -0
  77. data/lib/opengl/constants/core/4_3/GL_ARB_texture_view.yml +5 -0
  78. data/lib/opengl/constants/core/4_3/GL_ARB_vertex_attrib_binding.yml +7 -0
  79. data/lib/opengl/constants/core/4_3/GL_KHR_debug.yml +41 -0
  80. data/lib/opengl/constants/core/4_3/GL_VERSION_4_3.yml +281 -0
  81. data/lib/opengl/constants/ext/GL_EXT_texture_compression_s3tc.yml +4 -0
  82. data/lib/opengl/constants/ext/GL_EXT_texture_filter_anisotropic.yml +2 -0
  83. data/lib/opengl/constants/ext/GL_EXT_texture_sRGB.yml +16 -0
  84. data/lib/opengl/debugging.rb +38 -0
  85. data/lib/opengl/gl.rb +26 -0
  86. data/lib/opengl/platform.rb +4 -0
  87. data/lib/opengl/platform/base.rb +30 -0
  88. data/lib/opengl/platform/darwin.rb +24 -0
  89. data/lib/opengl/platform/linux.rb +25 -0
  90. data/lib/opengl/platform/types/darwin.yml +2 -0
  91. data/lib/opengl/platform/types/default.yml +27 -0
  92. data/lib/opengl/platform/types/linux.yml +2 -0
  93. data/lib/opengl/raw.rb +44 -0
  94. data/lib/opengl/raw/core/2_x/GL_VERSION_1_0.yml +259 -0
  95. data/lib/opengl/raw/core/2_x/GL_VERSION_1_1.yml +106 -0
  96. data/lib/opengl/raw/core/2_x/GL_VERSION_1_2.yml +60 -0
  97. data/lib/opengl/raw/core/2_x/GL_VERSION_1_3.yml +85 -0
  98. data/lib/opengl/raw/core/2_x/GL_VERSION_1_4.yml +43 -0
  99. data/lib/opengl/raw/core/2_x/GL_VERSION_1_5.yml +103 -0
  100. data/lib/opengl/raw/core/2_x/GL_VERSION_2_0.yml +537 -0
  101. data/lib/opengl/raw/core/2_x/GL_VERSION_2_1.yml +43 -0
  102. data/lib/opengl/raw/core/3_0/GL_ARB_framebuffer_object.yml +128 -0
  103. data/lib/opengl/raw/core/3_0/GL_ARB_map_buffer_range.yml +14 -0
  104. data/lib/opengl/raw/core/3_0/GL_ARB_vertex_array_object.yml +19 -0
  105. data/lib/opengl/raw/core/3_0/GL_VERSION_3_0.yml +340 -0
  106. data/lib/opengl/raw/core/3_1/GL_ARB_copy_buffer.yml +9 -0
  107. data/lib/opengl/raw/core/3_1/GL_ARB_uniform_buffer_object.yml +50 -0
  108. data/lib/opengl/raw/core/3_1/GL_VERSION_3_1.yml +26 -0
  109. data/lib/opengl/raw/core/3_2/GL_ARB_draw_elements_base_vertex.yml +37 -0
  110. data/lib/opengl/raw/core/3_2/GL_ARB_provoking_vertex.yml +5 -0
  111. data/lib/opengl/raw/core/3_2/GL_ARB_sync.yml +39 -0
  112. data/lib/opengl/raw/core/3_2/GL_ARB_texture_multisample.yml +31 -0
  113. data/lib/opengl/raw/core/3_2/GL_VERSION_3_2.yml +20 -0
  114. data/lib/opengl/raw/core/3_3/GL_ARB_blend_func_extended.yml +13 -0
  115. data/lib/opengl/raw/core/3_3/GL_ARB_sampler_objects.yml +80 -0
  116. data/lib/opengl/raw/core/3_3/GL_ARB_timer_query.yml +18 -0
  117. data/lib/opengl/raw/core/3_3/GL_ARB_vertex_type_2_10_10_10_rev.yml +57 -0
  118. data/lib/opengl/raw/core/3_3/GL_VERSION_3_3.yml +6 -0
  119. data/lib/opengl/raw/core/4_0/GL_ARB_draw_indirect.yml +12 -0
  120. data/lib/opengl/raw/core/4_0/GL_ARB_gpu_shader_fp64.yml +120 -0
  121. data/lib/opengl/raw/core/4_0/GL_ARB_shader_subroutine.yml +58 -0
  122. data/lib/opengl/raw/core/4_0/GL_ARB_tessellation_shader.yml +11 -0
  123. data/lib/opengl/raw/core/4_0/GL_ARB_transform_feedback2.yml +31 -0
  124. data/lib/opengl/raw/core/4_0/GL_ARB_transform_feedback3.yml +25 -0
  125. data/lib/opengl/raw/core/4_0/GL_VERSION_4_0.yml +30 -0
  126. data/lib/opengl/raw/core/4_1/GL_ARB_ES2_compatibility.yml +28 -0
  127. data/lib/opengl/raw/core/4_1/GL_ARB_get_program_binary.yml +22 -0
  128. data/lib/opengl/raw/core/4_1/GL_ARB_separate_shader_objects.yml +429 -0
  129. data/lib/opengl/raw/core/4_1/GL_ARB_vertex_attrib_64bit.yml +61 -0
  130. data/lib/opengl/raw/core/4_1/GL_ARB_viewport_array.yml +63 -0
  131. data/lib/opengl/raw/core/4_1/GL_VERSION_4_1.yml +1 -0
  132. data/lib/opengl/raw/core/4_2/GL_ARB_base_instance.yml +28 -0
  133. data/lib/opengl/raw/core/4_2/GL_ARB_internalformat_query.yml +9 -0
  134. data/lib/opengl/raw/core/4_2/GL_ARB_shader_atomic_counters.yml +8 -0
  135. data/lib/opengl/raw/core/4_2/GL_ARB_shader_image_load_store.yml +15 -0
  136. data/lib/opengl/raw/core/4_2/GL_ARB_texture_storage.yml +52 -0
  137. data/lib/opengl/raw/core/4_2/GL_ARB_transform_feedback_instanced.yml +14 -0
  138. data/lib/opengl/raw/core/4_2/GL_VERSION_4_2.yml +1 -0
  139. data/lib/opengl/type.rb +74 -0
  140. data/lib/opengl/version.rb +3 -0
  141. data/lib/opengl/wrapper.rb +13 -0
  142. data/lib/opengl/wrapper/core/2_x/GL_VERSION_1_0.rb +165 -0
  143. data/lib/opengl/wrapper/core/2_x/GL_VERSION_1_1.rb +29 -0
  144. data/lib/opengl/wrapper/core/2_x/GL_VERSION_1_2.rb +13 -0
  145. data/lib/opengl/wrapper/core/2_x/GL_VERSION_1_3.rb +16 -0
  146. data/lib/opengl/wrapper/core/2_x/GL_VERSION_1_4.rb +18 -0
  147. data/lib/opengl/wrapper/core/2_x/GL_VERSION_1_5.rb +49 -0
  148. data/lib/opengl/wrapper/core/2_x/GL_VERSION_2_0.rb +184 -0
  149. data/lib/opengl/wrapper/core/2_x/GL_VERSION_2_1.rb +13 -0
  150. data/lib/opengl/wrapper/core/3_0/GL_ARB_framebuffer_object.rb +43 -0
  151. data/lib/opengl/wrapper/core/3_0/GL_ARB_map_buffer_range.rb +11 -0
  152. data/lib/opengl/wrapper/core/3_0/GL_ARB_vertex_array_object.rb +16 -0
  153. data/lib/opengl/wrapper/core/3_0/GL_VERSION_3_0.rb +87 -0
  154. data/lib/opengl/wrapper/macros/base.rb +80 -0
  155. data/opengl.gemspec +25 -0
  156. data/spec/spec_helper.rb +8 -0
  157. data/test/test_helper.rb +8 -0
  158. metadata +269 -0
@@ -0,0 +1,38 @@
1
+ module OpenGL
2
+ module Debugging
3
+ include Constants
4
+
5
+ DEBUG_MESSAGE = Hash.new("Unknown Error")
6
+ DEBUG_MESSAGE[GL_NO_ERROR] = nil
7
+ DEBUG_MESSAGE[GL_INVALID_ENUM] = 'GL_INVALID_ENUM'
8
+ DEBUG_MESSAGE[GL_INVALID_VALUE] = 'GL_INVALID_VALUE'
9
+ DEBUG_MESSAGE[GL_INVALID_OPERATION] = 'GL_INVALID_OPERATION'
10
+ DEBUG_MESSAGE[GL_STACK_OVERFLOW] = 'GL_STACK_OVERFLOW'
11
+ DEBUG_MESSAGE[GL_STACK_UNDERFLOW] = 'GL_STACK_UNDERFLOW'
12
+ DEBUG_MESSAGE[GL_OUT_OF_MEMORY] = 'GL_OUT_OF_MEMORY'
13
+
14
+ def glCheckError!(method, args)
15
+ unless (err = glGetError()) == GL_NO_ERROR
16
+ msg = DEBUG_MESSAGE[err]
17
+ msg = "OpenGL Error: #{msg} from #{method}(#{args.join(', ')})"
18
+ raise RuntimeError, msg
19
+ end
20
+ end
21
+
22
+ def self.included(base)
23
+ mod = Module.new
24
+ base.instance_methods.select do |method_name|
25
+ method_name =~ /\Agl[A-Z]/ &&
26
+ method_name != :glGetError &&
27
+ method_name != :glCheckError!
28
+ end.each do |method_name|
29
+ mod.send(:define_method, method_name) do |*args, &blk|
30
+ result = super(*args, &blk)
31
+ glCheckError!(method_name, args)
32
+ return result
33
+ end
34
+ end
35
+ base.send :include, mod
36
+ end
37
+ end
38
+ end
data/lib/opengl/gl.rb ADDED
@@ -0,0 +1,26 @@
1
+ require_relative "constants"
2
+ require_relative "platform"
3
+ require_relative "type"
4
+ require_relative "raw"
5
+ require_relative "wrapper"
6
+ require_relative "debugging"
7
+
8
+ module OpenGL
9
+ module GL
10
+ include Constants
11
+
12
+ def self.entrypoints
13
+ unless Platform.current.current_context?
14
+ raise RuntimeError, "OpenGL context is missing"
15
+ end
16
+ base = Module.new
17
+ base.send :include, Raw.generate_module()
18
+ base.send :include, Debugging
19
+ Wrapper.constants.each do |c|
20
+ base.send :include, Wrapper.const_get(c) if c =~ /\AGL_/
21
+ end
22
+ return base
23
+ end
24
+
25
+ end
26
+ end
@@ -0,0 +1,4 @@
1
+ require 'ffi'
2
+
3
+ require_relative "platform/base"
4
+ require_relative "platform/#{FFI::Platform::OS}"
@@ -0,0 +1,30 @@
1
+ require 'ffi'
2
+ require 'yaml'
3
+
4
+ module OpenGL::Platform
5
+ module Base
6
+
7
+ def primitive_types
8
+ @primitive_types ||= begin
9
+ root = File.expand_path('../types', __FILE__)
10
+ table = YAML.load(File.read(File.join(root, 'default.yml')))
11
+ path = File.join(root, "#{FFI::Platform::OS}.yml")
12
+ table.merge! YAML.load(File.read(path)) if File.exists? path
13
+ table.freeze
14
+ end
15
+ end
16
+
17
+ def calling_convention
18
+ :default
19
+ end
20
+
21
+ def current_context?
22
+ raise NotImplementedError
23
+ end
24
+
25
+ def find_function_address(name)
26
+ raise NotImplementedError
27
+ end
28
+
29
+ end
30
+ end
@@ -0,0 +1,24 @@
1
+ module OpenGL::Platform
2
+ module Darwin
3
+ extend Base
4
+
5
+ def self.current_context?
6
+ not OpenGL.CGLGetCurrentContext().null?
7
+ end
8
+
9
+ def self.find_function_address(name)
10
+ return OpenGL.lib.find_function(name.to_s)
11
+ end
12
+
13
+ module OpenGL
14
+ extend FFI::Library
15
+ ffi_lib '/System/Library/Frameworks/OpenGL.framework/OpenGL'
16
+ def self.lib; ffi_libraries.last; end
17
+ attach_function :CGLGetCurrentContext, [], :pointer
18
+ end
19
+ end
20
+
21
+ def self.current
22
+ Darwin
23
+ end
24
+ end
@@ -0,0 +1,25 @@
1
+ module OpenGL::Platform
2
+ module Linux
3
+ extend Base
4
+
5
+ def self.current_context?
6
+ not GL.glXGetCurrentContext().null?
7
+ end
8
+
9
+ def self.find_function_address(name)
10
+ return GL.glXGetProcAddressARB(name.to_s)
11
+ end
12
+
13
+ module GL
14
+ extend FFI::Library
15
+ ffi_lib 'libGL.so.1'
16
+ callback :PROC, [], :void
17
+ attach_function :glXGetCurrentContext, [], :pointer
18
+ attach_function :glXGetProcAddressARB, [:string], :PROC
19
+ end
20
+ end
21
+
22
+ def self.current
23
+ Linux
24
+ end
25
+ end
@@ -0,0 +1,2 @@
1
+ :GLintptr: :__darwin_ptrdiff_t
2
+ :GLsizeiptr: :__darwin_ptrdiff_t
@@ -0,0 +1,27 @@
1
+ ---
2
+ # platform dependent
3
+ :GLenum: :uint32
4
+ :GLbitfield: :uint32
5
+ :GLboolean: :uint8
6
+ :GLintptr: :ptrdiff_t
7
+ :GLsizeiptr: :ptrdiff_t
8
+ :GLchar: :char
9
+
10
+ # fixed size
11
+ :GLbyte: :int8
12
+ :GLubyte: :uint8
13
+ :GLshort: :int16
14
+ :GLushort: :uint16
15
+ :GLint: :int32
16
+ :GLuint: :uint32
17
+ :GLsizei: :int32
18
+ :GLint64: :int64
19
+ :GLuint64: :uint64
20
+ :GLfloat: :float
21
+ :GLclampf: :float
22
+ :GLdouble: :double
23
+ :GLclampd: :double
24
+ :GLvoid: :void
25
+
26
+ # GL_ARB_sync
27
+ :GLsync: :pointer
@@ -0,0 +1,2 @@
1
+ :GLintptr: :__ssize_t
2
+ :GLsizeiptr: :__ssize_t
data/lib/opengl/raw.rb ADDED
@@ -0,0 +1,44 @@
1
+ require 'ffi'
2
+ require 'yaml'
3
+
4
+ module OpenGL
5
+ module Raw
6
+ ROOT = File.expand_path('../raw', __FILE__)
7
+
8
+ def self.generate_module(*names)
9
+ paths = begin
10
+ if names.empty?
11
+ Dir[File.join(ROOT, "**/*.yml")]
12
+ else
13
+ p = names.map{|n| Dir[File.join(ROOT, "**/#{n}.yml")] }
14
+ p.reject!(&:empty?).map!(&:first)
15
+ end
16
+ end
17
+
18
+ platform = Platform.current
19
+ mod = Module.new
20
+
21
+ paths.each do |path|
22
+ YAML.load(File.read(path)).each do |func_name, func_info|
23
+ return_type = Type.find(func_info.fetch('return_type'))
24
+ params = func_info.fetch('parameters').map{|p| p.split.first }
25
+ params = params.map{|t| Type.find(t) }
26
+
27
+ if addr = platform.find_function_address(func_name)
28
+ options = { :convention => platform.calling_convention }
29
+ func = FFI::Function.new(return_type, params, addr, options)
30
+ func.attach(mod, func_name.to_s)
31
+ else
32
+ mod.module_eval <<-RUBY
33
+ def #{func_name}
34
+ raise NotImplementedError, "#{func_name} is not supported"
35
+ end
36
+ RUBY
37
+ end
38
+ end
39
+ end
40
+
41
+ return mod
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,259 @@
1
+ ---
2
+ glCullFace:
3
+ return_type: void
4
+ parameters:
5
+ - GLenum mode
6
+ glFrontFace:
7
+ return_type: void
8
+ parameters:
9
+ - GLenum mode
10
+ glHint:
11
+ return_type: void
12
+ parameters:
13
+ - GLenum target
14
+ - GLenum mode
15
+ glLineWidth:
16
+ return_type: void
17
+ parameters:
18
+ - GLfloat width
19
+ glPointSize:
20
+ return_type: void
21
+ parameters:
22
+ - GLfloat size
23
+ glPolygonMode:
24
+ return_type: void
25
+ parameters:
26
+ - GLenum face
27
+ - GLenum mode
28
+ glScissor:
29
+ return_type: void
30
+ parameters:
31
+ - GLint x
32
+ - GLint y
33
+ - GLsizei width
34
+ - GLsizei height
35
+ glTexParameterf:
36
+ return_type: void
37
+ parameters:
38
+ - GLenum target
39
+ - GLenum pname
40
+ - GLfloat param
41
+ glTexParameterfv:
42
+ return_type: void
43
+ parameters:
44
+ - GLenum target
45
+ - GLenum pname
46
+ - GLfloat_in params
47
+ glTexParameteri:
48
+ return_type: void
49
+ parameters:
50
+ - GLenum target
51
+ - GLenum pname
52
+ - GLint param
53
+ glTexParameteriv:
54
+ return_type: void
55
+ parameters:
56
+ - GLenum target
57
+ - GLenum pname
58
+ - GLint_in params
59
+ glTexImage1D:
60
+ return_type: void
61
+ parameters:
62
+ - GLenum target
63
+ - GLint level
64
+ - GLint internalformat
65
+ - GLsizei width
66
+ - GLint border
67
+ - GLenum format
68
+ - GLenum type
69
+ - buffer_in pixels
70
+ glTexImage2D:
71
+ return_type: void
72
+ parameters:
73
+ - GLenum target
74
+ - GLint level
75
+ - GLint internalformat
76
+ - GLsizei width
77
+ - GLsizei height
78
+ - GLint border
79
+ - GLenum format
80
+ - GLenum type
81
+ - buffer_in pixels
82
+ glDrawBuffer:
83
+ return_type: void
84
+ parameters:
85
+ - GLenum mode
86
+ glClear:
87
+ return_type: void
88
+ parameters:
89
+ - GLbitfield mask
90
+ glClearColor:
91
+ return_type: void
92
+ parameters:
93
+ - GLfloat red
94
+ - GLfloat green
95
+ - GLfloat blue
96
+ - GLfloat alpha
97
+ glClearStencil:
98
+ return_type: void
99
+ parameters:
100
+ - GLint s
101
+ glClearDepth:
102
+ return_type: void
103
+ parameters:
104
+ - GLdouble depth
105
+ glStencilMask:
106
+ return_type: void
107
+ parameters:
108
+ - GLuint mask
109
+ glColorMask:
110
+ return_type: void
111
+ parameters:
112
+ - GLboolean red
113
+ - GLboolean green
114
+ - GLboolean blue
115
+ - GLboolean alpha
116
+ glDepthMask:
117
+ return_type: void
118
+ parameters:
119
+ - GLboolean flag
120
+ glDisable:
121
+ return_type: void
122
+ parameters:
123
+ - GLenum cap
124
+ glEnable:
125
+ return_type: void
126
+ parameters:
127
+ - GLenum cap
128
+ glFinish:
129
+ return_type: void
130
+ parameters: []
131
+ glFlush:
132
+ return_type: void
133
+ parameters: []
134
+ glBlendFunc:
135
+ return_type: void
136
+ parameters:
137
+ - GLenum sfactor
138
+ - GLenum dfactor
139
+ glLogicOp:
140
+ return_type: void
141
+ parameters:
142
+ - GLenum opcode
143
+ glStencilFunc:
144
+ return_type: void
145
+ parameters:
146
+ - GLenum func
147
+ - GLint ref
148
+ - GLuint mask
149
+ glStencilOp:
150
+ return_type: void
151
+ parameters:
152
+ - GLenum fail
153
+ - GLenum zfail
154
+ - GLenum zpass
155
+ glDepthFunc:
156
+ return_type: void
157
+ parameters:
158
+ - GLenum func
159
+ glPixelStoref:
160
+ return_type: void
161
+ parameters:
162
+ - GLenum pname
163
+ - GLfloat param
164
+ glPixelStorei:
165
+ return_type: void
166
+ parameters:
167
+ - GLenum pname
168
+ - GLint param
169
+ glReadBuffer:
170
+ return_type: void
171
+ parameters:
172
+ - GLenum mode
173
+ glReadPixels:
174
+ return_type: void
175
+ parameters:
176
+ - GLint x
177
+ - GLint y
178
+ - GLsizei width
179
+ - GLsizei height
180
+ - GLenum format
181
+ - GLenum type
182
+ - buffer_out pixels
183
+ glGetBooleanv:
184
+ return_type: void
185
+ parameters:
186
+ - GLenum pname
187
+ - GLboolean_out params
188
+ glGetDoublev:
189
+ return_type: void
190
+ parameters:
191
+ - GLenum pname
192
+ - GLdouble_out params
193
+ glGetError:
194
+ return_type: GLenum
195
+ parameters: []
196
+ glGetFloatv:
197
+ return_type: void
198
+ parameters:
199
+ - GLenum pname
200
+ - GLfloat_out params
201
+ glGetIntegerv:
202
+ return_type: void
203
+ parameters:
204
+ - GLenum pname
205
+ - GLint_out params
206
+ glGetString:
207
+ return_type: string
208
+ parameters:
209
+ - GLenum name
210
+ glGetTexImage:
211
+ return_type: void
212
+ parameters:
213
+ - GLenum target
214
+ - GLint level
215
+ - GLenum format
216
+ - GLenum type
217
+ - buffer_out pixels
218
+ glGetTexParameterfv:
219
+ return_type: void
220
+ parameters:
221
+ - GLenum target
222
+ - GLenum pname
223
+ - GLfloat_out params
224
+ glGetTexParameteriv:
225
+ return_type: void
226
+ parameters:
227
+ - GLenum target
228
+ - GLenum pname
229
+ - GLint_out params
230
+ glGetTexLevelParameterfv:
231
+ return_type: void
232
+ parameters:
233
+ - GLenum target
234
+ - GLint level
235
+ - GLenum pname
236
+ - GLfloat_out params
237
+ glGetTexLevelParameteriv:
238
+ return_type: void
239
+ parameters:
240
+ - GLenum target
241
+ - GLint level
242
+ - GLenum pname
243
+ - GLint_out params
244
+ glIsEnabled:
245
+ return_type: GLboolean
246
+ parameters:
247
+ - GLenum cap
248
+ glDepthRange:
249
+ return_type: void
250
+ parameters:
251
+ - GLdouble near
252
+ - GLdouble far
253
+ glViewport:
254
+ return_type: void
255
+ parameters:
256
+ - GLint x
257
+ - GLint y
258
+ - GLsizei width
259
+ - GLsizei height