opengl3 0.0.1.pre1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +21 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +87 -0
- data/Rakefile +17 -0
- data/examples/math3d.rb +65 -0
- data/examples/ogl-2_1-basic.rb +107 -0
- data/examples/ogl-3_2-basic.rb +128 -0
- data/examples/ogl-3_2-cube.rb +203 -0
- data/examples/ogl-4_0-quad_tessellation.rb +283 -0
- data/examples/ogl-4_0-triangle_tessellation.rb +262 -0
- data/lib/glut.rb +125 -0
- data/lib/opengl.rb +7 -0
- data/lib/opengl/constants.rb +15 -0
- data/lib/opengl/constants/core/2_x/GL_VERSION_1_1.yml +230 -0
- data/lib/opengl/constants/core/2_x/GL_VERSION_1_2.yml +36 -0
- data/lib/opengl/constants/core/2_x/GL_VERSION_1_3.yml +59 -0
- data/lib/opengl/constants/core/2_x/GL_VERSION_1_4.yml +16 -0
- data/lib/opengl/constants/core/2_x/GL_VERSION_1_5.yml +28 -0
- data/lib/opengl/constants/core/2_x/GL_VERSION_2_0.yml +80 -0
- data/lib/opengl/constants/core/2_x/GL_VERSION_2_1.yml +16 -0
- data/lib/opengl/constants/core/3_0/GL_ARB_depth_buffer_float.yml +3 -0
- data/lib/opengl/constants/core/3_0/GL_ARB_framebuffer_object.yml +77 -0
- data/lib/opengl/constants/core/3_0/GL_ARB_framebuffer_sRGB.yml +1 -0
- data/lib/opengl/constants/core/3_0/GL_ARB_half_float_vertex.yml +1 -0
- data/lib/opengl/constants/core/3_0/GL_ARB_map_buffer_range.yml +6 -0
- data/lib/opengl/constants/core/3_0/GL_ARB_texture_compression_rgtc.yml +4 -0
- data/lib/opengl/constants/core/3_0/GL_ARB_texture_rg.yml +22 -0
- data/lib/opengl/constants/core/3_0/GL_ARB_vertex_array_object.yml +1 -0
- data/lib/opengl/constants/core/3_0/GL_VERSION_3_0.yml +224 -0
- data/lib/opengl/constants/core/3_1/GL_ARB_copy_buffer.yml +4 -0
- data/lib/opengl/constants/core/3_1/GL_ARB_uniform_buffer_object.yml +33 -0
- data/lib/opengl/constants/core/3_1/GL_VERSION_3_1.yml +65 -0
- data/lib/opengl/constants/core/3_2/GL_ARB_depth_clamp.yml +1 -0
- data/lib/opengl/constants/core/3_2/GL_ARB_provoking_vertex.yml +4 -0
- data/lib/opengl/constants/core/3_2/GL_ARB_seamless_cube_map.yml +1 -0
- data/lib/opengl/constants/core/3_2/GL_ARB_sync.yml +15 -0
- data/lib/opengl/constants/core/3_2/GL_ARB_texture_multisample.yml +21 -0
- data/lib/opengl/constants/core/3_2/GL_VERSION_3_2.yml +76 -0
- data/lib/opengl/constants/core/3_3/GL_ARB_blend_func_extended.yml +5 -0
- data/lib/opengl/constants/core/3_3/GL_ARB_occlusion_query2.yml +1 -0
- data/lib/opengl/constants/core/3_3/GL_ARB_sampler_objects.yml +1 -0
- data/lib/opengl/constants/core/3_3/GL_ARB_texture_rgb10_a2ui.yml +1 -0
- data/lib/opengl/constants/core/3_3/GL_ARB_texture_swizzle.yml +5 -0
- data/lib/opengl/constants/core/3_3/GL_ARB_timer_query.yml +2 -0
- data/lib/opengl/constants/core/3_3/GL_ARB_vertex_type_2_10_10_10_rev.yml +2 -0
- data/lib/opengl/constants/core/3_3/GL_VERSION_3_3.yml +25 -0
- data/lib/opengl/constants/core/4_0/GL_ARB_draw_indirect.yml +2 -0
- data/lib/opengl/constants/core/4_0/GL_ARB_gpu_shader5.yml +6 -0
- data/lib/opengl/constants/core/4_0/GL_ARB_gpu_shader_fp64.yml +13 -0
- data/lib/opengl/constants/core/4_0/GL_ARB_shader_subroutine.yml +11 -0
- data/lib/opengl/constants/core/4_0/GL_ARB_tessellation_shader.yml +37 -0
- data/lib/opengl/constants/core/4_0/GL_ARB_transform_feedback2.yml +6 -0
- data/lib/opengl/constants/core/4_0/GL_ARB_transform_feedback3.yml +2 -0
- data/lib/opengl/constants/core/4_0/GL_VERSION_4_0.yml +88 -0
- data/lib/opengl/constants/core/4_1/GL_ARB_ES2_compatibility.yml +16 -0
- data/lib/opengl/constants/core/4_1/GL_ARB_get_program_binary.yml +4 -0
- data/lib/opengl/constants/core/4_1/GL_ARB_separate_shader_objects.yml +9 -0
- data/lib/opengl/constants/core/4_1/GL_ARB_viewport_array.yml +13 -0
- data/lib/opengl/constants/core/4_1/GL_VERSION_4_1.yml +44 -0
- data/lib/opengl/constants/core/4_2/GL_ARB_compressed_texture_pixel_storage.yml +8 -0
- data/lib/opengl/constants/core/4_2/GL_ARB_internalformat_query.yml +1 -0
- data/lib/opengl/constants/core/4_2/GL_ARB_map_buffer_alignment.yml +1 -0
- data/lib/opengl/constants/core/4_2/GL_ARB_shader_atomic_counters.yml +29 -0
- data/lib/opengl/constants/core/4_2/GL_ARB_shader_image_load_store.yml +64 -0
- data/lib/opengl/constants/core/4_2/GL_ARB_texture_storage.yml +1 -0
- data/lib/opengl/constants/core/4_2/GL_VERSION_4_2.yml +116 -0
- data/lib/opengl/constants/core/4_3/GL_ARB_ES3_compatibility.yml +13 -0
- data/lib/opengl/constants/core/4_3/GL_ARB_compute_shader.yml +18 -0
- data/lib/opengl/constants/core/4_3/GL_ARB_explicit_uniform_location.yml +1 -0
- data/lib/opengl/constants/core/4_3/GL_ARB_framebuffer_no_attachments.yml +9 -0
- data/lib/opengl/constants/core/4_3/GL_ARB_internalformat_query2.yml +115 -0
- data/lib/opengl/constants/core/4_3/GL_ARB_program_interface_query.yml +50 -0
- data/lib/opengl/constants/core/4_3/GL_ARB_shader_storage_buffer_object.yml +18 -0
- data/lib/opengl/constants/core/4_3/GL_ARB_stencil_texturing.yml +1 -0
- data/lib/opengl/constants/core/4_3/GL_ARB_texture_buffer_range.yml +3 -0
- data/lib/opengl/constants/core/4_3/GL_ARB_texture_view.yml +5 -0
- data/lib/opengl/constants/core/4_3/GL_ARB_vertex_attrib_binding.yml +7 -0
- data/lib/opengl/constants/core/4_3/GL_KHR_debug.yml +41 -0
- data/lib/opengl/constants/core/4_3/GL_VERSION_4_3.yml +281 -0
- data/lib/opengl/constants/ext/GL_EXT_texture_compression_s3tc.yml +4 -0
- data/lib/opengl/constants/ext/GL_EXT_texture_filter_anisotropic.yml +2 -0
- data/lib/opengl/constants/ext/GL_EXT_texture_sRGB.yml +16 -0
- data/lib/opengl/debugging.rb +38 -0
- data/lib/opengl/gl.rb +26 -0
- data/lib/opengl/platform.rb +4 -0
- data/lib/opengl/platform/base.rb +30 -0
- data/lib/opengl/platform/darwin.rb +24 -0
- data/lib/opengl/platform/linux.rb +25 -0
- data/lib/opengl/platform/types/darwin.yml +2 -0
- data/lib/opengl/platform/types/default.yml +27 -0
- data/lib/opengl/platform/types/linux.yml +2 -0
- data/lib/opengl/raw.rb +44 -0
- data/lib/opengl/raw/core/2_x/GL_VERSION_1_0.yml +259 -0
- data/lib/opengl/raw/core/2_x/GL_VERSION_1_1.yml +106 -0
- data/lib/opengl/raw/core/2_x/GL_VERSION_1_2.yml +60 -0
- data/lib/opengl/raw/core/2_x/GL_VERSION_1_3.yml +85 -0
- data/lib/opengl/raw/core/2_x/GL_VERSION_1_4.yml +43 -0
- data/lib/opengl/raw/core/2_x/GL_VERSION_1_5.yml +103 -0
- data/lib/opengl/raw/core/2_x/GL_VERSION_2_0.yml +537 -0
- data/lib/opengl/raw/core/2_x/GL_VERSION_2_1.yml +43 -0
- data/lib/opengl/raw/core/3_0/GL_ARB_framebuffer_object.yml +128 -0
- data/lib/opengl/raw/core/3_0/GL_ARB_map_buffer_range.yml +14 -0
- data/lib/opengl/raw/core/3_0/GL_ARB_vertex_array_object.yml +19 -0
- data/lib/opengl/raw/core/3_0/GL_VERSION_3_0.yml +340 -0
- data/lib/opengl/raw/core/3_1/GL_ARB_copy_buffer.yml +9 -0
- data/lib/opengl/raw/core/3_1/GL_ARB_uniform_buffer_object.yml +50 -0
- data/lib/opengl/raw/core/3_1/GL_VERSION_3_1.yml +26 -0
- data/lib/opengl/raw/core/3_2/GL_ARB_draw_elements_base_vertex.yml +37 -0
- data/lib/opengl/raw/core/3_2/GL_ARB_provoking_vertex.yml +5 -0
- data/lib/opengl/raw/core/3_2/GL_ARB_sync.yml +39 -0
- data/lib/opengl/raw/core/3_2/GL_ARB_texture_multisample.yml +31 -0
- data/lib/opengl/raw/core/3_2/GL_VERSION_3_2.yml +20 -0
- data/lib/opengl/raw/core/3_3/GL_ARB_blend_func_extended.yml +13 -0
- data/lib/opengl/raw/core/3_3/GL_ARB_sampler_objects.yml +80 -0
- data/lib/opengl/raw/core/3_3/GL_ARB_timer_query.yml +18 -0
- data/lib/opengl/raw/core/3_3/GL_ARB_vertex_type_2_10_10_10_rev.yml +57 -0
- data/lib/opengl/raw/core/3_3/GL_VERSION_3_3.yml +6 -0
- data/lib/opengl/raw/core/4_0/GL_ARB_draw_indirect.yml +12 -0
- data/lib/opengl/raw/core/4_0/GL_ARB_gpu_shader_fp64.yml +120 -0
- data/lib/opengl/raw/core/4_0/GL_ARB_shader_subroutine.yml +58 -0
- data/lib/opengl/raw/core/4_0/GL_ARB_tessellation_shader.yml +11 -0
- data/lib/opengl/raw/core/4_0/GL_ARB_transform_feedback2.yml +31 -0
- data/lib/opengl/raw/core/4_0/GL_ARB_transform_feedback3.yml +25 -0
- data/lib/opengl/raw/core/4_0/GL_VERSION_4_0.yml +30 -0
- data/lib/opengl/raw/core/4_1/GL_ARB_ES2_compatibility.yml +28 -0
- data/lib/opengl/raw/core/4_1/GL_ARB_get_program_binary.yml +22 -0
- data/lib/opengl/raw/core/4_1/GL_ARB_separate_shader_objects.yml +429 -0
- data/lib/opengl/raw/core/4_1/GL_ARB_vertex_attrib_64bit.yml +61 -0
- data/lib/opengl/raw/core/4_1/GL_ARB_viewport_array.yml +63 -0
- data/lib/opengl/raw/core/4_1/GL_VERSION_4_1.yml +1 -0
- data/lib/opengl/raw/core/4_2/GL_ARB_base_instance.yml +28 -0
- data/lib/opengl/raw/core/4_2/GL_ARB_internalformat_query.yml +9 -0
- data/lib/opengl/raw/core/4_2/GL_ARB_shader_atomic_counters.yml +8 -0
- data/lib/opengl/raw/core/4_2/GL_ARB_shader_image_load_store.yml +15 -0
- data/lib/opengl/raw/core/4_2/GL_ARB_texture_storage.yml +52 -0
- data/lib/opengl/raw/core/4_2/GL_ARB_transform_feedback_instanced.yml +14 -0
- data/lib/opengl/raw/core/4_2/GL_VERSION_4_2.yml +1 -0
- data/lib/opengl/type.rb +74 -0
- data/lib/opengl/version.rb +3 -0
- data/lib/opengl/wrapper.rb +13 -0
- data/lib/opengl/wrapper/core/2_x/GL_VERSION_1_0.rb +165 -0
- data/lib/opengl/wrapper/core/2_x/GL_VERSION_1_1.rb +29 -0
- data/lib/opengl/wrapper/core/2_x/GL_VERSION_1_2.rb +13 -0
- data/lib/opengl/wrapper/core/2_x/GL_VERSION_1_3.rb +16 -0
- data/lib/opengl/wrapper/core/2_x/GL_VERSION_1_4.rb +18 -0
- data/lib/opengl/wrapper/core/2_x/GL_VERSION_1_5.rb +49 -0
- data/lib/opengl/wrapper/core/2_x/GL_VERSION_2_0.rb +184 -0
- data/lib/opengl/wrapper/core/2_x/GL_VERSION_2_1.rb +13 -0
- data/lib/opengl/wrapper/core/3_0/GL_ARB_framebuffer_object.rb +43 -0
- data/lib/opengl/wrapper/core/3_0/GL_ARB_map_buffer_range.rb +11 -0
- data/lib/opengl/wrapper/core/3_0/GL_ARB_vertex_array_object.rb +16 -0
- data/lib/opengl/wrapper/core/3_0/GL_VERSION_3_0.rb +87 -0
- data/lib/opengl/wrapper/macros/base.rb +80 -0
- data/opengl.gemspec +25 -0
- data/spec/spec_helper.rb +8 -0
- data/test/test_helper.rb +8 -0
- metadata +269 -0
@@ -0,0 +1,29 @@
|
|
1
|
+
module OpenGL
|
2
|
+
module Wrapper::GL_VERSION_1_1
|
3
|
+
extend Wrapper::Base
|
4
|
+
|
5
|
+
# glDrawArrays
|
6
|
+
# glDrawElements
|
7
|
+
|
8
|
+
# glGetPointerv
|
9
|
+
def_glGetValues('Pointer', :pointer, %w(pname))
|
10
|
+
|
11
|
+
# glPolygonOffset
|
12
|
+
# glCopyTexImage1D
|
13
|
+
# glCopyTexImage2D
|
14
|
+
# glCopyTexSubImage1D
|
15
|
+
# glCopyTexSubImage2D
|
16
|
+
# glTexSubImage1D
|
17
|
+
# glTexSubImage2D
|
18
|
+
# glBindTexture
|
19
|
+
|
20
|
+
# glDeleteTextures
|
21
|
+
def_glDeleteObjects 'Textures'
|
22
|
+
|
23
|
+
# glGenTextures
|
24
|
+
def_glGenObjects 'Textures'
|
25
|
+
|
26
|
+
# glIsTexture
|
27
|
+
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module OpenGL
|
2
|
+
module Wrapper::GL_VERSION_1_3
|
3
|
+
extend Wrapper::Base
|
4
|
+
|
5
|
+
# glActiveTexture
|
6
|
+
# glSampleCoverage
|
7
|
+
# glCompressedTexImage3D
|
8
|
+
# glCompressedTexImage2D
|
9
|
+
# glCompressedTexImage1D
|
10
|
+
# glCompressedTexSubImage3D
|
11
|
+
# glCompressedTexSubImage2D
|
12
|
+
# glCompressedTexSubImage1D
|
13
|
+
# glGetCompressedTexImage
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module OpenGL
|
2
|
+
module Wrapper::GL_VERSION_1_4
|
3
|
+
extend Wrapper::Base
|
4
|
+
|
5
|
+
# glBlendFuncSeparate
|
6
|
+
# glMultiDrawArrays
|
7
|
+
# glMultiDrawElements
|
8
|
+
|
9
|
+
# glPointParameterf
|
10
|
+
# glPointParameterfv
|
11
|
+
def_glSetValues('PointParameterf', :GLfloat, %w(pname))
|
12
|
+
|
13
|
+
# glPointParameteri
|
14
|
+
# glPointParameteriv
|
15
|
+
def_glSetValues('PointParameteri', :GLint, %w(pname))
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
module OpenGL
|
2
|
+
module Wrapper::GL_VERSION_1_5
|
3
|
+
extend Wrapper::Base
|
4
|
+
|
5
|
+
# glGenQueries
|
6
|
+
def_glGenObjects 'Queries'
|
7
|
+
|
8
|
+
# glDeleteQueries
|
9
|
+
def_glDeleteObjects 'Queries'
|
10
|
+
|
11
|
+
# glIsQuery
|
12
|
+
# glBeginQuery
|
13
|
+
# glEndQuery
|
14
|
+
|
15
|
+
# glGetQueryiv
|
16
|
+
def_glGetValues('Queryi', :GLint, %w(target pname))
|
17
|
+
|
18
|
+
# glGetQueryObjectiv
|
19
|
+
def_glGetValues('QueryObjecti', :GLint, %w(id pname))
|
20
|
+
|
21
|
+
# glGetQueryObjectuiv
|
22
|
+
def_glGetValues('QueryObjectui', :GLuint, %w(id pname))
|
23
|
+
|
24
|
+
# glBindBuffer
|
25
|
+
|
26
|
+
# glDeleteBuffers
|
27
|
+
def_glDeleteObjects 'Buffers'
|
28
|
+
|
29
|
+
# glGenBuffers
|
30
|
+
def_glGenObjects 'Buffers'
|
31
|
+
|
32
|
+
# glIsBuffer
|
33
|
+
# glBufferData
|
34
|
+
# glBufferSubData
|
35
|
+
# glGetBufferSubData
|
36
|
+
|
37
|
+
# glMapBuffer
|
38
|
+
def_glMapBuffer()
|
39
|
+
|
40
|
+
# glUnmapBuffer
|
41
|
+
|
42
|
+
# glGetBufferParameteriv
|
43
|
+
def_glGetValues('BufferParameteri', :GLint, %w(target pname))
|
44
|
+
|
45
|
+
# glGetBufferPointerv
|
46
|
+
def_glGetValues('BufferPointer', :pointer, %w(target pname))
|
47
|
+
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,184 @@
|
|
1
|
+
module OpenGL
|
2
|
+
module Wrapper::GL_VERSION_2_0
|
3
|
+
extend Wrapper::Base
|
4
|
+
|
5
|
+
SHADER_TYPES = {
|
6
|
+
:vertex => Constants::GL_VERTEX_SHADER,
|
7
|
+
:fragment => Constants::GL_FRAGMENT_SHADER,
|
8
|
+
:pixel => Constants::GL_FRAGMENT_SHADER,
|
9
|
+
:geometry => Constants::GL_GEOMETRY_SHADER,
|
10
|
+
:tess_control => Constants::GL_TESS_CONTROL_SHADER,
|
11
|
+
:tess_evaluation => Constants::GL_TESS_EVALUATION_SHADER,
|
12
|
+
:tess_eval => Constants::GL_TESS_EVALUATION_SHADER,
|
13
|
+
:compute => Constants::GL_COMPUTE_SHADER,
|
14
|
+
}
|
15
|
+
|
16
|
+
# glBlendEquationSeparate
|
17
|
+
|
18
|
+
# glDrawBuffers
|
19
|
+
def glDrawBuffers(*bufs)
|
20
|
+
bufs.flatten!
|
21
|
+
Type.GLenum(bufs.count) do |ptr|
|
22
|
+
ptr.write_array_of_GLenum(bufs)
|
23
|
+
super(bufs.count, ptr)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
# glStencilOpSeparate
|
28
|
+
# glStencilFuncSeparate
|
29
|
+
# glStencilMaskSeparate
|
30
|
+
# glAttachShader
|
31
|
+
|
32
|
+
# glBindAttribLocation
|
33
|
+
# usage: glBindAttribLocation(program, Integer, String) -> nil
|
34
|
+
|
35
|
+
# glCompileShader
|
36
|
+
# glCreateProgram
|
37
|
+
|
38
|
+
# glCreateShader
|
39
|
+
def glCreateShader(shader_type)
|
40
|
+
super(SHADER_TYPES[shader_type] || shader_type)
|
41
|
+
end
|
42
|
+
|
43
|
+
# glDeleteProgram
|
44
|
+
# glDeleteShader
|
45
|
+
# glDetachShader
|
46
|
+
# glDisableVertexAttribArray
|
47
|
+
# glEnableVertexAttribArray
|
48
|
+
# glGetActiveAttrib
|
49
|
+
# glGetActiveUniform
|
50
|
+
# glGetAttachedShaders
|
51
|
+
|
52
|
+
# glGetAttribLocation
|
53
|
+
# usage: glGetAttribLocation(program, String) -> Integer
|
54
|
+
|
55
|
+
# glGetProgramiv
|
56
|
+
def_glGetValues('Programi', :GLint, %w(object pname))
|
57
|
+
|
58
|
+
# glGetProgramInfoLog
|
59
|
+
def_glGetObjectInfoLog('Program')
|
60
|
+
|
61
|
+
# glGetShaderiv
|
62
|
+
def_glGetValues('Shaderi', :GLint, %w(object pname))
|
63
|
+
|
64
|
+
# glGetShaderInfoLog
|
65
|
+
def_glGetObjectInfoLog('Shader')
|
66
|
+
|
67
|
+
# glGetShaderSource
|
68
|
+
|
69
|
+
# glGetUniformLocation
|
70
|
+
#
|
71
|
+
# @param [Integer] program
|
72
|
+
# @param [String] name
|
73
|
+
# @return [Integer] the location of a uniform variable
|
74
|
+
def_wrapped('GetUniformLocation')
|
75
|
+
|
76
|
+
# Get
|
77
|
+
#
|
78
|
+
# @method glGetUniformfv
|
79
|
+
# @param [Integer] program
|
80
|
+
# @param [Integer] location
|
81
|
+
# @param [Integer] count
|
82
|
+
# @return [Array] float values
|
83
|
+
def_glGetValues('Uniformf', :GLfloat, %w(program location))
|
84
|
+
|
85
|
+
# glGetUniformiv
|
86
|
+
def_glGetValues('Uniformi', :GLint, %w(program location))
|
87
|
+
|
88
|
+
# glGetVertexAttribdv
|
89
|
+
def_glGetValues('VertexAttribd', :GLdouble, %w(index pname))
|
90
|
+
|
91
|
+
# glGetVertexAttribfv
|
92
|
+
def_glGetValues('VertexAttribf', :GLfloat, %w(index pname))
|
93
|
+
|
94
|
+
# glGetVertexAttribiv
|
95
|
+
def_glGetValues('VertexAttribi', :GLint, %w(index pname))
|
96
|
+
|
97
|
+
# glGetVertexAttribPointerv
|
98
|
+
def_glGetValues('VertexAttribPointer', :pointer, %w(index pname))
|
99
|
+
|
100
|
+
# glIsProgram
|
101
|
+
# glIsShader
|
102
|
+
# glLinkProgram
|
103
|
+
|
104
|
+
# glShaderSource
|
105
|
+
def glShaderSource(shader, codes)
|
106
|
+
codes = Array(codes)
|
107
|
+
FFI::MemoryPointer.new(:pointer, codes.count) { |ptr|
|
108
|
+
pointers = codes.map{|s| FFI::MemoryPointer.from_string(s) }
|
109
|
+
ptr.write_array_of_pointer(pointers)
|
110
|
+
super(shader, codes.count, ptr, nil)
|
111
|
+
}
|
112
|
+
end
|
113
|
+
|
114
|
+
# glUseProgram
|
115
|
+
# glUniform1f
|
116
|
+
# glUniform2f
|
117
|
+
# glUniform3f
|
118
|
+
# glUniform4f
|
119
|
+
# glUniform1i
|
120
|
+
# glUniform2i
|
121
|
+
# glUniform3i
|
122
|
+
# glUniform4i
|
123
|
+
# glUniform1fv
|
124
|
+
# glUniform2fv
|
125
|
+
# glUniform3fv
|
126
|
+
# glUniform4fv
|
127
|
+
# glUniform1iv
|
128
|
+
# glUniform2iv
|
129
|
+
# glUniform3iv
|
130
|
+
# glUniform4iv
|
131
|
+
# glUniformMatrix2fv
|
132
|
+
# glUniformMatrix3fv
|
133
|
+
# glUniformMatrix4fv
|
134
|
+
# glValidateProgram
|
135
|
+
# glVertexAttrib1d
|
136
|
+
# glVertexAttrib1dv
|
137
|
+
# glVertexAttrib1f
|
138
|
+
# glVertexAttrib1fv
|
139
|
+
# glVertexAttrib1s
|
140
|
+
# glVertexAttrib1sv
|
141
|
+
# glVertexAttrib2d
|
142
|
+
# glVertexAttrib2dv
|
143
|
+
# glVertexAttrib2f
|
144
|
+
# glVertexAttrib2fv
|
145
|
+
# glVertexAttrib2s
|
146
|
+
# glVertexAttrib2sv
|
147
|
+
# glVertexAttrib3d
|
148
|
+
# glVertexAttrib3dv
|
149
|
+
# glVertexAttrib3f
|
150
|
+
# glVertexAttrib3fv
|
151
|
+
# glVertexAttrib3s
|
152
|
+
# glVertexAttrib3sv
|
153
|
+
# glVertexAttrib4Nbv
|
154
|
+
# glVertexAttrib4Niv
|
155
|
+
# glVertexAttrib4Nsv
|
156
|
+
# glVertexAttrib4Nub
|
157
|
+
# glVertexAttrib4Nubv
|
158
|
+
# glVertexAttrib4Nuiv
|
159
|
+
# glVertexAttrib4Nusv
|
160
|
+
# glVertexAttrib4bv
|
161
|
+
# glVertexAttrib4d
|
162
|
+
# glVertexAttrib4dv
|
163
|
+
# glVertexAttrib4f
|
164
|
+
# glVertexAttrib4fv
|
165
|
+
# glVertexAttrib4iv
|
166
|
+
# glVertexAttrib4s
|
167
|
+
# glVertexAttrib4sv
|
168
|
+
# glVertexAttrib4ubv
|
169
|
+
# glVertexAttrib4uiv
|
170
|
+
# glVertexAttrib4usv
|
171
|
+
# glVertexAttribPointer
|
172
|
+
|
173
|
+
#
|
174
|
+
def glIsShaderCompiled?(shader)
|
175
|
+
glGetShaderiv(shader, Constants::GL_COMPILE_STATUS)[0] != 0
|
176
|
+
end
|
177
|
+
|
178
|
+
#
|
179
|
+
def glIsProgramLinked?(program)
|
180
|
+
glGetProgramiv(program, Constants::GL_LINK_STATUS)[0] != 0
|
181
|
+
end
|
182
|
+
|
183
|
+
end
|
184
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
module OpenGL
|
2
|
+
module Wrapper::GL_ARB_framebuffer_object
|
3
|
+
extend Wrapper::Base
|
4
|
+
|
5
|
+
# glIsRenderbuffer
|
6
|
+
# glBindRenderbuffer
|
7
|
+
|
8
|
+
# glDeleteRenderbuffers
|
9
|
+
def_glDeleteObjects 'Renderbuffers'
|
10
|
+
|
11
|
+
# glGenRenderbuffers
|
12
|
+
def_glGenObjects 'Renderbuffers'
|
13
|
+
|
14
|
+
# glRenderbufferStorage
|
15
|
+
|
16
|
+
# glGetRenderbufferParameteriv
|
17
|
+
def_glGetValues 'RenderbufferParameteri', :GLint, %w(target pname)
|
18
|
+
|
19
|
+
# glIsFramebuffer
|
20
|
+
# glBindFramebuffer
|
21
|
+
|
22
|
+
# glDeleteFramebuffers
|
23
|
+
def_glDeleteObjects 'Framebuffers'
|
24
|
+
|
25
|
+
# glGenFramebuffers
|
26
|
+
def_glGenObjects 'Framebuffers'
|
27
|
+
|
28
|
+
# glCheckFramebufferStatus
|
29
|
+
# glFramebufferTexture1D
|
30
|
+
# glFramebufferTexture2D
|
31
|
+
# glFramebufferTexture3D
|
32
|
+
# glFramebufferRenderbuffer
|
33
|
+
|
34
|
+
# glGetFramebufferAttachmentParameteriv
|
35
|
+
def_glGetValues 'FramebufferAttachmentParameteri', :GLint, %w(target pname)
|
36
|
+
|
37
|
+
# glGenerateMipmap
|
38
|
+
# glBlitFramebuffer
|
39
|
+
# glRenderbufferStorageMultisample
|
40
|
+
# glFramebufferTextureLayer
|
41
|
+
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module OpenGL
|
2
|
+
module Wrapper::GL_ARB_vertex_array_object
|
3
|
+
extend Wrapper::Base
|
4
|
+
|
5
|
+
# glBindVertexArray
|
6
|
+
|
7
|
+
# glDeleteVertexArrays
|
8
|
+
def_glDeleteObjects 'VertexArrays'
|
9
|
+
|
10
|
+
# glGenVertexArrays
|
11
|
+
def_glGenObjects 'VertexArrays'
|
12
|
+
|
13
|
+
# glIsVertexArray
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,87 @@
|
|
1
|
+
module OpenGL
|
2
|
+
module Wrapper::GL_VERSION_3_0
|
3
|
+
extend Wrapper::Base
|
4
|
+
|
5
|
+
# glColorMaski
|
6
|
+
|
7
|
+
# glGetBooleani_v
|
8
|
+
def_glGetValues('Booleani_', :GLboolean, %w(target index))
|
9
|
+
|
10
|
+
# glGetIntegeri_v
|
11
|
+
def_glGetValues('Integeri_', :GLint, %w(target index))
|
12
|
+
|
13
|
+
# glEnablei
|
14
|
+
# glDisablei
|
15
|
+
# glIsEnabledi
|
16
|
+
# glBeginTransformFeedback
|
17
|
+
# glEndTransformFeedback
|
18
|
+
# glBindBufferRange
|
19
|
+
# glBindBufferBase
|
20
|
+
# glTransformFeedbackVaryings
|
21
|
+
# glGetTransformFeedbackVarying
|
22
|
+
# glClampColor
|
23
|
+
# glBeginConditionalRender
|
24
|
+
# glEndConditionalRender
|
25
|
+
# glVertexAttribIPointer
|
26
|
+
|
27
|
+
# glGetVertexAttribIiv
|
28
|
+
def_glGetValues('VertexAttribIi', :GLint, %w(index pname))
|
29
|
+
|
30
|
+
# glGetVertexAttribIuiv
|
31
|
+
def_glGetValues('VertexAttribIui', :GLuint, %w(index pname))
|
32
|
+
|
33
|
+
# glVertexAttribI1i
|
34
|
+
# glVertexAttribI2i
|
35
|
+
# glVertexAttribI3i
|
36
|
+
# glVertexAttribI4i
|
37
|
+
# glVertexAttribI1ui
|
38
|
+
# glVertexAttribI2ui
|
39
|
+
# glVertexAttribI3ui
|
40
|
+
# glVertexAttribI4ui
|
41
|
+
# glVertexAttribI1iv
|
42
|
+
# glVertexAttribI2iv
|
43
|
+
# glVertexAttribI3iv
|
44
|
+
# glVertexAttribI4iv
|
45
|
+
# glVertexAttribI1uiv
|
46
|
+
# glVertexAttribI2uiv
|
47
|
+
# glVertexAttribI3uiv
|
48
|
+
# glVertexAttribI4uiv
|
49
|
+
# glVertexAttribI4bv
|
50
|
+
# glVertexAttribI4sv
|
51
|
+
# glVertexAttribI4ubv
|
52
|
+
# glVertexAttribI4usv
|
53
|
+
|
54
|
+
# glGetUniformuiv
|
55
|
+
def_glGetValues('Uniformui', :GLuint, %w(program location))
|
56
|
+
|
57
|
+
# glBindFragDataLocation
|
58
|
+
# glGetFragDataLocation
|
59
|
+
# glUniform1ui
|
60
|
+
# glUniform2ui
|
61
|
+
# glUniform3ui
|
62
|
+
# glUniform4ui
|
63
|
+
# glUniform1uiv
|
64
|
+
# glUniform2uiv
|
65
|
+
# glUniform3uiv
|
66
|
+
# glUniform4uiv
|
67
|
+
|
68
|
+
# glTexParameterIiv
|
69
|
+
def_glSetValues('TexParameterIi', :GLint, %w(target pname))
|
70
|
+
|
71
|
+
# glTexParameterIuiv
|
72
|
+
def_glSetValues('TexParameterIui', :GLuint, %w(target pname))
|
73
|
+
|
74
|
+
# glGetTexParameterIiv
|
75
|
+
def_glGetValues('TexParameterIi', :GLint, %w(target pname))
|
76
|
+
|
77
|
+
# glGetTexParameterIuiv
|
78
|
+
def_glGetValues('TexParameterIui', :GLuint, %w(target pname))
|
79
|
+
|
80
|
+
# glClearBufferiv
|
81
|
+
# glClearBufferuiv
|
82
|
+
# glClearBufferfv
|
83
|
+
# glClearBufferfi
|
84
|
+
# glGetStringi
|
85
|
+
|
86
|
+
end
|
87
|
+
end
|