From 08e19bc2b4eba572bc7699378cf55cd8772ac67e Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 28 Oct 2016 20:03:54 +0300 Subject: [PATCH] Use ARB_direct_state_access to avoid some bind calls --- extensions/arb_direct_state_access.glext | 1 + gl.xml | 3965 +++++++++++++++++++--- source/buffer.cpp | 44 +- source/bufferable.cpp | 5 +- source/framebuffer.cpp | 76 +- source/framebuffer.h | 4 +- source/programdata.cpp | 3 +- source/renderbuffer.cpp | 24 +- source/texture.cpp | 46 +- source/texture.h | 2 + source/texture1d.cpp | 18 +- source/texture2d.cpp | 18 +- source/texture3d.cpp | 18 +- 13 files changed, 3639 insertions(+), 585 deletions(-) create mode 100644 extensions/arb_direct_state_access.glext diff --git a/extensions/arb_direct_state_access.glext b/extensions/arb_direct_state_access.glext new file mode 100644 index 00000000..c96a2f04 --- /dev/null +++ b/extensions/arb_direct_state_access.glext @@ -0,0 +1 @@ +extension ARB_direct_state_access diff --git a/gl.xml b/gl.xml index e3f65703..333cd994 100644 --- a/gl.xml +++ b/gl.xml @@ -1,7 +1,7 @@ -Copyright (c) 2013-2014 The Khronos Group Inc. +Copyright (c) 2013-2016 The Khronos Group Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and/or associated documentation files (the @@ -142,6 +142,11 @@ typedef unsigned int GLhandleARB; typedef khronos_intptr_t GLintptr; typedef khronos_ssize_t GLsizeiptr; + + typedef khronos_uint8_t GLubyte; + typedef khronos_float_t GLfloat; + typedef khronos_intptr_t GLintptr; + typedef khronos_ssize_t GLsizeiptr; typedef void ( *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,void *userParam); typedef unsigned short GLhalfNV; @@ -330,6 +335,7 @@ typedef unsigned int GLhandleARB; + @@ -2058,8 +2064,10 @@ typedef unsigned int GLhandleARB; - + + + @@ -2081,10 +2089,15 @@ typedef unsigned int GLhandleARB; + + + + + @@ -2115,6 +2128,7 @@ typedef unsigned int GLhandleARB; + @@ -2140,10 +2154,13 @@ typedef unsigned int GLhandleARB; + + + @@ -2285,10 +2302,26 @@ typedef unsigned int GLhandleARB; - - - - + + + + + + + + + + + + + + + + + + + + @@ -2297,14 +2330,6 @@ typedef unsigned int GLhandleARB; - - - - - - - - @@ -2356,6 +2381,20 @@ typedef unsigned int GLhandleARB; + + + + + + + + + + + + + + + @@ -4084,7 +4174,9 @@ typedef unsigned int GLhandleARB; + + @@ -4285,7 +4377,8 @@ typedef unsigned int GLhandleARB; - + + @@ -4310,13 +4403,14 @@ typedef unsigned int GLhandleARB; - - - - - - - + + + + + + + + @@ -4778,6 +4872,7 @@ typedef unsigned int GLhandleARB; + @@ -5695,8 +5790,10 @@ typedef unsigned int GLhandleARB; + + @@ -5721,6 +5818,7 @@ typedef unsigned int GLhandleARB; + @@ -5890,9 +5988,13 @@ typedef unsigned int GLhandleARB; + + + + @@ -5922,10 +6024,13 @@ typedef unsigned int GLhandleARB; + + + @@ -6101,6 +6206,7 @@ typedef unsigned int GLhandleARB; + @@ -6108,6 +6214,7 @@ typedef unsigned int GLhandleARB; + @@ -6316,7 +6423,7 @@ typedef unsigned int GLhandleARB; - + @@ -6324,7 +6431,7 @@ typedef unsigned int GLhandleARB; - + @@ -6336,7 +6443,11 @@ typedef unsigned int GLhandleARB; - + + + + + @@ -6391,20 +6502,26 @@ typedef unsigned int GLhandleARB; + + + + + + @@ -6418,17 +6535,17 @@ typedef unsigned int GLhandleARB; - + - + - + - + @@ -6507,6 +6624,7 @@ typedef unsigned int GLhandleARB; + @@ -6533,9 +6651,7 @@ typedef unsigned int GLhandleARB; - - + @@ -6688,7 +6804,22 @@ typedef unsigned int GLhandleARB; - + + + + + + + + + + + + + + + + @@ -6854,9 +6985,11 @@ typedef unsigned int GLhandleARB; + + @@ -6885,6 +7018,7 @@ typedef unsigned int GLhandleARB; + @@ -6915,6 +7049,7 @@ typedef unsigned int GLhandleARB; + @@ -6931,9 +7066,11 @@ typedef unsigned int GLhandleARB; + + @@ -6947,12 +7084,15 @@ typedef unsigned int GLhandleARB; + + + @@ -7006,8 +7146,10 @@ typedef unsigned int GLhandleARB; + + @@ -7052,12 +7194,15 @@ typedef unsigned int GLhandleARB; + + + @@ -7074,6 +7219,7 @@ typedef unsigned int GLhandleARB; + @@ -7094,54 +7240,77 @@ typedef unsigned int GLhandleARB; + + + + + + + + + + + + + + + + + + + + + + + @@ -7178,7 +7347,14 @@ typedef unsigned int GLhandleARB; - + + + + + + + + @@ -7287,9 +7463,13 @@ typedef unsigned int GLhandleARB; + + + + @@ -7305,7 +7485,10 @@ typedef unsigned int GLhandleARB; - + + + + @@ -7321,8 +7504,11 @@ typedef unsigned int GLhandleARB; + + + @@ -7332,8 +7518,11 @@ typedef unsigned int GLhandleARB; + + + @@ -7360,23 +7549,29 @@ typedef unsigned int GLhandleARB; + + + + + + @@ -7445,12 +7640,14 @@ typedef unsigned int GLhandleARB; + + @@ -7467,12 +7664,14 @@ typedef unsigned int GLhandleARB; + + @@ -7489,12 +7688,14 @@ typedef unsigned int GLhandleARB; + + @@ -7591,10 +7792,13 @@ typedef unsigned int GLhandleARB; + + + @@ -7606,10 +7810,13 @@ typedef unsigned int GLhandleARB; + + + @@ -7693,8 +7900,10 @@ typedef unsigned int GLhandleARB; + + @@ -7718,7 +7927,13 @@ typedef unsigned int GLhandleARB; - + + + + + + + @@ -7773,35 +7988,52 @@ typedef unsigned int GLhandleARB; + + + + + - + + + + + + + + + - + + + + + @@ -7810,7 +8042,17 @@ typedef unsigned int GLhandleARB; - + + + + + + + + + + + @@ -7824,9 +8066,9 @@ typedef unsigned int GLhandleARB; - - - + + + @@ -7881,28 +8123,39 @@ typedef unsigned int GLhandleARB; + + + + + + + + + + + @@ -7915,20 +8168,29 @@ typedef unsigned int GLhandleARB; + + + + - + + + + + + @@ -7945,19 +8207,25 @@ typedef unsigned int GLhandleARB; + + + + + + @@ -7978,6 +8246,7 @@ typedef unsigned int GLhandleARB; + @@ -8011,26 +8280,32 @@ typedef unsigned int GLhandleARB; + + + + + + @@ -8051,12 +8326,19 @@ typedef unsigned int GLhandleARB; + + + + + + + @@ -8067,14 +8349,27 @@ typedef unsigned int GLhandleARB; - + + + + + + + + + + + + + - + + @@ -8084,12 +8379,27 @@ typedef unsigned int GLhandleARB; - + + + + + + + + + + + + - + + + + + @@ -8104,19 +8414,33 @@ typedef unsigned int GLhandleARB; + + + + + + + + + + + + + + @@ -8130,19 +8454,33 @@ typedef unsigned int GLhandleARB; + + + + + + + + + + + + + + @@ -8188,6 +8526,43 @@ typedef unsigned int GLhandleARB; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + @@ -8367,6 +8742,9 @@ typedef unsigned int GLhandleARB; GLenum func GLfixed ref + + void glApplyFramebufferAttachmentCMAAINTEL + void glApplyTextureEXT GLenum mode @@ -8626,6 +9004,14 @@ typedef unsigned int GLhandleARB; GLuint index const GLchar *name + + void glBindFragDataLocationIndexedEXT + GLuint program + GLuint colorNumber + GLuint index + const GLchar *name + + void glBindFragmentShaderATI GLuint id @@ -8918,11 +9304,16 @@ typedef unsigned int GLhandleARB; GLfixed ymove const GLubyte *bitmap + + void glBlendBarrier + void glBlendBarrierKHR + void glBlendBarrierNV + void glBlendColor @@ -9014,6 +9405,13 @@ typedef unsigned int GLhandleARB; GLenum modeAlpha + + void glBlendEquationSeparateiOES + GLuint buf + GLenum modeRGB + GLenum modeAlpha + + void glBlendEquationi GLuint buf @@ -9031,6 +9429,12 @@ typedef unsigned int GLhandleARB; GLenum mode + + void glBlendEquationiOES + GLuint buf + GLenum mode + + void glBlendFunc GLenum sfactor @@ -9112,6 +9516,15 @@ typedef unsigned int GLhandleARB; GLenum dstAlpha + + void glBlendFuncSeparateiOES + GLuint buf + GLenum srcRGB + GLenum dstRGB + GLenum srcAlpha + GLenum dstAlpha + + void glBlendFunci GLuint buf @@ -9132,6 +9545,13 @@ typedef unsigned int GLhandleARB; GLenum dst + + void glBlendFunciOES + GLuint buf + GLenum src + GLenum dst + + void glBlendParameteriNV GLenum pname @@ -9250,6 +9670,14 @@ typedef unsigned int GLhandleARB; const void *data GLbitfield flags + + void glBufferStorageEXT + GLenum target + GLsizeiptr size + const void *data + GLbitfield flags + + void glBufferSubData GLenum target @@ -9265,6 +9693,10 @@ typedef unsigned int GLhandleARB; const void *data + + void glCallCommandListNV + GLuint list + void glCallList GLuint list @@ -9470,7 +9902,7 @@ typedef unsigned int GLhandleARB; GLuint buffer GLenum internalformat GLintptr offset - GLsizei size + GLsizeiptr size GLenum format GLenum type const void *data @@ -9489,7 +9921,8 @@ typedef unsigned int GLhandleARB; void glClearNamedFramebufferfi GLuint framebuffer GLenum buffer - const GLfloat depth + GLint drawbuffer + GLfloat depth GLint stencil @@ -9513,6 +9946,12 @@ typedef unsigned int GLhandleARB; GLint drawbuffer const GLuint *value + + void glClearPixelLocalStorageuiEXT + GLsizei offset + GLsizei n + const GLuint *values + void glClearStencil GLint s @@ -9526,6 +9965,15 @@ typedef unsigned int GLhandleARB; GLenum type const void *data + + void glClearTexImageEXT + GLuint texture + GLint level + GLenum format + GLenum type + const void *data + + void glClearTexSubImage GLuint texture @@ -9540,6 +9988,21 @@ typedef unsigned int GLhandleARB; GLenum type const void *data + + void glClearTexSubImageEXT + GLuint texture + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLenum format + GLenum type + const void *data + + void glClientActiveTexture GLenum texture @@ -10006,6 +10469,15 @@ typedef unsigned int GLhandleARB; GLboolean a + + void glColorMaskiOES + GLuint index + GLboolean r + GLboolean g + GLboolean b + GLboolean a + + void glColorMaterial GLenum face @@ -10198,6 +10670,15 @@ typedef unsigned int GLhandleARB; GLenum pname const GLfloat *params + + void glCommandListSegmentsNV + GLuint list + GLuint segments + + + void glCompileCommandListNV + GLuint list + void glCompileShader GLuint shader @@ -10590,6 +11071,16 @@ typedef unsigned int GLhandleARB; GLsizei imageSize const void *bits + + void glConservativeRasterParameterfNV + GLenum pname + GLfloat value + + + void glConservativeRasterParameteriNV + GLenum pname + GLint param + void glConvolutionFilter1D GLenum target @@ -10858,6 +11349,25 @@ typedef unsigned int GLhandleARB; GLsizei depth + + void glCopyImageSubDataOES + GLuint srcName + GLenum srcTarget + GLint srcLevel + GLint srcX + GLint srcY + GLint srcZ + GLuint dstName + GLenum dstTarget + GLint dstLevel + GLint dstX + GLint dstY + GLint dstZ + GLsizei srcWidth + GLsizei srcHeight + GLsizei srcDepth + + void glCopyMultiTexImage1DEXT GLenum texunit @@ -10922,7 +11432,7 @@ typedef unsigned int GLhandleARB; GLuint writeBuffer GLintptr readOffset GLintptr writeOffset - GLsizei size + GLsizeiptr size void glCopyPathNV @@ -11203,6 +11713,15 @@ typedef unsigned int GLhandleARB; void glCoverageMaskNV GLboolean mask + + void glCoverageModulationNV + GLenum components + + + void glCoverageModulationTableNV + GLsizei n + const GLfloat *v + void glCoverageOperationNV GLenum operation @@ -11212,6 +11731,11 @@ typedef unsigned int GLhandleARB; GLsizei n GLuint *buffers + + void glCreateCommandListsNV + GLsizei n + GLuint *lists + void glCreateFramebuffers GLsizei n @@ -11276,6 +11800,11 @@ typedef unsigned int GLhandleARB; GLsizei count const GLchar **strings + + void glCreateStatesNV + GLsizei n + GLuint *states + GLsync glCreateSyncFromCLeventARB struct _cl_context *context @@ -11475,6 +12004,11 @@ typedef unsigned int GLhandleARB; const GLuint *buffers + + void glDeleteCommandListsNV + GLsizei n + const GLuint *lists + void glDeleteFencesAPPLE GLsizei n @@ -11621,6 +12155,11 @@ typedef unsigned int GLhandleARB; GLuint shader + + void glDeleteStatesNV + GLsizei n + const GLuint *states + void glDeleteSync GLsync sync @@ -11703,6 +12242,18 @@ typedef unsigned int GLhandleARB; GLdouble far + + void glDepthRangeArrayfvNV + GLuint first + GLsizei count + const GLfloat *v + + + void glDepthRangeArrayfvOES + GLuint first + GLsizei count + const GLfloat *v + void glDepthRangeArrayv GLuint first @@ -11715,6 +12266,18 @@ typedef unsigned int GLhandleARB; GLdouble n GLdouble f + + void glDepthRangeIndexedfNV + GLuint index + GLfloat n + GLfloat f + + + void glDepthRangeIndexedfOES + GLuint index + GLfloat n + GLfloat f + void glDepthRangedNV GLdouble zNear @@ -11834,6 +12397,18 @@ typedef unsigned int GLhandleARB; GLuint index + + void glDisableiNV + GLenum target + GLuint index + + + + void glDisableiOES + GLenum target + GLuint index + + void glDiscardFramebufferEXT GLenum target @@ -11910,6 +12485,15 @@ typedef unsigned int GLhandleARB; GLsizei instancecount GLuint baseinstance + + void glDrawArraysInstancedBaseInstanceEXT + GLenum mode + GLint first + GLsizei count + GLsizei instancecount + GLuint baseinstance + + void glDrawArraysInstancedEXT GLenum mode @@ -11967,6 +12551,38 @@ typedef unsigned int GLhandleARB; GLsizei n const GLenum *bufs + + void glDrawCommandsAddressNV + GLenum primitiveMode + const GLuint64 *indirects + const GLsizei *sizes + GLuint count + + + void glDrawCommandsNV + GLenum primitiveMode + GLuint buffer + const GLintptr *indirects + const GLsizei *sizes + GLuint count + + + void glDrawCommandsStatesAddressNV + const GLuint64 *indirects + const GLsizei *sizes + const GLuint *states + const GLuint *fbos + GLuint count + + + void glDrawCommandsStatesNV + GLuint buffer + const GLintptr *indirects + const GLsizei *sizes + const GLuint *states + const GLuint *fbos + GLuint count + void glDrawElementArrayAPPLE GLenum mode @@ -11993,6 +12609,24 @@ typedef unsigned int GLhandleARB; const void *indices GLint basevertex + + void glDrawElementsBaseVertexEXT + GLenum mode + GLsizei count + GLenum type + const void *indices + GLint basevertex + + + + void glDrawElementsBaseVertexOES + GLenum mode + GLsizei count + GLenum type + const void *indices + GLint basevertex + + void glDrawElementsIndirect GLenum mode @@ -12034,6 +12668,16 @@ typedef unsigned int GLhandleARB; GLsizei instancecount GLuint baseinstance + + void glDrawElementsInstancedBaseInstanceEXT + GLenum mode + GLsizei count + GLenum type + const void *indices + GLsizei instancecount + GLuint baseinstance + + void glDrawElementsInstancedBaseVertex GLenum mode @@ -12053,6 +12697,37 @@ typedef unsigned int GLhandleARB; GLint basevertex GLuint baseinstance + + void glDrawElementsInstancedBaseVertexBaseInstanceEXT + GLenum mode + GLsizei count + GLenum type + const void *indices + GLsizei instancecount + GLint basevertex + GLuint baseinstance + + + + void glDrawElementsInstancedBaseVertexEXT + GLenum mode + GLsizei count + GLenum type + const void *indices + GLsizei instancecount + GLint basevertex + + + + void glDrawElementsInstancedBaseVertexOES + GLenum mode + GLsizei count + GLenum type + const void *indices + GLsizei instancecount + GLint basevertex + + void glDrawElementsInstancedEXT GLenum mode @@ -12122,6 +12797,28 @@ typedef unsigned int GLhandleARB; const void *indices GLint basevertex + + void glDrawRangeElementsBaseVertexEXT + GLenum mode + GLuint start + GLuint end + GLsizei count + GLenum type + const void *indices + GLint basevertex + + + + void glDrawRangeElementsBaseVertexOES + GLenum mode + GLuint start + GLuint end + GLsizei count + GLenum type + const void *indices + GLint basevertex + + void glDrawRangeElementsEXT GLenum mode @@ -12199,12 +12896,25 @@ typedef unsigned int GLhandleARB; GLenum mode GLuint id + + void glDrawTransformFeedbackEXT + GLenum mode + GLuint id + + void glDrawTransformFeedbackInstanced GLenum mode GLuint id GLsizei instancecount + + void glDrawTransformFeedbackInstancedEXT + GLenum mode + GLuint id + GLsizei instancecount + + void glDrawTransformFeedbackNV GLenum mode @@ -12348,6 +13058,18 @@ typedef unsigned int GLhandleARB; GLuint index + + void glEnableiNV + GLenum target + GLuint index + + + + void glEnableiOES + GLenum target + GLuint index + + void glEnd @@ -12514,6 +13236,9 @@ typedef unsigned int GLhandleARB; GLint j + + void glEvaluateDepthValuesARB + void glExecuteProgramNV GLenum target @@ -12692,7 +13417,7 @@ typedef unsigned int GLhandleARB; void glFlushMappedNamedBufferRange GLuint buffer GLintptr offset - GLsizei length + GLsizeiptr length void glFlushMappedNamedBufferRangeEXT @@ -12854,6 +13579,10 @@ typedef unsigned int GLhandleARB; GLenum face GLenum mode + + void glFragmentCoverageColorNV + GLuint color + void glFragmentLightModelfSGIX GLenum pname @@ -12947,6 +13676,11 @@ typedef unsigned int GLhandleARB; GLenum pname GLint param + + void glFramebufferPixelLocalStorageSizeEXT + GLuint target + GLsizei size + void glFramebufferReadBufferEXT GLuint framebuffer @@ -12976,6 +13710,20 @@ typedef unsigned int GLhandleARB; GLenum renderbuffertarget GLuint renderbuffer + + void glFramebufferSampleLocationsfvARB + GLenum target + GLuint start + GLsizei count + const GLfloat *v + + + void glFramebufferSampleLocationsfvNV + GLenum target + GLuint start + GLsizei count + const GLfloat *v + void glFramebufferTexture GLenum target @@ -13021,6 +13769,16 @@ typedef unsigned int GLhandleARB; + + void glFramebufferTexture2DDownsampleIMG + GLenum target + GLenum attachment + GLenum textarget + GLuint texture + GLint level + GLint xscale + GLint yscale + void glFramebufferTexture2DMultisampleEXT GLenum target @@ -13092,7 +13850,7 @@ typedef unsigned int GLhandleARB; GLenum attachment GLuint texture GLint level - + void glFramebufferTextureFaceARB @@ -13138,6 +13896,43 @@ typedef unsigned int GLhandleARB; GLint layer + + void glFramebufferTextureLayerDownsampleIMG + GLenum target + GLenum attachment + GLuint texture + GLint level + GLint layer + GLint xscale + GLint yscale + + + void glFramebufferTextureMultisampleMultiviewOVR + GLenum target + GLenum attachment + GLuint texture + GLint level + GLsizei samples + GLint baseViewIndex + GLsizei numViews + + + void glFramebufferTextureMultiviewOVR + GLenum target + GLenum attachment + GLuint texture + GLint level + GLint baseViewIndex + GLsizei numViews + + + void glFramebufferTextureOES + GLenum target + GLenum attachment + GLuint texture + GLint level + + void glFreeObjectBufferATI GLuint buffer @@ -13777,6 +14572,11 @@ typedef unsigned int GLhandleARB; GLenum pname GLfloat *params + + GLuint glGetCommandHeaderNV + GLenum tokenID + GLuint size + void glGetCompressedMultiTexImageEXT GLenum texunit @@ -13878,6 +14678,11 @@ typedef unsigned int GLhandleARB; GLenum pname GLfixed *params + + void glGetCoverageModulationTableNV + GLsizei bufsize + GLfloat *v + GLuint glGetDebugMessageLog GLuint count @@ -14027,6 +14832,20 @@ typedef unsigned int GLhandleARB; GLfloat *params + + void glGetFloati_vNV + GLenum target + GLuint index + GLfloat *data + + + + void glGetFloati_vOES + GLenum target + GLuint index + GLfloat *data + + void glGetFloatv GLenum pname @@ -14042,6 +14861,12 @@ typedef unsigned int GLhandleARB; GLuint program const GLchar *name + + GLint glGetFragDataIndexEXT + GLuint program + const GLchar *name + + GLint glGetFragDataLocation GLuint program @@ -14113,6 +14938,10 @@ typedef unsigned int GLhandleARB; GLenum pname GLint *params + + GLsizei glGetFramebufferPixelLocalStorageSizeEXT + GLuint target + GLenum glGetGraphicsResetStatus @@ -14275,6 +15104,15 @@ typedef unsigned int GLhandleARB; GLint *data + + void glGetInternalformatSampleivNV + GLenum target + GLenum internalformat + GLsizei samples + GLenum pname + GLsizei bufSize + GLint *params + void glGetInternalformati64v GLenum target @@ -14654,7 +15492,7 @@ typedef unsigned int GLhandleARB; void glGetNamedBufferSubData GLuint buffer GLintptr offset - GLsizei size + GLsizeiptr size void *data @@ -15258,6 +16096,12 @@ typedef unsigned int GLhandleARB; GLenum programInterface const GLchar *name + + GLint glGetProgramResourceLocationIndexEXT + GLuint program + GLenum programInterface + const GLchar *name + void glGetProgramResourceName GLuint program @@ -15493,6 +16337,13 @@ typedef unsigned int GLhandleARB; GLint *params + + void glGetSamplerParameterIivOES + GLuint sampler + GLenum pname + GLint *params + + void glGetSamplerParameterIuiv GLuint sampler @@ -15506,6 +16357,13 @@ typedef unsigned int GLhandleARB; GLuint *params + + void glGetSamplerParameterIuivOES + GLuint sampler + GLenum pname + GLuint *params + + void glGetSamplerParameterfv GLuint sampler @@ -15582,6 +16440,10 @@ typedef unsigned int GLhandleARB; GLfloat *points + + GLushort glGetStageIndexNV + GLenum shadertype + const GLubyte *glGetString GLenum name @@ -15750,6 +16612,13 @@ typedef unsigned int GLhandleARB; GLint *params + + void glGetTexParameterIivOES + GLenum target + GLenum pname + GLint *params + + void glGetTexParameterIuiv GLenum target @@ -15764,6 +16633,13 @@ typedef unsigned int GLhandleARB; GLuint *params + + void glGetTexParameterIuivOES + GLenum target + GLenum pname + GLuint *params + + void glGetTexParameterPointervAPPLE GLenum target @@ -15800,6 +16676,11 @@ typedef unsigned int GLhandleARB; GLuint64 glGetTextureHandleARB GLuint texture + + GLuint64 glGetTextureHandleIMG + GLuint texture + + GLuint64 glGetTextureHandleNV GLuint texture @@ -15909,6 +16790,12 @@ typedef unsigned int GLhandleARB; GLuint texture GLuint sampler + + GLuint64 glGetTextureSamplerHandleIMG + GLuint texture + GLuint sampler + + GLuint64 glGetTextureSamplerHandleNV GLuint texture @@ -16049,6 +16936,12 @@ typedef unsigned int GLhandleARB; GLfloat *params + + void glGetUniformi64vARB + GLuint program + GLint location + GLint64 *params + void glGetUniformi64vNV GLuint program @@ -16068,6 +16961,12 @@ typedef unsigned int GLhandleARB; GLint *params + + void glGetUniformui64vARB + GLuint program + GLint location + GLuint64 *params + void glGetUniformui64vNV GLuint program @@ -16637,6 +17536,13 @@ typedef unsigned int GLhandleARB; GLfloat *params + + void glGetnUniformi64vARB + GLuint program + GLint location + GLsizei bufSize + GLint64 *params + void glGetnUniformiv GLuint program @@ -16666,6 +17572,13 @@ typedef unsigned int GLhandleARB; GLint *params + + void glGetnUniformui64vARB + GLuint program + GLint location + GLsizei bufSize + GLuint64 *params + void glGetnUniformuiv GLuint program @@ -16991,6 +17904,10 @@ typedef unsigned int GLhandleARB; GLboolean glIsBufferResidentNV GLenum target + + GLboolean glIsCommandListNV + GLuint list + GLboolean glIsEnabled GLenum cap @@ -17013,6 +17930,18 @@ typedef unsigned int GLhandleARB; GLuint index + + GLboolean glIsEnablediNV + GLenum target + GLuint index + + + + GLboolean glIsEnablediOES + GLenum target + GLuint index + + GLboolean glIsFenceAPPLE GLuint fence @@ -17151,6 +18080,10 @@ typedef unsigned int GLhandleARB; GLuint shader + + GLboolean glIsStateNV + GLuint state + GLboolean glIsSync GLsync sync @@ -17353,6 +18286,16 @@ typedef unsigned int GLhandleARB; GLuint base + + void glListDrawCommandsStatesClientNV + GLuint list + GLuint segment + const void **indirects + const GLsizei *sizes + const GLuint *states + const GLuint *fbos + GLuint count + void glListParameterfSGIX GLuint list @@ -17685,7 +18628,7 @@ typedef unsigned int GLhandleARB; void *glMapNamedBufferRange GLuint buffer GLintptr offset - GLsizei length + GLsizeiptr length GLbitfield access @@ -18002,6 +18945,10 @@ typedef unsigned int GLhandleARB; GLfloat y GLfloat z + + void glMaxShaderCompilerThreadsARB + GLuint count + void glMemoryBarrier GLbitfield barriers @@ -18139,6 +19086,14 @@ typedef unsigned int GLhandleARB; GLsizei maxdrawcount GLsizei stride + + void glMultiDrawArraysIndirectEXT + GLenum mode + const void *indirect + GLsizei drawcount + GLsizei stride + + void glMultiDrawElementArrayAPPLE GLenum mode @@ -18163,6 +19118,26 @@ typedef unsigned int GLhandleARB; GLsizei drawcount const GLint *basevertex + + void glMultiDrawElementsBaseVertexEXT + GLenum mode + const GLsizei *count + GLenum type + const void *const*indices + GLsizei primcount + const GLint *basevertex + + + + void glMultiDrawElementsBaseVertexOES + GLenum mode + const GLsizei *count + GLenum type + const void *const*indices + GLsizei primcount + const GLint *basevertex + + void glMultiDrawElementsEXT GLenum mode @@ -18217,6 +19192,15 @@ typedef unsigned int GLhandleARB; GLsizei maxdrawcount GLsizei stride + + void glMultiDrawElementsIndirectEXT + GLenum mode + GLenum type + const void *indirect + GLsizei drawcount + GLsizei stride + + void glMultiDrawRangeElementArrayAPPLE GLenum mode @@ -19130,7 +20114,7 @@ typedef unsigned int GLhandleARB; void glNamedBufferData GLuint buffer - GLsizei size + GLsizeiptr size const void *data GLenum usage @@ -19158,30 +20142,32 @@ typedef unsigned int GLhandleARB; void glNamedBufferStorage GLuint buffer - GLsizei size - const void *data + GLsizeiptr size + const void *data GLbitfield flags void glNamedBufferStorageEXT GLuint buffer - GLsizeiptr size + GLsizeiptr size const void *data GLbitfield flags + void glNamedBufferSubData GLuint buffer GLintptr offset - GLsizei size - const void *data + GLsizeiptr size + const void *data void glNamedBufferSubDataEXT GLuint buffer GLintptr offset - GLsizeiptr size + GLsizeiptr size const void *data + void glNamedCopyBufferSubDataEXT @@ -19233,6 +20219,20 @@ typedef unsigned int GLhandleARB; GLenum renderbuffertarget GLuint renderbuffer + + void glNamedFramebufferSampleLocationsfvARB + GLuint framebuffer + GLuint start + GLsizei count + const GLfloat *v + + + void glNamedFramebufferSampleLocationsfvNV + GLuint framebuffer + GLuint start + GLsizei count + const GLfloat *v + void glNamedFramebufferTexture GLuint framebuffer @@ -19789,6 +20789,12 @@ typedef unsigned int GLhandleARB; GLint value + + void glPatchParameteriOES + GLenum pname + GLint value + + void glPathColorGenNV GLenum color @@ -20231,12 +21237,25 @@ typedef unsigned int GLhandleARB; GLenum mode + + void glPolygonModeNV + GLenum face + GLenum mode + + void glPolygonOffset GLfloat factor GLfloat units + + void glPolygonOffsetClampEXT + GLfloat factor + GLfloat units + GLfloat clamp + + void glPolygonOffsetEXT GLfloat factor @@ -20253,13 +21272,6 @@ typedef unsigned int GLhandleARB; GLfixed factor GLfixed units - - void glPolygonOffsetClampEXT - GLfloat factor - GLfloat units - GLfloat clamp - - void glPolygonStipple const GLubyte *mask @@ -20321,6 +21333,29 @@ typedef unsigned int GLhandleARB; GLuint fill1 GLuint key1 + + void glPrimitiveBoundingBox + GLfloat minX + GLfloat minY + GLfloat minZ + GLfloat minW + GLfloat maxX + GLfloat maxY + GLfloat maxZ + GLfloat maxW + + + void glPrimitiveBoundingBoxARB + GLfloat minX + GLfloat minY + GLfloat minZ + GLfloat minW + GLfloat maxX + GLfloat maxY + GLfloat maxZ + GLfloat maxW + + void glPrimitiveBoundingBoxEXT GLfloat minX @@ -20331,6 +21366,19 @@ typedef unsigned int GLhandleARB; GLfloat maxY GLfloat maxZ GLfloat maxW + + + + void glPrimitiveBoundingBoxOES + GLfloat minX + GLfloat minY + GLfloat minZ + GLfloat minW + GLfloat maxX + GLfloat maxY + GLfloat maxZ + GLfloat maxW + void glPrimitiveRestartIndex @@ -20721,7 +21769,7 @@ typedef unsigned int GLhandleARB; GLuint program GLint location GLsizei count - const GLdouble *value + const GLdouble *value void glProgramUniform1dvEXT @@ -20748,7 +21796,7 @@ typedef unsigned int GLhandleARB; GLuint program GLint location GLsizei count - const GLfloat *value + const GLfloat *value void glProgramUniform1fvEXT @@ -20764,12 +21812,25 @@ typedef unsigned int GLhandleARB; GLint location GLint v0 + + void glProgramUniform1i64ARB + GLuint program + GLint location + GLint64 x + void glProgramUniform1i64NV GLuint program GLint location GLint64EXT x + + void glProgramUniform1i64vARB + GLuint program + GLint location + GLsizei count + const GLint64 *value + void glProgramUniform1i64vNV GLuint program @@ -20789,7 +21850,7 @@ typedef unsigned int GLhandleARB; GLuint program GLint location GLsizei count - const GLint *value + const GLint *value void glProgramUniform1ivEXT @@ -20805,12 +21866,25 @@ typedef unsigned int GLhandleARB; GLint location GLuint v0 + + void glProgramUniform1ui64ARB + GLuint program + GLint location + GLuint64 x + void glProgramUniform1ui64NV GLuint program GLint location GLuint64EXT x + + void glProgramUniform1ui64vARB + GLuint program + GLint location + GLsizei count + const GLuint64 *value + void glProgramUniform1ui64vNV GLuint program @@ -20830,7 +21904,7 @@ typedef unsigned int GLhandleARB; GLuint program GLint location GLsizei count - const GLuint *value + const GLuint *value void glProgramUniform1uivEXT @@ -20859,14 +21933,14 @@ typedef unsigned int GLhandleARB; GLuint program GLint location GLsizei count - const GLdouble *value + const GLdouble *value void glProgramUniform2dvEXT GLuint program GLint location GLsizei count - const GLdouble *value + const GLdouble *value void glProgramUniform2f @@ -20888,7 +21962,7 @@ typedef unsigned int GLhandleARB; GLuint program GLint location GLsizei count - const GLfloat *value + const GLfloat *value void glProgramUniform2fvEXT @@ -20905,6 +21979,13 @@ typedef unsigned int GLhandleARB; GLint v0 GLint v1 + + void glProgramUniform2i64ARB + GLuint program + GLint location + GLint64 x + GLint64 y + void glProgramUniform2i64NV GLuint program @@ -20912,6 +21993,13 @@ typedef unsigned int GLhandleARB; GLint64EXT x GLint64EXT y + + void glProgramUniform2i64vARB + GLuint program + GLint location + GLsizei count + const GLint64 *value + void glProgramUniform2i64vNV GLuint program @@ -20932,7 +22020,7 @@ typedef unsigned int GLhandleARB; GLuint program GLint location GLsizei count - const GLint *value + const GLint *value void glProgramUniform2ivEXT @@ -20949,6 +22037,13 @@ typedef unsigned int GLhandleARB; GLuint v0 GLuint v1 + + void glProgramUniform2ui64ARB + GLuint program + GLint location + GLuint64 x + GLuint64 y + void glProgramUniform2ui64NV GLuint program @@ -20956,6 +22051,13 @@ typedef unsigned int GLhandleARB; GLuint64EXT x GLuint64EXT y + + void glProgramUniform2ui64vARB + GLuint program + GLint location + GLsizei count + const GLuint64 *value + void glProgramUniform2ui64vNV GLuint program @@ -20976,7 +22078,7 @@ typedef unsigned int GLhandleARB; GLuint program GLint location GLsizei count - const GLuint *value + const GLuint *value void glProgramUniform2uivEXT @@ -21007,14 +22109,14 @@ typedef unsigned int GLhandleARB; GLuint program GLint location GLsizei count - const GLdouble *value + const GLdouble *value void glProgramUniform3dvEXT GLuint program GLint location GLsizei count - const GLdouble *value + const GLdouble *value void glProgramUniform3f @@ -21038,7 +22140,7 @@ typedef unsigned int GLhandleARB; GLuint program GLint location GLsizei count - const GLfloat *value + const GLfloat *value void glProgramUniform3fvEXT @@ -21056,6 +22158,14 @@ typedef unsigned int GLhandleARB; GLint v1 GLint v2 + + void glProgramUniform3i64ARB + GLuint program + GLint location + GLint64 x + GLint64 y + GLint64 z + void glProgramUniform3i64NV GLuint program @@ -21064,6 +22174,13 @@ typedef unsigned int GLhandleARB; GLint64EXT y GLint64EXT z + + void glProgramUniform3i64vARB + GLuint program + GLint location + GLsizei count + const GLint64 *value + void glProgramUniform3i64vNV GLuint program @@ -21085,7 +22202,7 @@ typedef unsigned int GLhandleARB; GLuint program GLint location GLsizei count - const GLint *value + const GLint *value void glProgramUniform3ivEXT @@ -21103,6 +22220,14 @@ typedef unsigned int GLhandleARB; GLuint v1 GLuint v2 + + void glProgramUniform3ui64ARB + GLuint program + GLint location + GLuint64 x + GLuint64 y + GLuint64 z + void glProgramUniform3ui64NV GLuint program @@ -21111,6 +22236,13 @@ typedef unsigned int GLhandleARB; GLuint64EXT y GLuint64EXT z + + void glProgramUniform3ui64vARB + GLuint program + GLint location + GLsizei count + const GLuint64 *value + void glProgramUniform3ui64vNV GLuint program @@ -21132,7 +22264,7 @@ typedef unsigned int GLhandleARB; GLuint program GLint location GLsizei count - const GLuint *value + const GLuint *value void glProgramUniform3uivEXT @@ -21165,14 +22297,14 @@ typedef unsigned int GLhandleARB; GLuint program GLint location GLsizei count - const GLdouble *value + const GLdouble *value void glProgramUniform4dvEXT GLuint program GLint location GLsizei count - const GLdouble *value + const GLdouble *value void glProgramUniform4f @@ -21198,7 +22330,7 @@ typedef unsigned int GLhandleARB; GLuint program GLint location GLsizei count - const GLfloat *value + const GLfloat *value void glProgramUniform4fvEXT @@ -21217,6 +22349,15 @@ typedef unsigned int GLhandleARB; GLint v2 GLint v3 + + void glProgramUniform4i64ARB + GLuint program + GLint location + GLint64 x + GLint64 y + GLint64 z + GLint64 w + void glProgramUniform4i64NV GLuint program @@ -21226,6 +22367,13 @@ typedef unsigned int GLhandleARB; GLint64EXT z GLint64EXT w + + void glProgramUniform4i64vARB + GLuint program + GLint location + GLsizei count + const GLint64 *value + void glProgramUniform4i64vNV GLuint program @@ -21248,7 +22396,7 @@ typedef unsigned int GLhandleARB; GLuint program GLint location GLsizei count - const GLint *value + const GLint *value void glProgramUniform4ivEXT @@ -21267,6 +22415,15 @@ typedef unsigned int GLhandleARB; GLuint v2 GLuint v3 + + void glProgramUniform4ui64ARB + GLuint program + GLint location + GLuint64 x + GLuint64 y + GLuint64 z + GLuint64 w + void glProgramUniform4ui64NV GLuint program @@ -21276,6 +22433,13 @@ typedef unsigned int GLhandleARB; GLuint64EXT z GLuint64EXT w + + void glProgramUniform4ui64vARB + GLuint program + GLint location + GLsizei count + const GLuint64 *value + void glProgramUniform4ui64vNV GLuint program @@ -21298,7 +22462,7 @@ typedef unsigned int GLhandleARB; GLuint program GLint location GLsizei count - const GLuint *value + const GLuint *value void glProgramUniform4uivEXT @@ -21314,6 +22478,13 @@ typedef unsigned int GLhandleARB; GLint location GLuint64 value + + void glProgramUniformHandleui64IMG + GLuint program + GLint location + GLuint64 value + + void glProgramUniformHandleui64NV GLuint program @@ -21327,6 +22498,14 @@ typedef unsigned int GLhandleARB; GLsizei count const GLuint64 *values + + void glProgramUniformHandleui64vIMG + GLuint program + GLint location + GLsizei count + const GLuint64 *values + + void glProgramUniformHandleui64vNV GLuint program @@ -21340,7 +22519,7 @@ typedef unsigned int GLhandleARB; GLint location GLsizei count GLboolean transpose - const GLdouble *value + const GLdouble *value void glProgramUniformMatrix2dvEXT @@ -21348,7 +22527,7 @@ typedef unsigned int GLhandleARB; GLint location GLsizei count GLboolean transpose - const GLdouble *value + const GLdouble *value void glProgramUniformMatrix2fv @@ -21356,7 +22535,7 @@ typedef unsigned int GLhandleARB; GLint location GLsizei count GLboolean transpose - const GLfloat *value + const GLfloat *value void glProgramUniformMatrix2fvEXT @@ -21373,7 +22552,7 @@ typedef unsigned int GLhandleARB; GLint location GLsizei count GLboolean transpose - const GLdouble *value + const GLdouble *value void glProgramUniformMatrix2x3dvEXT @@ -21381,7 +22560,7 @@ typedef unsigned int GLhandleARB; GLint location GLsizei count GLboolean transpose - const GLdouble *value + const GLdouble *value void glProgramUniformMatrix2x3fv @@ -21389,7 +22568,7 @@ typedef unsigned int GLhandleARB; GLint location GLsizei count GLboolean transpose - const GLfloat *value + const GLfloat *value void glProgramUniformMatrix2x3fvEXT @@ -21406,7 +22585,7 @@ typedef unsigned int GLhandleARB; GLint location GLsizei count GLboolean transpose - const GLdouble *value + const GLdouble *value void glProgramUniformMatrix2x4dvEXT @@ -21414,7 +22593,7 @@ typedef unsigned int GLhandleARB; GLint location GLsizei count GLboolean transpose - const GLdouble *value + const GLdouble *value void glProgramUniformMatrix2x4fv @@ -21422,7 +22601,7 @@ typedef unsigned int GLhandleARB; GLint location GLsizei count GLboolean transpose - const GLfloat *value + const GLfloat *value void glProgramUniformMatrix2x4fvEXT @@ -21439,7 +22618,7 @@ typedef unsigned int GLhandleARB; GLint location GLsizei count GLboolean transpose - const GLdouble *value + const GLdouble *value void glProgramUniformMatrix3dvEXT @@ -21447,7 +22626,7 @@ typedef unsigned int GLhandleARB; GLint location GLsizei count GLboolean transpose - const GLdouble *value + const GLdouble *value void glProgramUniformMatrix3fv @@ -21455,7 +22634,7 @@ typedef unsigned int GLhandleARB; GLint location GLsizei count GLboolean transpose - const GLfloat *value + const GLfloat *value void glProgramUniformMatrix3fvEXT @@ -21472,7 +22651,7 @@ typedef unsigned int GLhandleARB; GLint location GLsizei count GLboolean transpose - const GLdouble *value + const GLdouble *value void glProgramUniformMatrix3x2dvEXT @@ -21480,7 +22659,7 @@ typedef unsigned int GLhandleARB; GLint location GLsizei count GLboolean transpose - const GLdouble *value + const GLdouble *value void glProgramUniformMatrix3x2fv @@ -21488,7 +22667,7 @@ typedef unsigned int GLhandleARB; GLint location GLsizei count GLboolean transpose - const GLfloat *value + const GLfloat *value void glProgramUniformMatrix3x2fvEXT @@ -21505,7 +22684,7 @@ typedef unsigned int GLhandleARB; GLint location GLsizei count GLboolean transpose - const GLdouble *value + const GLdouble *value void glProgramUniformMatrix3x4dvEXT @@ -21513,7 +22692,7 @@ typedef unsigned int GLhandleARB; GLint location GLsizei count GLboolean transpose - const GLdouble *value + const GLdouble *value void glProgramUniformMatrix3x4fv @@ -21521,7 +22700,7 @@ typedef unsigned int GLhandleARB; GLint location GLsizei count GLboolean transpose - const GLfloat *value + const GLfloat *value void glProgramUniformMatrix3x4fvEXT @@ -21538,7 +22717,7 @@ typedef unsigned int GLhandleARB; GLint location GLsizei count GLboolean transpose - const GLdouble *value + const GLdouble *value void glProgramUniformMatrix4dvEXT @@ -21546,7 +22725,7 @@ typedef unsigned int GLhandleARB; GLint location GLsizei count GLboolean transpose - const GLdouble *value + const GLdouble *value void glProgramUniformMatrix4fv @@ -21554,7 +22733,7 @@ typedef unsigned int GLhandleARB; GLint location GLsizei count GLboolean transpose - const GLfloat *value + const GLfloat *value void glProgramUniformMatrix4fvEXT @@ -21571,7 +22750,7 @@ typedef unsigned int GLhandleARB; GLint location GLsizei count GLboolean transpose - const GLdouble *value + const GLdouble *value void glProgramUniformMatrix4x2dvEXT @@ -21579,7 +22758,7 @@ typedef unsigned int GLhandleARB; GLint location GLsizei count GLboolean transpose - const GLdouble *value + const GLdouble *value void glProgramUniformMatrix4x2fv @@ -21587,7 +22766,7 @@ typedef unsigned int GLhandleARB; GLint location GLsizei count GLboolean transpose - const GLfloat *value + const GLfloat *value void glProgramUniformMatrix4x2fvEXT @@ -21604,7 +22783,7 @@ typedef unsigned int GLhandleARB; GLint location GLsizei count GLboolean transpose - const GLdouble *value + const GLdouble *value void glProgramUniformMatrix4x3dvEXT @@ -21612,7 +22791,7 @@ typedef unsigned int GLhandleARB; GLint location GLsizei count GLboolean transpose - const GLdouble *value + const GLdouble *value void glProgramUniformMatrix4x3fv @@ -21620,7 +22799,7 @@ typedef unsigned int GLhandleARB; GLint location GLsizei count GLboolean transpose - const GLfloat *value + const GLfloat *value void glProgramUniformMatrix4x3fvEXT @@ -21897,6 +23076,11 @@ typedef unsigned int GLhandleARB; void glRasterPos4xvOES const GLfixed *coords + + void glRasterSamplesEXT + GLuint samples + GLboolean fixedsamplelocations + void glReadBuffer GLenum src @@ -22342,6 +23526,9 @@ typedef unsigned int GLhandleARB; void glResizeBuffersMESA + + void glResolveDepthValuesNV + void glResolveMultisampleFramebufferAPPLE @@ -22394,11 +23581,6 @@ typedef unsigned int GLhandleARB; GLboolean invert - - void glSampleCoverageOES - GLfixed value - GLboolean invert - void glSampleCoveragex GLclampx value @@ -22460,6 +23642,13 @@ typedef unsigned int GLhandleARB; const GLint *param + + void glSamplerParameterIivOES + GLuint sampler + GLenum pname + const GLint *param + + void glSamplerParameterIuiv GLuint sampler @@ -22473,6 +23662,13 @@ typedef unsigned int GLhandleARB; const GLuint *param + + void glSamplerParameterIuivOES + GLuint sampler + GLenum pname + const GLuint *param + + void glSamplerParameterf GLuint sampler @@ -22537,6 +23733,20 @@ typedef unsigned int GLhandleARB; GLsizei count const GLint *v + + void glScissorArrayvNV + GLuint first + GLsizei count + const GLint *v + + + + void glScissorArrayvOES + GLuint first + GLsizei count + const GLint *v + + void glScissorIndexed GLuint index @@ -22545,11 +23755,41 @@ typedef unsigned int GLhandleARB; GLsizei width GLsizei height + + void glScissorIndexedNV + GLuint index + GLint left + GLint bottom + GLsizei width + GLsizei height + + + + void glScissorIndexedOES + GLuint index + GLint left + GLint bottom + GLsizei width + GLsizei height + + void glScissorIndexedv GLuint index const GLint *v + + void glScissorIndexedvNV + GLuint index + const GLint *v + + + + void glScissorIndexedvOES + GLuint index + const GLint *v + + void glSecondaryColor3b GLbyte red @@ -22979,6 +24219,11 @@ typedef unsigned int GLhandleARB; GLuint height GLbitfield preserveMask + + void glStateCaptureNV + GLuint state + GLenum mode + void glStencilClearTagEXT GLsizei stencilTagBits @@ -23125,6 +24370,11 @@ typedef unsigned int GLhandleARB; GLsizei len const void *string + + void glSubpixelPrecisionBiasNV + GLuint xbits + GLuint ybits + void glSwizzleEXT GLuint res @@ -23249,6 +24499,13 @@ typedef unsigned int GLhandleARB; GLuint buffer + + void glTexBufferOES + GLenum target + GLenum internalformat + GLuint buffer + + void glTexBufferRange GLenum target @@ -23266,6 +24523,15 @@ typedef unsigned int GLhandleARB; GLsizeiptr size + + void glTexBufferRangeOES + GLenum target + GLenum internalformat + GLuint buffer + GLintptr offset + GLsizeiptr size + + void glTexBumpParameterfvATI GLenum pname @@ -24059,7 +25325,20 @@ typedef unsigned int GLhandleARB; GLsizei width GLsizei height GLsizei depth - GLboolean resident + GLboolean commit + + + void glTexPageCommitmentEXT + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLboolean commit + void glTexParameterIiv @@ -24075,6 +25354,13 @@ typedef unsigned int GLhandleARB; const GLint *params + + void glTexParameterIivOES + GLenum target + GLenum pname + const GLint *params + + void glTexParameterIuiv GLenum target @@ -24089,6 +25375,13 @@ typedef unsigned int GLhandleARB; const GLuint *params + + void glTexParameterIuivOES + GLenum target + GLenum pname + const GLuint *params + + void glTexParameterf GLenum target @@ -24379,7 +25672,7 @@ typedef unsigned int GLhandleARB; GLenum internalformat GLuint buffer GLintptr offset - GLsizei size + GLsizeiptr size void glTextureBufferRangeEXT @@ -24504,7 +25797,7 @@ typedef unsigned int GLhandleARB; GLsizei width GLsizei height GLsizei depth - GLboolean resident + GLboolean commit void glTextureParameterIiv @@ -24798,6 +26091,18 @@ typedef unsigned int GLhandleARB; GLuint numlayers + + void glTextureViewOES + GLuint texture + GLenum target + GLuint origtexture + GLenum internalformat + GLuint minlevel + GLuint numlevels + GLuint minlayer + GLuint numlayers + + void glTrackMatrixNV GLenum target @@ -24824,7 +26129,7 @@ typedef unsigned int GLhandleARB; GLuint index GLuint buffer GLintptr offset - GLsizei size + GLsizeiptr size void glTransformFeedbackStreamAttribsNV @@ -24929,11 +26234,22 @@ typedef unsigned int GLhandleARB; GLint location GLint v0 + + void glUniform1i64ARB + GLint location + GLint64 x + void glUniform1i64NV GLint location GLint64EXT x + + void glUniform1i64vARB + GLint location + GLsizei count + const GLint64 *value + void glUniform1i64vNV GLint location @@ -24964,11 +26280,22 @@ typedef unsigned int GLhandleARB; GLint location GLuint v0 + + void glUniform1ui64ARB + GLint location + GLuint64 x + void glUniform1ui64NV GLint location GLuint64EXT x + + void glUniform1ui64vARB + GLint location + GLsizei count + const GLuint64 *value + void glUniform1ui64vNV GLint location @@ -25038,12 +26365,24 @@ typedef unsigned int GLhandleARB; GLint v0 GLint v1 + + void glUniform2i64ARB + GLint location + GLint64 x + GLint64 y + void glUniform2i64NV GLint location GLint64EXT x GLint64EXT y + + void glUniform2i64vARB + GLint location + GLsizei count + const GLint64 *value + void glUniform2i64vNV GLint location @@ -25076,12 +26415,24 @@ typedef unsigned int GLhandleARB; GLuint v0 GLuint v1 + + void glUniform2ui64ARB + GLint location + GLuint64 x + GLuint64 y + void glUniform2ui64NV GLint location GLuint64EXT x GLuint64EXT y + + void glUniform2ui64vARB + GLint location + GLsizei count + const GLuint64 *value + void glUniform2ui64vNV GLint location @@ -25156,6 +26507,13 @@ typedef unsigned int GLhandleARB; GLint v1 GLint v2 + + void glUniform3i64ARB + GLint location + GLint64 x + GLint64 y + GLint64 z + void glUniform3i64NV GLint location @@ -25163,6 +26521,12 @@ typedef unsigned int GLhandleARB; GLint64EXT y GLint64EXT z + + void glUniform3i64vARB + GLint location + GLsizei count + const GLint64 *value + void glUniform3i64vNV GLint location @@ -25197,6 +26561,13 @@ typedef unsigned int GLhandleARB; GLuint v1 GLuint v2 + + void glUniform3ui64ARB + GLint location + GLuint64 x + GLuint64 y + GLuint64 z + void glUniform3ui64NV GLint location @@ -25204,6 +26575,12 @@ typedef unsigned int GLhandleARB; GLuint64EXT y GLuint64EXT z + + void glUniform3ui64vARB + GLint location + GLsizei count + const GLuint64 *value + void glUniform3ui64vNV GLint location @@ -25283,6 +26660,14 @@ typedef unsigned int GLhandleARB; GLint v2 GLint v3 + + void glUniform4i64ARB + GLint location + GLint64 x + GLint64 y + GLint64 z + GLint64 w + void glUniform4i64NV GLint location @@ -25291,6 +26676,12 @@ typedef unsigned int GLhandleARB; GLint64EXT z GLint64EXT w + + void glUniform4i64vARB + GLint location + GLsizei count + const GLint64 *value + void glUniform4i64vNV GLint location @@ -25327,6 +26718,14 @@ typedef unsigned int GLhandleARB; GLuint v2 GLuint v3 + + void glUniform4ui64ARB + GLint location + GLuint64 x + GLuint64 y + GLuint64 z + GLuint64 w + void glUniform4ui64NV GLint location @@ -25335,6 +26734,12 @@ typedef unsigned int GLhandleARB; GLuint64EXT z GLuint64EXT w + + void glUniform4ui64vARB + GLint location + GLsizei count + const GLuint64 *value + void glUniform4ui64vNV GLint location @@ -25380,6 +26785,12 @@ typedef unsigned int GLhandleARB; GLint location GLuint64 value + + void glUniformHandleui64IMG + GLint location + GLuint64 value + + void glUniformHandleui64NV GLint location @@ -25391,6 +26802,13 @@ typedef unsigned int GLhandleARB; GLsizei count const GLuint64 *value + + void glUniformHandleui64vIMG + GLint location + GLsizei count + const GLuint64 *value + + void glUniformHandleui64vNV GLint location @@ -28155,6 +29573,20 @@ typedef unsigned int GLhandleARB; GLsizei count const GLfloat *v + + void glViewportArrayvNV + GLuint first + GLsizei count + const GLfloat *v + + + + void glViewportArrayvOES + GLuint first + GLsizei count + const GLfloat *v + + void glViewportIndexedf GLuint index @@ -28163,11 +29595,55 @@ typedef unsigned int GLhandleARB; GLfloat w GLfloat h + + void glViewportIndexedfOES + GLuint index + GLfloat x + GLfloat y + GLfloat w + GLfloat h + + + + void glViewportIndexedfNV + GLuint index + GLfloat x + GLfloat y + GLfloat w + GLfloat h + + void glViewportIndexedfv GLuint index const GLfloat *v + + void glViewportIndexedfvOES + GLuint index + const GLfloat *v + + + + void glViewportIndexedfvNV + GLuint index + const GLfloat *v + + + + void glViewportPositionWScaleNV + GLuint index + GLfloat xcoeff + GLfloat ycoeff + + + void glViewportSwizzleNV + GLuint index + GLenum swizzlex + GLenum swizzley + GLenum swizzlez + GLenum swizzlew + void glWaitSync GLsync sync @@ -28598,6 +30074,12 @@ typedef unsigned int GLhandleARB; void glWindowPos4svMESA const GLshort *v + + void glWindowRectanglesEXT + GLenum mode + GLsizei count + const GLint *box + void glWriteMaskEXT GLuint res @@ -28607,51 +30089,7 @@ typedef unsigned int GLhandleARB; GLenum outZ GLenum outW - - void glCoverageModulationNV - GLenum components - - - void glCoverageModulationTableNV - GLsizei n - const GLfloat *v - - - void glFragmentCoverageColorNV - GLuint color - - - void glFramebufferSampleLocationsfvNV - GLenum target - GLuint start - GLsizei count - const GLfloat *v - - - void glGetCoverageModulationTableNV - GLsizei bufsize - GLfloat *v - - - void glNamedFramebufferSampleLocationsfvNV - GLuint framebuffer - GLuint start - GLsizei count - const GLfloat *v - - - void glRasterSamplesEXT - GLuint samples - GLboolean fixedsamplelocations - - - void glResolveDepthValuesNV - - - void glSubpixelPrecisionBiasNV - GLuint xbits - GLuint ybits - + @@ -30339,6 +31777,22 @@ typedef unsigned int GLhandleARB; + + + + + + + + + + + + + + + + @@ -30521,6 +31975,9 @@ typedef unsigned int GLhandleARB; + + + @@ -32518,7 +33975,6 @@ typedef unsigned int GLhandleARB; - @@ -33805,6 +35261,22 @@ typedef unsigned int GLhandleARB; + + + + + + + + + + + + + + + + @@ -34324,301 +35796,1040 @@ typedef unsigned int GLhandleARB; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -38136,6 +40507,7 @@ typedef unsigned int GLhandleARB; + @@ -38160,6 +40532,7 @@ typedef unsigned int GLhandleARB; + @@ -38763,6 +41136,14 @@ typedef unsigned int GLhandleARB; + + + + + + + + @@ -38776,6 +41157,13 @@ typedef unsigned int GLhandleARB; + + + + + + + @@ -39007,9 +41395,7 @@ typedef unsigned int GLhandleARB; - - - + @@ -39111,6 +41497,12 @@ typedef unsigned int GLhandleARB; + + + + + + @@ -39134,6 +41526,12 @@ typedef unsigned int GLhandleARB; + + + + + + @@ -39257,19 +41655,25 @@ typedef unsigned int GLhandleARB; - + - + + + + + + + @@ -39289,7 +41693,7 @@ typedef unsigned int GLhandleARB; - + @@ -39307,6 +41711,18 @@ typedef unsigned int GLhandleARB; + + + + + + + + + + + + @@ -39444,6 +41860,7 @@ typedef unsigned int GLhandleARB; + @@ -39509,6 +41926,7 @@ typedef unsigned int GLhandleARB; + @@ -39516,6 +41934,16 @@ typedef unsigned int GLhandleARB; + + + + + + + + + + @@ -39531,6 +41959,28 @@ typedef unsigned int GLhandleARB; + + + + + + + + + + + + + + + + + + + + + + @@ -39753,7 +42203,7 @@ typedef unsigned int GLhandleARB; - + @@ -39828,7 +42278,7 @@ typedef unsigned int GLhandleARB; - + @@ -39915,6 +42365,18 @@ typedef unsigned int GLhandleARB; + + + + + + + + + + + + @@ -39965,6 +42427,16 @@ typedef unsigned int GLhandleARB; + + + + + + + + + + @@ -40360,6 +42832,17 @@ typedef unsigned int GLhandleARB; + + + + + + + + + + + @@ -40483,6 +42966,26 @@ typedef unsigned int GLhandleARB; + + + + + + + + + + + + + + + + + + + + @@ -40534,6 +43037,13 @@ typedef unsigned int GLhandleARB; + + + + + + + @@ -40569,7 +43079,17 @@ typedef unsigned int GLhandleARB; + + + + + + + + + + @@ -40630,7 +43150,6 @@ typedef unsigned int GLhandleARB; - @@ -40646,6 +43165,7 @@ typedef unsigned int GLhandleARB; + @@ -40694,6 +43214,7 @@ typedef unsigned int GLhandleARB; + @@ -40746,6 +43267,7 @@ typedef unsigned int GLhandleARB; + @@ -40770,13 +43292,15 @@ typedef unsigned int GLhandleARB; - - - + + + + + @@ -40876,6 +43400,7 @@ typedef unsigned int GLhandleARB; + @@ -40958,7 +43483,7 @@ typedef unsigned int GLhandleARB; - + @@ -41038,13 +43563,61 @@ typedef unsigned int GLhandleARB; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -41054,7 +43627,7 @@ typedef unsigned int GLhandleARB; - + @@ -41063,6 +43636,23 @@ typedef unsigned int GLhandleARB; + + + + + + + + + + + + + + + + + @@ -41262,7 +43852,7 @@ typedef unsigned int GLhandleARB; - + @@ -41294,7 +43884,7 @@ typedef unsigned int GLhandleARB; - + @@ -41330,7 +43920,7 @@ typedef unsigned int GLhandleARB; - + @@ -41340,7 +43930,7 @@ typedef unsigned int GLhandleARB; - + @@ -41405,7 +43995,7 @@ typedef unsigned int GLhandleARB; - + @@ -41449,7 +44039,7 @@ typedef unsigned int GLhandleARB; - + @@ -41568,12 +44158,25 @@ typedef unsigned int GLhandleARB; + + + + + + + + + + + + + @@ -41641,7 +44244,7 @@ typedef unsigned int GLhandleARB; - + @@ -41695,13 +44298,11 @@ typedef unsigned int GLhandleARB; - - @@ -41770,9 +44371,6 @@ typedef unsigned int GLhandleARB; - - - @@ -41799,9 +44397,6 @@ typedef unsigned int GLhandleARB; - - - @@ -41814,10 +44409,6 @@ typedef unsigned int GLhandleARB; - - - - @@ -41866,6 +44457,18 @@ typedef unsigned int GLhandleARB; + + + + + + + + + + + + @@ -41881,6 +44484,11 @@ typedef unsigned int GLhandleARB; + + + + + @@ -41902,6 +44510,17 @@ typedef unsigned int GLhandleARB; + + + + + + + + + + + @@ -42009,11 +44628,6 @@ typedef unsigned int GLhandleARB; - - - - - @@ -42021,6 +44635,11 @@ typedef unsigned int GLhandleARB; + + + + + @@ -42035,7 +44654,7 @@ typedef unsigned int GLhandleARB; - + @@ -42050,10 +44669,11 @@ typedef unsigned int GLhandleARB; - + - + + @@ -42083,6 +44703,7 @@ typedef unsigned int GLhandleARB; + @@ -42102,6 +44723,7 @@ typedef unsigned int GLhandleARB; + @@ -42685,6 +45307,48 @@ typedef unsigned int GLhandleARB; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -42703,6 +45367,7 @@ typedef unsigned int GLhandleARB; + @@ -42778,12 +45443,17 @@ typedef unsigned int GLhandleARB; - + + + + + + - + @@ -42795,6 +45465,54 @@ typedef unsigned int GLhandleARB; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -42847,7 +45565,6 @@ typedef unsigned int GLhandleARB; - @@ -42988,6 +45705,45 @@ typedef unsigned int GLhandleARB; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -42997,6 +45753,7 @@ typedef unsigned int GLhandleARB; + @@ -43062,6 +45819,12 @@ typedef unsigned int GLhandleARB; + + + + + + @@ -43092,7 +45855,7 @@ typedef unsigned int GLhandleARB; - + @@ -43107,6 +45870,7 @@ typedef unsigned int GLhandleARB; + @@ -43124,7 +45888,7 @@ typedef unsigned int GLhandleARB; - + @@ -43155,6 +45919,59 @@ typedef unsigned int GLhandleARB; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -43171,6 +45988,40 @@ typedef unsigned int GLhandleARB; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -43249,6 +46100,19 @@ typedef unsigned int GLhandleARB; + + + + + + + + + + + + + @@ -43276,12 +46140,22 @@ typedef unsigned int GLhandleARB; - + + + + + + + + + + + @@ -43304,6 +46178,30 @@ typedef unsigned int GLhandleARB; + + + + + + + + + + + + + + + + + + + + + + + + @@ -43326,6 +46224,21 @@ typedef unsigned int GLhandleARB; + + + + + + + + + + + + + + + diff --git a/source/buffer.cpp b/source/buffer.cpp index 080c3fb3..100e4b2e 100644 --- a/source/buffer.cpp +++ b/source/buffer.cpp @@ -1,4 +1,5 @@ #include +#include #include #include "buffer.h" #include "error.h" @@ -20,7 +21,10 @@ Buffer::Buffer(BufferType t): { require_buffer_type(type); - glGenBuffers(1, &id); + if(ARB_direct_state_access) + glCreateBuffers(1, &id); + else + glGenBuffers(1, &id); } Buffer::~Buffer() @@ -47,15 +51,25 @@ void Buffer::set_usage(BufferUsage u) void Buffer::data(unsigned sz, const void *d) { - BindRestore _bind(this, type); - glBufferData(type, sz, d, usage); + if(ARB_direct_state_access) + glNamedBufferData(id, sz, d, usage); + else + { + BindRestore _bind(this, type); + glBufferData(type, sz, d, usage); + } size = sz; } void Buffer::sub_data(unsigned off, unsigned sz, const void *d) { - BindRestore _bind(this, type); - glBufferSubData(type, off, sz, d); + if(ARB_direct_state_access) + glNamedBufferSubData(id, off, sz, d); + else + { + BindRestore _bind(this, type); + glBufferSubData(type, off, sz, d); + } } BufferRange *Buffer::create_range(unsigned s, unsigned o) @@ -67,7 +81,6 @@ void *Buffer::map(BufferAccess access) { if(ARB_map_buffer_range) { - BindRestore _bind(this, type); GLenum access_bits = 0; if(access==READ_ONLY) access_bits = GL_MAP_READ_BIT; @@ -75,8 +88,16 @@ void *Buffer::map(BufferAccess access) access_bits = GL_MAP_WRITE_BIT; else if(access==READ_WRITE) access_bits = GL_MAP_READ_BIT|GL_MAP_WRITE_BIT; - return glMapBufferRange(type, 0, size, access_bits); + if(ARB_direct_state_access) + return glMapNamedBufferRange(id, 0, size, access_bits); + else + { + BindRestore _bind(this, type); + return glMapBufferRange(type, 0, size, access_bits); + } } + else if(ARB_direct_state_access) + return glMapNamedBuffer(id, access); else { BindRestore _bind(this, type); @@ -86,8 +107,13 @@ void *Buffer::map(BufferAccess access) bool Buffer::unmap() { - BindRestore _bind(this, type); - return glUnmapBuffer(type); + if(ARB_direct_state_access) + return glUnmapNamedBuffer(id); + else + { + BindRestore _bind(this, type); + return glUnmapBuffer(type); + } } void Buffer::bind_to(BufferType t) const diff --git a/source/bufferable.cpp b/source/bufferable.cpp index e6b52ddf..3178e0ad 100644 --- a/source/bufferable.cpp +++ b/source/bufferable.cpp @@ -1,4 +1,6 @@ #include +#include +#include #include "bindable.h" #include "buffer.h" #include "bufferable.h" @@ -107,7 +109,8 @@ bool Bufferable::resize_buffer() const void Bufferable::update_buffer() const { - BindRestore bind(buffer, buffer->get_type()); + Conditional _bind(!ARB_direct_state_access, buffer, buffer->get_type()); + if(resize_buffer()) { /* Resizing the buffer invalidates its contents. Non-dirty data may diff --git a/source/framebuffer.cpp b/source/framebuffer.cpp index a80ea62b..638a710f 100644 --- a/source/framebuffer.cpp +++ b/source/framebuffer.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -68,7 +69,10 @@ Framebuffer::Framebuffer(): { static Require _req(EXT_framebuffer_object); - glGenFramebuffers(1, &id); + if(ARB_direct_state_access) + glCreateFramebuffers(1, &id); + else + glGenFramebuffers(1, &id); } Framebuffer::~Framebuffer() @@ -81,7 +85,7 @@ Framebuffer::~Framebuffer() void Framebuffer::update_attachment(unsigned mask) const { - if(current()!=this) + if(!ARB_direct_state_access && current()!=this) { dirty |= mask; return; @@ -95,17 +99,30 @@ void Framebuffer::update_attachment(unsigned mask) const if(mask&(1<get_id()); + { + if(ARB_direct_state_access) + glNamedFramebufferRenderbuffer(id, attch.attachment, GL_RENDERBUFFER, attch.rbuf->get_id()); + else + glFramebufferRenderbuffer(GL_FRAMEBUFFER, attch.attachment, GL_RENDERBUFFER, attch.rbuf->get_id()); + } else if(attch.type==GL_TEXTURE_2D) { static_cast(attch.tex)->allocate(attch.level); - glFramebufferTexture2D(GL_FRAMEBUFFER, attch.attachment, attch.type, attch.tex->get_id(), attch.level); + if(ARB_direct_state_access) + glNamedFramebufferTexture(id, attch.attachment, attch.tex->get_id(), attch.level); + else + glFramebufferTexture2D(GL_FRAMEBUFFER, attch.attachment, attch.type, attch.tex->get_id(), attch.level); } else if(attch.type==GL_TEXTURE_CUBE_MAP) { static_cast(attch.tex)->allocate(attch.level); - glFramebufferTexture2D(GL_FRAMEBUFFER, attch.attachment, attch.cube_face, attch.tex->get_id(), attch.level); + if(ARB_direct_state_access) + glNamedFramebufferTextureLayer(id, attch.attachment, attch.tex->get_id(), attch.level, attch.layer); + else + glFramebufferTexture2D(GL_FRAMEBUFFER, attch.attachment, TextureCube::enumerate_faces(attch.layer), attch.tex->get_id(), attch.level); } + else if(ARB_direct_state_access) + glNamedFramebufferRenderbuffer(id, attch.attachment, 0, 0); else glFramebufferRenderbuffer(GL_FRAMEBUFFER, attch.attachment, 0, 0); } @@ -118,13 +135,23 @@ void Framebuffer::update_attachment(unsigned mask) const static Require _req(ARB_draw_buffers); GLenum first_buffer = (color_bufs.empty() ? GL_NONE : color_bufs.front()); - if(ARB_draw_buffers) - glDrawBuffers(color_bufs.size(), &color_bufs[0]); - else if(MSP_draw_buffer) - glDrawBuffer(first_buffer); + if(ARB_direct_state_access) + { + /* ARB_direct_state_access ties the availability of these functions to + framebuffers themselves, so no further checks are needed. */ + glNamedFramebufferDrawBuffers(id, color_bufs.size(), &color_bufs[0]); + glNamedFramebufferReadBuffer(id, first_buffer); + } + else + { + if(ARB_draw_buffers) + glDrawBuffers(color_bufs.size(), &color_bufs[0]); + else if(MSP_draw_buffer) + glDrawBuffer(first_buffer); - if(MSP_draw_buffer) - glReadBuffer(first_buffer); + if(MSP_draw_buffer) + glReadBuffer(first_buffer); + } } void Framebuffer::check_size() @@ -181,7 +208,7 @@ void Framebuffer::attach(FramebufferAttachment attch, Texture2D &tex, unsigned l throw invalid_operation("Framebuffer::attach"); unsigned i = get_attachment_index(attch); - attachments[i].set(tex, 0, level); + attachments[i].set(tex, level, 0); update_attachment(1<(glCheckFramebufferStatus(GL_FRAMEBUFFER)); + if(ARB_direct_state_access) + return static_cast(glCheckNamedFramebufferStatus(id, GL_FRAMEBUFFER)); + else + { + BindRestore _bind(this); + return static_cast(glCheckFramebufferStatus(GL_FRAMEBUFFER)); + } } void Framebuffer::require_complete() const @@ -247,6 +279,12 @@ void Framebuffer::blit_from(const Framebuffer &other, int sx0, int sy0, int sx1, { static Require _req(EXT_framebuffer_blit); + if(ARB_direct_state_access) + { + glBlitNamedFramebuffer(other.id, id, sx0, sy0, sx1, sy1, dx0, dy0, dx1, dy1, bits, (filter ? GL_LINEAR : GL_NEAREST)); + return; + } + const Framebuffer *old = current(); if(set_current(this)) { @@ -314,7 +352,8 @@ Framebuffer &Framebuffer::system() Framebuffer::Attachment::Attachment(FramebufferAttachment a): attachment(a), type(0), - level(0) + level(0), + layer(0) { } void Framebuffer::Attachment::set(Renderbuffer &r) @@ -322,14 +361,15 @@ void Framebuffer::Attachment::set(Renderbuffer &r) type = GL_RENDERBUFFER; rbuf = &r; level = 0; + layer = 0; } -void Framebuffer::Attachment::set(Texture &t, GLenum f, unsigned l) +void Framebuffer::Attachment::set(Texture &t, unsigned l, unsigned z) { type = t.get_target(); tex = &t; - cube_face = f; level = l; + layer = z; } void Framebuffer::Attachment::clear() diff --git a/source/framebuffer.h b/source/framebuffer.h index ab91d9e7..579d22f8 100644 --- a/source/framebuffer.h +++ b/source/framebuffer.h @@ -90,11 +90,11 @@ private: Texture *tex; }; unsigned level; - GLenum cube_face; + unsigned layer; Attachment(FramebufferAttachment); void set(Renderbuffer &); - void set(Texture &, GLenum, unsigned); + void set(Texture &, unsigned, unsigned); void clear(); }; diff --git a/source/programdata.cpp b/source/programdata.cpp index 615da767..01927063 100644 --- a/source/programdata.cpp +++ b/source/programdata.cpp @@ -1,3 +1,4 @@ +#include #include "buffer.h" #include "color.h" #include "error.h" @@ -375,7 +376,7 @@ void ProgramData::apply() const /* If any blocks stored in the buffer were updated, bind the buffer here to avoid state thrashing. */ - if(buffered_blocks_updated) + if(buffered_blocks_updated && !ARB_direct_state_access) buffer->bind(); } diff --git a/source/renderbuffer.cpp b/source/renderbuffer.cpp index b2b25a08..17d36846 100644 --- a/source/renderbuffer.cpp +++ b/source/renderbuffer.cpp @@ -1,3 +1,4 @@ +#include #include #include #include "renderbuffer.h" @@ -9,7 +10,10 @@ Renderbuffer::Renderbuffer() { static Require _req(EXT_framebuffer_object); - glGenRenderbuffers(1, &id); + if(ARB_direct_state_access) + glCreateRenderbuffers(1, &id); + else + glGenRenderbuffers(1, &id); } Renderbuffer::~Renderbuffer() @@ -20,10 +24,15 @@ Renderbuffer::~Renderbuffer() void Renderbuffer::storage(PixelFormat fmt, unsigned wd, unsigned ht) { require_pixelformat(fmt); - BindRestore _bind(this); width = wd; height = ht; - glRenderbufferStorage(GL_RENDERBUFFER, fmt, width, height); + if(ARB_direct_state_access) + glNamedRenderbufferStorage(id, fmt, width, height); + else + { + BindRestore _bind(this); + glRenderbufferStorage(GL_RENDERBUFFER, fmt, width, height); + } } void Renderbuffer::storage_multisample(unsigned samples, PixelFormat fmt, unsigned wd, unsigned ht) @@ -31,10 +40,15 @@ void Renderbuffer::storage_multisample(unsigned samples, PixelFormat fmt, unsign static Require _req(EXT_framebuffer_multisample); require_pixelformat(fmt); - BindRestore _bind(this); width = wd; height = ht; - glRenderbufferStorageMultisample(GL_RENDERBUFFER, samples, fmt, width, height); + if(ARB_direct_state_access) + glNamedRenderbufferStorageMultisample(id, samples, fmt, width, height); + else + { + BindRestore _bind(this); + glRenderbufferStorageMultisample(GL_RENDERBUFFER, samples, fmt, width, height); + } } void Renderbuffer::bind() const diff --git a/source/texture.cpp b/source/texture.cpp index 4efa8ac9..581ec705 100644 --- a/source/texture.cpp +++ b/source/texture.cpp @@ -1,3 +1,4 @@ +#include #include #include #include @@ -63,6 +64,8 @@ Texture::Texture(GLenum t, ResourceManager *m): { if(m) set_manager(m); + else if(ARB_direct_state_access) + glCreateTextures(target, 1, &id); else glGenTextures(1, &id); } @@ -83,7 +86,7 @@ DataType Texture::get_alloc_type(PixelFormat fmt) void Texture::update_parameter(int mask) const { - if(TexUnit::current().get_texture()!=this) + if(!ARB_direct_state_access && TexUnit::current().get_texture()!=this) { TexUnit *unit = TexUnit::find_unit(this); if(!unit) @@ -96,23 +99,39 @@ void Texture::update_parameter(int mask) const } if(mask&MIN_FILTER) - glTexParameteri(target, GL_TEXTURE_MIN_FILTER, min_filter); + set_parameter_i(GL_TEXTURE_MIN_FILTER, min_filter); if(mask&MAG_FILTER) - glTexParameteri(target, GL_TEXTURE_MAG_FILTER, mag_filter); + set_parameter_i(GL_TEXTURE_MAG_FILTER, mag_filter); if(mask&MAX_ANISOTROPY) - glTexParameterf(target, GL_TEXTURE_MAX_ANISOTROPY_EXT, max_anisotropy); + set_parameter_f(GL_TEXTURE_MAX_ANISOTROPY_EXT, max_anisotropy); if(mask&WRAP_S) - glTexParameteri(target, GL_TEXTURE_WRAP_S, wrap_s); + set_parameter_i(GL_TEXTURE_WRAP_S, wrap_s); if(mask&WRAP_T) - glTexParameteri(target, GL_TEXTURE_WRAP_T, wrap_t); + set_parameter_i(GL_TEXTURE_WRAP_T, wrap_t); if(mask&WRAP_R) - glTexParameteri(target, GL_TEXTURE_WRAP_R, wrap_r); + set_parameter_i(GL_TEXTURE_WRAP_R, wrap_r); if(mask&GENERATE_MIPMAP) - glTexParameteri(target, GL_GENERATE_MIPMAP, gen_mipmap); + set_parameter_i(GL_GENERATE_MIPMAP, gen_mipmap); if(mask&COMPARE) - glTexParameteri(target, GL_TEXTURE_COMPARE_MODE, (compare ? GL_COMPARE_R_TO_TEXTURE : GL_NONE)); + set_parameter_i(GL_TEXTURE_COMPARE_MODE, (compare ? GL_COMPARE_R_TO_TEXTURE : GL_NONE)); if(mask&COMPARE_FUNC) - glTexParameteri(target, GL_TEXTURE_COMPARE_FUNC, cmp_func); + set_parameter_i(GL_TEXTURE_COMPARE_FUNC, cmp_func); +} + +void Texture::set_parameter_i(GLenum param, int value) const +{ + if(ARB_direct_state_access) + glTextureParameteri(id, param, value); + else + glTexParameteri(target, param, value); +} + +void Texture::set_parameter_f(GLenum param, float value) const +{ + if(ARB_direct_state_access) + glTextureParameterf(id, param, value); + else + glTexParameterf(target, param, value); } void Texture::set_min_filter(TextureFilter f) @@ -183,7 +202,12 @@ void Texture::auto_generate_mipmap() { // glGenerateMipmap is defined here if(EXT_framebuffer_object) - glGenerateMipmap(target); + { + if(ARB_direct_state_access) + glGenerateTextureMipmap(id); + else + glGenerateMipmap(target); + } } void Texture::set_compare_enabled(bool c) diff --git a/source/texture.h b/source/texture.h index 23f3bb25..f1a51767 100644 --- a/source/texture.h +++ b/source/texture.h @@ -130,6 +130,8 @@ protected: static DataType get_alloc_type(PixelFormat); void update_parameter(int) const; + void set_parameter_i(GLenum, int) const; + void set_parameter_f(GLenum, float) const; public: void set_min_filter(TextureFilter); void set_mag_filter(TextureFilter); diff --git a/source/texture1d.cpp b/source/texture1d.cpp index ed7d8f6e..32053e83 100644 --- a/source/texture1d.cpp +++ b/source/texture1d.cpp @@ -1,3 +1,5 @@ +#include +#include #include #include #include "bindable.h" @@ -40,9 +42,14 @@ void Texture1D::allocate(unsigned level) if(ARB_texture_storage) { - BindRestore _bind(this); unsigned n_levels = (is_mipmapped(min_filter) ? get_n_levels() : 1); - glTexStorage1D(target, n_levels, ifmt, width); + if(ARB_direct_state_access) + glTextureStorage1D(id, n_levels, ifmt, width); + else + { + BindRestore _bind(this); + glTexStorage1D(target, n_levels, ifmt, width); + } allocated |= (1< _bind(!ARB_direct_state_access, this); allocate(level); - glTexSubImage1D(target, level, x, wd, fmt, type, data); + if(ARB_direct_state_access) + glTextureSubImage1D(id, level, x, wd, fmt, type, data); + else + glTexSubImage1D(target, level, x, wd, fmt, type, data); if(gen_mipmap && level==0) auto_generate_mipmap(); diff --git a/source/texture2d.cpp b/source/texture2d.cpp index 23cb9477..8ecebdfb 100644 --- a/source/texture2d.cpp +++ b/source/texture2d.cpp @@ -1,3 +1,5 @@ +#include +#include #include #include "bindable.h" #include "buffer.h" @@ -68,9 +70,14 @@ void Texture2D::allocate(unsigned level) if(ARB_texture_storage) { - BindRestore _bind(this); unsigned n_levels = (is_mipmapped(min_filter) ? get_n_levels() : 1); - glTexStorage2D(target, n_levels, ifmt, width, height); + if(ARB_direct_state_access) + glTextureStorage2D(id, n_levels, ifmt, width, height); + else + { + BindRestore _bind(this); + glTexStorage2D(target, n_levels, ifmt, width, height); + } allocated |= (1< _bind(!ARB_direct_state_access, this); allocate(level); - glTexSubImage2D(target, level, x, y, wd, ht, fmt, type, data); + if(ARB_direct_state_access) + glTextureSubImage2D(id, level, x, y, wd, ht, fmt, type, data); + else + glTexSubImage2D(target, level, x, y, wd, ht, fmt, type, data); if(gen_mipmap && level==0) auto_generate_mipmap(); diff --git a/source/texture3d.cpp b/source/texture3d.cpp index 36afa9bc..f64f548a 100644 --- a/source/texture3d.cpp +++ b/source/texture3d.cpp @@ -1,4 +1,6 @@ #include +#include +#include #include #include #include @@ -56,9 +58,14 @@ void Texture3D::allocate(unsigned level) if(ARB_texture_storage) { - BindRestore _bind(this); unsigned n_levels = (is_mipmapped(min_filter) ? get_n_levels() : 1); - glTexStorage3D(target, n_levels, ifmt, width, height, depth); + if(ARB_direct_state_access) + glTextureStorage3D(id, n_levels, ifmt, width, height, depth); + else + { + BindRestore _bind(this); + glTexStorage3D(target, n_levels, ifmt, width, height, depth); + } allocated |= (1< _bind(!ARB_direct_state_access, this); allocate(level); - glTexSubImage3D(target, level, x, y, z, wd, ht, dp, fmt, type, data); + if(ARB_direct_state_access) + glTextureSubImage3D(id, level, x, y, z, wd, ht, dp, fmt, type, data); + else + glTexSubImage3D(target, level, x, y, z, wd, ht, dp, fmt, type, data); if(gen_mipmap && level==0) auto_generate_mipmap(); -- 2.43.0