Changeset 523 for branches/Derelict2/DerelictGL/derelict/opengl
- Timestamp:
- 12/08/10 08:41:04 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/Derelict2/DerelictGL/derelict/opengl/gl.d
r522 r523 80 80 GL30 = 30, 81 81 GL31 = 31, 82 MaxModern = 31, 83 HighestSupported = 31 82 GL32 = 32, 83 GL33 = 33, 84 GL40 = 40, 85 MaxModern = 40, 86 HighestSupported = 40 84 87 } 85 88 … … 99 102 { 100 103 string verstr = toDString(glGetString(GL_VERSION)); 101 if(verstr.findStr("3.1") == 0) 104 if(verstr.findStr("4.0") == 0) 105 return GLVersion.GL40; 106 else if(verstr.findStr("3.3") == 0) 107 return GLVersion.GL33; 108 else if(verstr.findStr("3.2") == 0) 109 return GLVersion.GL32; 110 else if(verstr.findStr("3.1") == 0) 102 111 return GLVersion.GL31; 103 112 else if(verstr.findStr("3.0") == 0) … … 565 574 _maxVersion = GLVersion.GL31; 566 575 } 576 577 if(maxAvail >= GLVersion.GL32) 578 { 579 bindExtendedFunc(cast(void**)&glFramebufferTexture, "glFramebufferTexture", doThrow); 580 bindExtendedFunc(cast(void**)&glGetBufferParameteri64v, "glGetBufferParameteri64v", doThrow); 581 bindExtendedFunc(cast(void**)&glGetInteger64i_v, "glGetInteger64i_v", doThrow); 582 583 _maxVersion = GLVersion.GL32; 584 } 585 586 if(maxAvail >= GLVersion.GL33) 587 { 588 bindExtendedFunc(cast(void**)&glVertexAttribDivisor, "glVertexAttribDivisor", doThrow); 589 590 _maxVersion = GLVersion.GL33; 591 } 592 593 if(maxAvail >= GLVersion.GL40) 594 { 595 bindExtendedFunc(cast(void**)&glBlendEquationSeparatei, "glBlendEquationSeparatei", doThrow); 596 bindExtendedFunc(cast(void**)&glBlendEquationi, "glBlendEquationi", doThrow); 597 bindExtendedFunc(cast(void**)&glBlendFuncSeparatei, "glBlendFuncSeparatei", doThrow); 598 bindExtendedFunc(cast(void**)&glBlendFunci, "glBlendFunci", doThrow); 599 bindExtendedFunc(cast(void**)&glMinSampleShading, "glMinSampleShading", doThrow); 600 601 _maxVersion = GLVersion.GL40; 602 } 567 603 568 604 return _maxVersion; … … 573 609 switch(ver) 574 610 { 611 case GLVersion.GL40: 612 return "OpenGL Version 4.0"; 613 case GLVersion.GL33: 614 return "OpenGL Version 3.3"; 615 case GLVersion.GL32: 616 return "OpenGL Version 3.2"; 575 617 case GLVersion.GL31: 576 618 return "OpenGL Version 3.1"; branches/Derelict2/DerelictGL/derelict/opengl/glfuncs.d
r522 r523 675 675 void function(GLuint) glPrimitiveRestartIndex; 676 676 void function(GLenum, GLenum, GLuint) glTexBuffer; 677 678 // gl 3.2 679 void function(GLenum, GLenum, GLuint, GLuint) glFramebufferTexture; 680 void function(GLenum, GLenum, GLint64*) glGetBufferParameteri64v; 681 void function(GLenum, GLuint, GLint64*) glGetInteger64i_v; 682 683 // gl 3.3 684 void function(GLuint, GLuint) glVertexAttribDivisor; 685 686 // gl 4.0 687 void function(GLuint, GLenum, GLenum) glBlendEquationSeparatei; 688 void function(GLuint, GLenum) glBlendEquationi; 689 void function(GLuint, GLenum, GLenum, GLenum, GLenum) glBlendFuncSeparatei; 690 void function(GLuint, GLenum, GLenum) glBlendFunci; 691 void function(GLclampf) glMinSampleShading; 692 677 693 "); 678 694 } branches/Derelict2/DerelictGL/derelict/opengl/gltypes.d
r522 r523 1197 1197 GL_BUFFER_MAP_OFFSET = 0x9121, 1198 1198 } 1199 1200 // gl 3.2 1201 alias long GLint64; 1202 1203 enum : int 1204 { 1205 GL_CONTEXT_CORE_PROFILE_BIT = 0x00000001, 1206 GL_CONTEXT_COMPATIBILITY_PROFILE_BIT = 0x00000002, 1207 } 1208 1209 enum : GLenum 1210 { 1211 GL_LINES_ADJACENCY = 0x000A, 1212 GL_LINE_STRIP_ADJACENCY = 0x000B, 1213 GL_TRIANGLES_ADJACENCY = 0x000C, 1214 GL_TRIANGLE_STRIP_ADJACENCY = 0x000D, 1215 GL_PROGRAM_POINT_SIZE = 0x8642, 1216 GL_GEOMETRY_VERTICES_OUT = 0x8916, 1217 GL_GEOMETRY_INPUT_TYPE = 0x8917, 1218 GL_GEOMETRY_OUTPUT_TYPE = 0x8918, 1219 GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS = 0x8C29, 1220 GL_FRAMEBUFFER_ATTACHMENT_LAYERED = 0x8DA7, 1221 GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS = 0x8DA8, 1222 GL_GEOMETRY_SHADER = 0x8DD9, 1223 GL_MAX_GEOMETRY_UNIFORM_COMPONENTS = 0x8DDF, 1224 GL_MAX_GEOMETRY_OUTPUT_VERTICES = 0x8DE0, 1225 GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS = 0x8DE1, 1226 GL_MAX_VERTEX_OUTPUT_COMPONENTS = 0x9122, 1227 GL_MAX_GEOMETRY_INPUT_COMPONENTS = 0x9123, 1228 GL_MAX_GEOMETRY_OUTPUT_COMPONENTS = 0x9124, 1229 GL_MAX_FRAGMENT_INPUT_COMPONENTS = 0x9125, 1230 GL_CONTEXT_PROFILE_MASK = 0x9126, 1231 } 1232 1233 // gl 3.3 1234 enum : GLenum 1235 { 1236 GL_VERTEX_ATTRIB_ARRAY_DIVISOR = 0x88FE, 1237 GL_ANY_SAMPLES_PASSED = 0x8C2F, 1238 GL_TEXTURE_SWIZZLE_R = 0x8E42, 1239 GL_TEXTURE_SWIZZLE_G = 0x8E43, 1240 GL_TEXTURE_SWIZZLE_B = 0x8E44, 1241 GL_TEXTURE_SWIZZLE_A = 0x8E45, 1242 GL_TEXTURE_SWIZZLE_RGBA = 0x8E46, 1243 GL_RGB10_A2UI = 0x906F, 1244 } 1245 1246 // gl 4.0 1247 enum : GLenum 1248 { 1249 GL_GEOMETRY_SHADER_INVOCATIONS = 0x887F, 1250 GL_SAMPLE_SHADING = 0x8C36, 1251 GL_MIN_SAMPLE_SHADING_VALUE = 0x8C37, 1252 GL_MAX_GEOMETRY_SHADER_INVOCATIONS = 0x8E5A, 1253 GL_MIN_FRAGMENT_INTERPOLATION_OFFSET = 0x8E5B, 1254 GL_MAX_FRAGMENT_INTERPOLATION_OFFSET = 0x8E5C, 1255 GL_FRAGMENT_INTERPOLATION_OFFSET_BITS = 0x8E5D, 1256 GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET = 0x8E5E, 1257 GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET = 0x8E5F, 1258 GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS = 0x8F9F, 1259 GL_TEXTURE_CUBE_MAP_ARRAY = 0x9009, 1260 GL_TEXTURE_BINDING_CUBE_MAP_ARRAY = 0x900A, 1261 GL_PROXY_TEXTURE_CUBE_MAP_ARRAY = 0x900B, 1262 GL_SAMPLER_CUBE_MAP_ARRAY = 0x900C, 1263 GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW = 0x900D, 1264 GL_INT_SAMPLER_CUBE_MAP_ARRAY = 0x900E, 1265 GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY = 0x900F, 1266 }
