mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-10 07:11:46 +00:00
OpenGL2: Fix GL_EXT_direct_state_access function names.
This commit is contained in:
parent
1051df45e3
commit
e022abeebb
8 changed files with 113 additions and 203 deletions
|
@ -617,27 +617,27 @@ extern void (APIENTRYP qglUnlockArraysEXT) (void);
|
||||||
|
|
||||||
// GL_EXT_direct_state_access
|
// GL_EXT_direct_state_access
|
||||||
#define QGL_EXT_direct_state_access_PROCS \
|
#define QGL_EXT_direct_state_access_PROCS \
|
||||||
GLE(GLvoid, BindMultiTexture, GLenum texunit, GLenum target, GLuint texture) \
|
GLE(GLvoid, BindMultiTextureEXT, GLenum texunit, GLenum target, GLuint texture) \
|
||||||
GLE(GLvoid, TextureParameterf, GLuint texture, GLenum target, GLenum pname, GLfloat param) \
|
GLE(GLvoid, TextureParameterfEXT, GLuint texture, GLenum target, GLenum pname, GLfloat param) \
|
||||||
GLE(GLvoid, TextureParameteri, GLuint texture, GLenum target, GLenum pname, GLint param) \
|
GLE(GLvoid, TextureParameteriEXT, GLuint texture, GLenum target, GLenum pname, GLint param) \
|
||||||
GLE(GLvoid, TextureImage2D, GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels) \
|
GLE(GLvoid, TextureImage2DEXT, GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels) \
|
||||||
GLE(GLvoid, TextureSubImage2D, GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels) \
|
GLE(GLvoid, TextureSubImage2DEXT, GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels) \
|
||||||
GLE(GLvoid, CopyTextureImage2D, GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) \
|
GLE(GLvoid, CopyTextureImage2DEXT, GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) \
|
||||||
GLE(GLvoid, CompressedTextureImage2D, GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data) \
|
GLE(GLvoid, CompressedTextureImage2DEXT, GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data) \
|
||||||
GLE(GLvoid, CompressedTextureSubImage2D, GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data) \
|
GLE(GLvoid, CompressedTextureSubImage2DEXT, GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data) \
|
||||||
GLE(GLvoid, GenerateTextureMipmap, GLuint texture, GLenum target) \
|
GLE(GLvoid, GenerateTextureMipmapEXT, GLuint texture, GLenum target) \
|
||||||
GLE(GLvoid, ProgramUniform1i, GLuint program, GLint location, GLint v0) \
|
GLE(GLvoid, ProgramUniform1iEXT, GLuint program, GLint location, GLint v0) \
|
||||||
GLE(GLvoid, ProgramUniform1f, GLuint program, GLint location, GLfloat v0) \
|
GLE(GLvoid, ProgramUniform1fEXT, GLuint program, GLint location, GLfloat v0) \
|
||||||
GLE(GLvoid, ProgramUniform2f, GLuint program, GLint location, GLfloat v0, GLfloat v1) \
|
GLE(GLvoid, ProgramUniform2fEXT, GLuint program, GLint location, GLfloat v0, GLfloat v1) \
|
||||||
GLE(GLvoid, ProgramUniform3f, GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2) \
|
GLE(GLvoid, ProgramUniform3fEXT, GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2) \
|
||||||
GLE(GLvoid, ProgramUniform4f, GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) \
|
GLE(GLvoid, ProgramUniform4fEXT, GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) \
|
||||||
GLE(GLvoid, ProgramUniform1fv, GLuint program, GLint location, GLsizei count, const GLfloat *value) \
|
GLE(GLvoid, ProgramUniform1fvEXT, GLuint program, GLint location, GLsizei count, const GLfloat *value) \
|
||||||
GLE(GLvoid, ProgramUniformMatrix4fv, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) \
|
GLE(GLvoid, ProgramUniformMatrix4fvEXT, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) \
|
||||||
GLE(GLvoid, NamedRenderbufferStorage, GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height) \
|
GLE(GLvoid, NamedRenderbufferStorageEXT, GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height) \
|
||||||
GLE(GLvoid, NamedRenderbufferStorageMultisample, GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) \
|
GLE(GLvoid, NamedRenderbufferStorageMultisampleEXT, GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) \
|
||||||
GLE(GLenum, CheckNamedFramebufferStatus, GLuint framebuffer, GLenum target) \
|
GLE(GLenum, CheckNamedFramebufferStatusEXT, GLuint framebuffer, GLenum target) \
|
||||||
GLE(GLvoid, NamedFramebufferTexture2D, GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level) \
|
GLE(GLvoid, NamedFramebufferTexture2DEXT, GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level) \
|
||||||
GLE(GLvoid, NamedFramebufferRenderbuffer, GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) \
|
GLE(GLvoid, NamedFramebufferRenderbufferEXT, GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) \
|
||||||
|
|
||||||
#define GLE(ret, name, ...) typedef ret APIENTRY name##proc(__VA_ARGS__); extern name##proc * qgl##name;
|
#define GLE(ret, name, ...) typedef ret APIENTRY name##proc(__VA_ARGS__); extern name##proc * qgl##name;
|
||||||
QGL_1_2_PROCS;
|
QGL_1_2_PROCS;
|
||||||
|
|
|
@ -808,16 +808,16 @@ void RE_UploadCinematic (int w, int h, int cols, int rows, const byte *data, int
|
||||||
if ( cols != tr.scratchImage[client]->width || rows != tr.scratchImage[client]->height ) {
|
if ( cols != tr.scratchImage[client]->width || rows != tr.scratchImage[client]->height ) {
|
||||||
tr.scratchImage[client]->width = tr.scratchImage[client]->uploadWidth = cols;
|
tr.scratchImage[client]->width = tr.scratchImage[client]->uploadWidth = cols;
|
||||||
tr.scratchImage[client]->height = tr.scratchImage[client]->uploadHeight = rows;
|
tr.scratchImage[client]->height = tr.scratchImage[client]->uploadHeight = rows;
|
||||||
qglTextureImage2D(texture, GL_TEXTURE_2D, 0, GL_RGB8, cols, rows, 0, GL_RGBA, GL_UNSIGNED_BYTE, data);
|
qglTextureImage2DEXT(texture, GL_TEXTURE_2D, 0, GL_RGB8, cols, rows, 0, GL_RGBA, GL_UNSIGNED_BYTE, data);
|
||||||
qglTextureParameterf(texture, GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
qglTextureParameterfEXT(texture, GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||||
qglTextureParameterf(texture, GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
|
qglTextureParameterfEXT(texture, GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
|
||||||
qglTextureParameterf(texture, GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
qglTextureParameterfEXT(texture, GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||||
qglTextureParameterf(texture, GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
qglTextureParameterfEXT(texture, GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||||
} else {
|
} else {
|
||||||
if (dirty) {
|
if (dirty) {
|
||||||
// otherwise, just subimage upload it so that drivers can tell we are going to be changing
|
// otherwise, just subimage upload it so that drivers can tell we are going to be changing
|
||||||
// it and don't try and do a texture compression
|
// it and don't try and do a texture compression
|
||||||
qglTextureSubImage2D(texture, GL_TEXTURE_2D, 0, 0, 0, cols, rows, GL_RGBA, GL_UNSIGNED_BYTE, data);
|
qglTextureSubImage2DEXT(texture, GL_TEXTURE_2D, 0, 0, 0, cols, rows, GL_RGBA, GL_UNSIGNED_BYTE, data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -974,7 +974,7 @@ const void *RB_DrawSurfs( const void *data ) {
|
||||||
else if (tr.renderFbo == NULL && tr.renderDepthImage)
|
else if (tr.renderFbo == NULL && tr.renderDepthImage)
|
||||||
{
|
{
|
||||||
// If we're rendering directly to the screen, copy the depth to a texture
|
// If we're rendering directly to the screen, copy the depth to a texture
|
||||||
qglCopyTextureImage2D(tr.renderDepthImage->texnum, GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT24, 0, 0, glConfig.vidWidth, glConfig.vidHeight, 0);
|
qglCopyTextureImage2DEXT(tr.renderDepthImage->texnum, GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT24, 0, 0, glConfig.vidWidth, glConfig.vidHeight, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tr.hdrDepthFbo)
|
if (tr.hdrDepthFbo)
|
||||||
|
@ -1221,7 +1221,7 @@ const void *RB_DrawSurfs( const void *data ) {
|
||||||
|
|
||||||
FBO_Bind(NULL);
|
FBO_Bind(NULL);
|
||||||
if (cubemap && cubemap->image)
|
if (cubemap && cubemap->image)
|
||||||
qglGenerateTextureMipmap(cubemap->image->texnum, GL_TEXTURE_CUBE_MAP);
|
qglGenerateTextureMipmapEXT(cubemap->image->texnum, GL_TEXTURE_CUBE_MAP);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (const void *)(cmd + 1);
|
return (const void *)(cmd + 1);
|
||||||
|
@ -1478,14 +1478,14 @@ const void *RB_CapShadowMap(const void *data)
|
||||||
{
|
{
|
||||||
if (tr.shadowCubemaps[cmd->map])
|
if (tr.shadowCubemaps[cmd->map])
|
||||||
{
|
{
|
||||||
qglCopyTextureImage2D(tr.shadowCubemaps[cmd->map]->texnum, GL_TEXTURE_CUBE_MAP_POSITIVE_X + cmd->cubeSide, 0, GL_RGBA8, backEnd.refdef.x, glConfig.vidHeight - ( backEnd.refdef.y + PSHADOW_MAP_SIZE ), PSHADOW_MAP_SIZE, PSHADOW_MAP_SIZE, 0);
|
qglCopyTextureImage2DEXT(tr.shadowCubemaps[cmd->map]->texnum, GL_TEXTURE_CUBE_MAP_POSITIVE_X + cmd->cubeSide, 0, GL_RGBA8, backEnd.refdef.x, glConfig.vidHeight - ( backEnd.refdef.y + PSHADOW_MAP_SIZE ), PSHADOW_MAP_SIZE, PSHADOW_MAP_SIZE, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (tr.pshadowMaps[cmd->map])
|
if (tr.pshadowMaps[cmd->map])
|
||||||
{
|
{
|
||||||
qglCopyTextureImage2D(tr.pshadowMaps[cmd->map]->texnum, GL_TEXTURE_2D, 0, GL_RGBA8, backEnd.refdef.x, glConfig.vidHeight - (backEnd.refdef.y + PSHADOW_MAP_SIZE), PSHADOW_MAP_SIZE, PSHADOW_MAP_SIZE, 0);
|
qglCopyTextureImage2DEXT(tr.pshadowMaps[cmd->map]->texnum, GL_TEXTURE_2D, 0, GL_RGBA8, backEnd.refdef.x, glConfig.vidHeight - (backEnd.refdef.y + PSHADOW_MAP_SIZE), PSHADOW_MAP_SIZE, PSHADOW_MAP_SIZE, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ void GL_BindNullTextures()
|
||||||
{
|
{
|
||||||
for (i = 0; i < NUM_TEXTURE_BUNDLES; i++)
|
for (i = 0; i < NUM_TEXTURE_BUNDLES; i++)
|
||||||
{
|
{
|
||||||
qglBindMultiTexture(GL_TEXTURE0_ARB + i, GL_TEXTURE_2D, 0);
|
qglBindMultiTextureEXT(GL_TEXTURE0_ARB + i, GL_TEXTURE_2D, 0);
|
||||||
glDsaState.textures[i] = 0;
|
glDsaState.textures[i] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -71,12 +71,12 @@ int GL_BindMultiTexture(GLenum texunit, GLenum target, GLuint texture)
|
||||||
if (target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X && target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z)
|
if (target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X && target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z)
|
||||||
target = GL_TEXTURE_CUBE_MAP;
|
target = GL_TEXTURE_CUBE_MAP;
|
||||||
|
|
||||||
qglBindMultiTexture(texunit, target, texture);
|
qglBindMultiTextureEXT(texunit, target, texture);
|
||||||
glDsaState.textures[tmu] = texture;
|
glDsaState.textures[tmu] = texture;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
GLvoid APIENTRY GLDSA_BindMultiTexture(GLenum texunit, GLenum target, GLuint texture)
|
GLvoid APIENTRY GLDSA_BindMultiTextureEXT(GLenum texunit, GLenum target, GLuint texture)
|
||||||
{
|
{
|
||||||
if (glDsaState.texunit != texunit)
|
if (glDsaState.texunit != texunit)
|
||||||
{
|
{
|
||||||
|
@ -87,47 +87,47 @@ GLvoid APIENTRY GLDSA_BindMultiTexture(GLenum texunit, GLenum target, GLuint tex
|
||||||
qglBindTexture(target, texture);
|
qglBindTexture(target, texture);
|
||||||
}
|
}
|
||||||
|
|
||||||
GLvoid APIENTRY GLDSA_TextureParameterf(GLuint texture, GLenum target, GLenum pname, GLfloat param)
|
GLvoid APIENTRY GLDSA_TextureParameterfEXT(GLuint texture, GLenum target, GLenum pname, GLfloat param)
|
||||||
{
|
{
|
||||||
GL_BindMultiTexture(glDsaState.texunit, target, texture);
|
GL_BindMultiTexture(glDsaState.texunit, target, texture);
|
||||||
qglTexParameterf(target, pname, param);
|
qglTexParameterf(target, pname, param);
|
||||||
}
|
}
|
||||||
|
|
||||||
GLvoid APIENTRY GLDSA_TextureParameteri(GLuint texture, GLenum target, GLenum pname, GLint param)
|
GLvoid APIENTRY GLDSA_TextureParameteriEXT(GLuint texture, GLenum target, GLenum pname, GLint param)
|
||||||
{
|
{
|
||||||
GL_BindMultiTexture(glDsaState.texunit, target, texture);
|
GL_BindMultiTexture(glDsaState.texunit, target, texture);
|
||||||
qglTexParameteri(target, pname, param);
|
qglTexParameteri(target, pname, param);
|
||||||
}
|
}
|
||||||
|
|
||||||
GLvoid APIENTRY GLDSA_TextureImage2D(GLuint texture, GLenum target, GLint level, GLint internalformat,
|
GLvoid APIENTRY GLDSA_TextureImage2DEXT(GLuint texture, GLenum target, GLint level, GLint internalformat,
|
||||||
GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels)
|
GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels)
|
||||||
{
|
{
|
||||||
GL_BindMultiTexture(glDsaState.texunit, target, texture);
|
GL_BindMultiTexture(glDsaState.texunit, target, texture);
|
||||||
qglTexImage2D(target, level, internalformat, width, height, border, format, type, pixels);
|
qglTexImage2D(target, level, internalformat, width, height, border, format, type, pixels);
|
||||||
}
|
}
|
||||||
|
|
||||||
GLvoid APIENTRY GLDSA_TextureSubImage2D(GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset,
|
GLvoid APIENTRY GLDSA_TextureSubImage2DEXT(GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset,
|
||||||
GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)
|
GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)
|
||||||
{
|
{
|
||||||
GL_BindMultiTexture(glDsaState.texunit, target, texture);
|
GL_BindMultiTexture(glDsaState.texunit, target, texture);
|
||||||
qglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
|
qglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
|
||||||
}
|
}
|
||||||
|
|
||||||
GLvoid APIENTRY GLDSA_CopyTextureImage2D(GLuint texture, GLenum target, GLint level, GLenum internalformat,
|
GLvoid APIENTRY GLDSA_CopyTextureImage2DEXT(GLuint texture, GLenum target, GLint level, GLenum internalformat,
|
||||||
GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
|
GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
|
||||||
{
|
{
|
||||||
GL_BindMultiTexture(glDsaState.texunit, target, texture);
|
GL_BindMultiTexture(glDsaState.texunit, target, texture);
|
||||||
qglCopyTexImage2D(target, level, internalformat, x, y, width, height, border);
|
qglCopyTexImage2D(target, level, internalformat, x, y, width, height, border);
|
||||||
}
|
}
|
||||||
|
|
||||||
GLvoid APIENTRY GLDSA_CompressedTextureImage2D(GLuint texture, GLenum target, GLint level, GLenum internalformat,
|
GLvoid APIENTRY GLDSA_CompressedTextureImage2DEXT(GLuint texture, GLenum target, GLint level, GLenum internalformat,
|
||||||
GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data)
|
GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data)
|
||||||
{
|
{
|
||||||
GL_BindMultiTexture(glDsaState.texunit, target, texture);
|
GL_BindMultiTexture(glDsaState.texunit, target, texture);
|
||||||
qglCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
|
qglCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
GLvoid APIENTRY GLDSA_CompressedTextureSubImage2D(GLuint texture, GLenum target, GLint level,
|
GLvoid APIENTRY GLDSA_CompressedTextureSubImage2DEXT(GLuint texture, GLenum target, GLint level,
|
||||||
GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format,
|
GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format,
|
||||||
GLsizei imageSize, const GLvoid *data)
|
GLsizei imageSize, const GLvoid *data)
|
||||||
{
|
{
|
||||||
|
@ -135,7 +135,7 @@ GLvoid APIENTRY GLDSA_CompressedTextureSubImage2D(GLuint texture, GLenum target,
|
||||||
qglCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
|
qglCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
GLvoid APIENTRY GLDSA_GenerateTextureMipmap(GLuint texture, GLenum target)
|
GLvoid APIENTRY GLDSA_GenerateTextureMipmapEXT(GLuint texture, GLenum target)
|
||||||
{
|
{
|
||||||
GL_BindMultiTexture(glDsaState.texunit, target, texture);
|
GL_BindMultiTexture(glDsaState.texunit, target, texture);
|
||||||
qglGenerateMipmapEXT(target);
|
qglGenerateMipmapEXT(target);
|
||||||
|
@ -157,47 +157,47 @@ int GL_UseProgram(GLuint program)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
GLvoid APIENTRY GLDSA_ProgramUniform1i(GLuint program, GLint location, GLint v0)
|
GLvoid APIENTRY GLDSA_ProgramUniform1iEXT(GLuint program, GLint location, GLint v0)
|
||||||
{
|
{
|
||||||
GL_UseProgram(program);
|
GL_UseProgram(program);
|
||||||
qglUniform1i(location, v0);
|
qglUniform1i(location, v0);
|
||||||
}
|
}
|
||||||
|
|
||||||
GLvoid APIENTRY GLDSA_ProgramUniform1f(GLuint program, GLint location, GLfloat v0)
|
GLvoid APIENTRY GLDSA_ProgramUniform1fEXT(GLuint program, GLint location, GLfloat v0)
|
||||||
{
|
{
|
||||||
GL_UseProgram(program);
|
GL_UseProgram(program);
|
||||||
qglUniform1f(location, v0);
|
qglUniform1f(location, v0);
|
||||||
}
|
}
|
||||||
|
|
||||||
GLvoid APIENTRY GLDSA_ProgramUniform2f(GLuint program, GLint location,
|
GLvoid APIENTRY GLDSA_ProgramUniform2fEXT(GLuint program, GLint location,
|
||||||
GLfloat v0, GLfloat v1)
|
GLfloat v0, GLfloat v1)
|
||||||
{
|
{
|
||||||
GL_UseProgram(program);
|
GL_UseProgram(program);
|
||||||
qglUniform2f(location, v0, v1);
|
qglUniform2f(location, v0, v1);
|
||||||
}
|
}
|
||||||
|
|
||||||
GLvoid APIENTRY GLDSA_ProgramUniform3f(GLuint program, GLint location,
|
GLvoid APIENTRY GLDSA_ProgramUniform3fEXT(GLuint program, GLint location,
|
||||||
GLfloat v0, GLfloat v1, GLfloat v2)
|
GLfloat v0, GLfloat v1, GLfloat v2)
|
||||||
{
|
{
|
||||||
GL_UseProgram(program);
|
GL_UseProgram(program);
|
||||||
qglUniform3f(location, v0, v1, v2);
|
qglUniform3f(location, v0, v1, v2);
|
||||||
}
|
}
|
||||||
|
|
||||||
GLvoid APIENTRY GLDSA_ProgramUniform4f(GLuint program, GLint location,
|
GLvoid APIENTRY GLDSA_ProgramUniform4fEXT(GLuint program, GLint location,
|
||||||
GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)
|
GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)
|
||||||
{
|
{
|
||||||
GL_UseProgram(program);
|
GL_UseProgram(program);
|
||||||
qglUniform4f(location, v0, v1, v2, v3);
|
qglUniform4f(location, v0, v1, v2, v3);
|
||||||
}
|
}
|
||||||
|
|
||||||
GLvoid APIENTRY GLDSA_ProgramUniform1fv(GLuint program, GLint location,
|
GLvoid APIENTRY GLDSA_ProgramUniform1fvEXT(GLuint program, GLint location,
|
||||||
GLsizei count, const GLfloat *value)
|
GLsizei count, const GLfloat *value)
|
||||||
{
|
{
|
||||||
GL_UseProgram(program);
|
GL_UseProgram(program);
|
||||||
qglUniform1fv(location, count, value);
|
qglUniform1fv(location, count, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
GLvoid APIENTRY GLDSA_ProgramUniformMatrix4fv(GLuint program, GLint location,
|
GLvoid APIENTRY GLDSA_ProgramUniformMatrix4fvEXT(GLuint program, GLint location,
|
||||||
GLsizei count, GLboolean transpose,
|
GLsizei count, GLboolean transpose,
|
||||||
const GLfloat *value)
|
const GLfloat *value)
|
||||||
{
|
{
|
||||||
|
@ -252,34 +252,34 @@ void GL_BindRenderbuffer(GLuint renderbuffer)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GLvoid APIENTRY GLDSA_NamedRenderbufferStorage(GLuint renderbuffer,
|
GLvoid APIENTRY GLDSA_NamedRenderbufferStorageEXT(GLuint renderbuffer,
|
||||||
GLenum internalformat, GLsizei width, GLsizei height)
|
GLenum internalformat, GLsizei width, GLsizei height)
|
||||||
{
|
{
|
||||||
GL_BindRenderbuffer(renderbuffer);
|
GL_BindRenderbuffer(renderbuffer);
|
||||||
qglRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, internalformat, width, height);
|
qglRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, internalformat, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
GLvoid APIENTRY GLDSA_NamedRenderbufferStorageMultisample(GLuint renderbuffer,
|
GLvoid APIENTRY GLDSA_NamedRenderbufferStorageMultisampleEXT(GLuint renderbuffer,
|
||||||
GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
|
GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
|
||||||
{
|
{
|
||||||
GL_BindRenderbuffer(renderbuffer);
|
GL_BindRenderbuffer(renderbuffer);
|
||||||
qglRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER_EXT, samples, internalformat, width, height);
|
qglRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER_EXT, samples, internalformat, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
GLenum APIENTRY GLDSA_CheckNamedFramebufferStatus(GLuint framebuffer, GLenum target)
|
GLenum APIENTRY GLDSA_CheckNamedFramebufferStatusEXT(GLuint framebuffer, GLenum target)
|
||||||
{
|
{
|
||||||
GL_BindFramebuffer(target, framebuffer);
|
GL_BindFramebuffer(target, framebuffer);
|
||||||
return qglCheckFramebufferStatusEXT(target);
|
return qglCheckFramebufferStatusEXT(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
GLvoid APIENTRY GLDSA_NamedFramebufferTexture2D(GLuint framebuffer,
|
GLvoid APIENTRY GLDSA_NamedFramebufferTexture2DEXT(GLuint framebuffer,
|
||||||
GLenum attachment, GLenum textarget, GLuint texture, GLint level)
|
GLenum attachment, GLenum textarget, GLuint texture, GLint level)
|
||||||
{
|
{
|
||||||
GL_BindFramebuffer(GL_FRAMEBUFFER_EXT, framebuffer);
|
GL_BindFramebuffer(GL_FRAMEBUFFER_EXT, framebuffer);
|
||||||
qglFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, attachment, textarget, texture, level);
|
qglFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, attachment, textarget, texture, level);
|
||||||
}
|
}
|
||||||
|
|
||||||
GLvoid APIENTRY GLDSA_NamedFramebufferRenderbuffer(GLuint framebuffer,
|
GLvoid APIENTRY GLDSA_NamedFramebufferRenderbufferEXT(GLuint framebuffer,
|
||||||
GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
|
GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
|
||||||
{
|
{
|
||||||
GL_BindFramebuffer(GL_FRAMEBUFFER_EXT, framebuffer);
|
GL_BindFramebuffer(GL_FRAMEBUFFER_EXT, framebuffer);
|
||||||
|
|
|
@ -26,37 +26,37 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
void GL_BindNullTextures(void);
|
void GL_BindNullTextures(void);
|
||||||
int GL_BindMultiTexture(GLenum texunit, GLenum target, GLuint texture);
|
int GL_BindMultiTexture(GLenum texunit, GLenum target, GLuint texture);
|
||||||
|
|
||||||
GLvoid APIENTRY GLDSA_BindMultiTexture(GLenum texunit, GLenum target, GLuint texture);
|
GLvoid APIENTRY GLDSA_BindMultiTextureEXT(GLenum texunit, GLenum target, GLuint texture);
|
||||||
GLvoid APIENTRY GLDSA_TextureParameterf(GLuint texture, GLenum target, GLenum pname, GLfloat param);
|
GLvoid APIENTRY GLDSA_TextureParameterfEXT(GLuint texture, GLenum target, GLenum pname, GLfloat param);
|
||||||
GLvoid APIENTRY GLDSA_TextureParameteri(GLuint texture, GLenum target, GLenum pname, GLint param);
|
GLvoid APIENTRY GLDSA_TextureParameteriEXT(GLuint texture, GLenum target, GLenum pname, GLint param);
|
||||||
GLvoid APIENTRY GLDSA_TextureImage2D(GLuint texture, GLenum target, GLint level, GLint internalformat,
|
GLvoid APIENTRY GLDSA_TextureImage2DEXT(GLuint texture, GLenum target, GLint level, GLint internalformat,
|
||||||
GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
|
GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
|
||||||
GLvoid APIENTRY GLDSA_TextureSubImage2D(GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset,
|
GLvoid APIENTRY GLDSA_TextureSubImage2DEXT(GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset,
|
||||||
GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
|
GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
|
||||||
GLvoid APIENTRY GLDSA_CopyTextureImage2D(GLuint texture, GLenum target, GLint level, GLenum internalformat,
|
GLvoid APIENTRY GLDSA_CopyTextureImage2DEXT(GLuint texture, GLenum target, GLint level, GLenum internalformat,
|
||||||
GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
|
GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
|
||||||
GLvoid APIENTRY GLDSA_CompressedTextureImage2D(GLuint texture, GLenum target, GLint level, GLenum internalformat,
|
GLvoid APIENTRY GLDSA_CompressedTextureImage2DEXT(GLuint texture, GLenum target, GLint level, GLenum internalformat,
|
||||||
GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
|
GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
|
||||||
GLvoid APIENTRY GLDSA_CompressedTextureSubImage2D(GLuint texture, GLenum target, GLint level,
|
GLvoid APIENTRY GLDSA_CompressedTextureSubImage2DEXT(GLuint texture, GLenum target, GLint level,
|
||||||
GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format,
|
GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format,
|
||||||
GLsizei imageSize, const GLvoid *data);
|
GLsizei imageSize, const GLvoid *data);
|
||||||
|
|
||||||
GLvoid APIENTRY GLDSA_GenerateTextureMipmap(GLuint texture, GLenum target);
|
GLvoid APIENTRY GLDSA_GenerateTextureMipmapEXT(GLuint texture, GLenum target);
|
||||||
|
|
||||||
void GL_BindNullProgram(void);
|
void GL_BindNullProgram(void);
|
||||||
int GL_UseProgram(GLuint program);
|
int GL_UseProgram(GLuint program);
|
||||||
|
|
||||||
GLvoid APIENTRY GLDSA_ProgramUniform1i(GLuint program, GLint location, GLint v0);
|
GLvoid APIENTRY GLDSA_ProgramUniform1iEXT(GLuint program, GLint location, GLint v0);
|
||||||
GLvoid APIENTRY GLDSA_ProgramUniform1f(GLuint program, GLint location, GLfloat v0);
|
GLvoid APIENTRY GLDSA_ProgramUniform1fEXT(GLuint program, GLint location, GLfloat v0);
|
||||||
GLvoid APIENTRY GLDSA_ProgramUniform2f(GLuint program, GLint location,
|
GLvoid APIENTRY GLDSA_ProgramUniform2fEXT(GLuint program, GLint location,
|
||||||
GLfloat v0, GLfloat v1);
|
GLfloat v0, GLfloat v1);
|
||||||
GLvoid APIENTRY GLDSA_ProgramUniform3f(GLuint program, GLint location,
|
GLvoid APIENTRY GLDSA_ProgramUniform3fEXT(GLuint program, GLint location,
|
||||||
GLfloat v0, GLfloat v1, GLfloat v2);
|
GLfloat v0, GLfloat v1, GLfloat v2);
|
||||||
GLvoid APIENTRY GLDSA_ProgramUniform4f(GLuint program, GLint location,
|
GLvoid APIENTRY GLDSA_ProgramUniform4fEXT(GLuint program, GLint location,
|
||||||
GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
|
GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
|
||||||
GLvoid APIENTRY GLDSA_ProgramUniform1fv(GLuint program, GLint location,
|
GLvoid APIENTRY GLDSA_ProgramUniform1fvEXT(GLuint program, GLint location,
|
||||||
GLsizei count, const GLfloat *value);
|
GLsizei count, const GLfloat *value);
|
||||||
GLvoid APIENTRY GLDSA_ProgramUniformMatrix4fv(GLuint program, GLint location,
|
GLvoid APIENTRY GLDSA_ProgramUniformMatrix4fvEXT(GLuint program, GLint location,
|
||||||
GLsizei count, GLboolean transpose,
|
GLsizei count, GLboolean transpose,
|
||||||
const GLfloat *value);
|
const GLfloat *value);
|
||||||
|
|
||||||
|
@ -64,16 +64,16 @@ void GL_BindNullFramebuffers(void);
|
||||||
void GL_BindFramebuffer(GLenum target, GLuint framebuffer);
|
void GL_BindFramebuffer(GLenum target, GLuint framebuffer);
|
||||||
void GL_BindRenderbuffer(GLuint renderbuffer);
|
void GL_BindRenderbuffer(GLuint renderbuffer);
|
||||||
|
|
||||||
GLvoid APIENTRY GLDSA_NamedRenderbufferStorage(GLuint renderbuffer,
|
GLvoid APIENTRY GLDSA_NamedRenderbufferStorageEXT(GLuint renderbuffer,
|
||||||
GLenum internalformat, GLsizei width, GLsizei height);
|
GLenum internalformat, GLsizei width, GLsizei height);
|
||||||
|
|
||||||
GLvoid APIENTRY GLDSA_NamedRenderbufferStorageMultisample(GLuint renderbuffer,
|
GLvoid APIENTRY GLDSA_NamedRenderbufferStorageMultisampleEXT(GLuint renderbuffer,
|
||||||
GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
|
GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
|
||||||
|
|
||||||
GLenum APIENTRY GLDSA_CheckNamedFramebufferStatus(GLuint framebuffer, GLenum target);
|
GLenum APIENTRY GLDSA_CheckNamedFramebufferStatusEXT(GLuint framebuffer, GLenum target);
|
||||||
GLvoid APIENTRY GLDSA_NamedFramebufferTexture2D(GLuint framebuffer,
|
GLvoid APIENTRY GLDSA_NamedFramebufferTexture2DEXT(GLuint framebuffer,
|
||||||
GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
||||||
GLvoid APIENTRY GLDSA_NamedFramebufferRenderbuffer(GLuint framebuffer,
|
GLvoid APIENTRY GLDSA_NamedFramebufferRenderbufferEXT(GLuint framebuffer,
|
||||||
GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
|
GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -43,96 +43,6 @@ QGL_ARB_vertex_array_object_PROCS;
|
||||||
QGL_EXT_direct_state_access_PROCS;
|
QGL_EXT_direct_state_access_PROCS;
|
||||||
#undef GLE
|
#undef GLE
|
||||||
|
|
||||||
// GL_EXT_framebuffer_object
|
|
||||||
GLboolean (APIENTRY * qglIsRenderbufferEXT)(GLuint renderbuffer);
|
|
||||||
void (APIENTRY * qglBindRenderbufferEXT)(GLenum target, GLuint renderbuffer);
|
|
||||||
void (APIENTRY * qglDeleteRenderbuffersEXT)(GLsizei n, const GLuint *renderbuffers);
|
|
||||||
void (APIENTRY * qglGenRenderbuffersEXT)(GLsizei n, GLuint *renderbuffers);
|
|
||||||
|
|
||||||
void (APIENTRY * qglRenderbufferStorageEXT)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
|
|
||||||
|
|
||||||
void (APIENTRY * qglGetRenderbufferParameterivEXT)(GLenum target, GLenum pname, GLint *params);
|
|
||||||
|
|
||||||
GLboolean (APIENTRY * qglIsFramebufferEXT)(GLuint framebuffer);
|
|
||||||
void (APIENTRY * qglBindFramebufferEXT)(GLenum target, GLuint framebuffer);
|
|
||||||
void (APIENTRY * qglDeleteFramebuffersEXT)(GLsizei n, const GLuint *framebuffers);
|
|
||||||
void (APIENTRY * qglGenFramebuffersEXT)(GLsizei n, GLuint *framebuffers);
|
|
||||||
|
|
||||||
GLenum (APIENTRY * qglCheckFramebufferStatusEXT)(GLenum target);
|
|
||||||
|
|
||||||
void (APIENTRY * qglFramebufferTexture1DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture,
|
|
||||||
GLint level);
|
|
||||||
void (APIENTRY * qglFramebufferTexture2DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture,
|
|
||||||
GLint level);
|
|
||||||
void (APIENTRY * qglFramebufferTexture3DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture,
|
|
||||||
GLint level, GLint zoffset);
|
|
||||||
|
|
||||||
void (APIENTRY * qglFramebufferRenderbufferEXT)(GLenum target, GLenum attachment, GLenum renderbuffertarget,
|
|
||||||
GLuint renderbuffer);
|
|
||||||
|
|
||||||
void (APIENTRY * qglGetFramebufferAttachmentParameterivEXT)(GLenum target, GLenum attachment, GLenum pname, GLint *params);
|
|
||||||
|
|
||||||
void (APIENTRY * qglGenerateMipmapEXT)(GLenum target);
|
|
||||||
|
|
||||||
// GL_EXT_framebuffer_blit
|
|
||||||
void (APIENTRY * qglBlitFramebufferEXT)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
|
|
||||||
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
|
|
||||||
GLbitfield mask, GLenum filter);
|
|
||||||
|
|
||||||
// GL_EXT_framebuffer_multisample
|
|
||||||
void (APIENTRY * qglRenderbufferStorageMultisampleEXT)(GLenum target, GLsizei samples,
|
|
||||||
GLenum internalformat, GLsizei width, GLsizei height);
|
|
||||||
|
|
||||||
// GL_ARB_vertex_array_object
|
|
||||||
void (APIENTRY * qglBindVertexArrayARB)(GLuint array);
|
|
||||||
void (APIENTRY * qglDeleteVertexArraysARB)(GLsizei n, const GLuint *arrays);
|
|
||||||
void (APIENTRY * qglGenVertexArraysARB)(GLsizei n, GLuint *arrays);
|
|
||||||
GLboolean (APIENTRY * qglIsVertexArrayARB)(GLuint array);
|
|
||||||
|
|
||||||
// GL_EXT_direct_state_access
|
|
||||||
GLvoid (APIENTRY * qglBindMultiTexture)(GLenum texunit, GLenum target, GLuint texture);
|
|
||||||
GLvoid (APIENTRY * qglTextureParameterf)(GLuint texture, GLenum target, GLenum pname, GLfloat param);
|
|
||||||
GLvoid (APIENTRY * qglTextureParameteri)(GLuint texture, GLenum target, GLenum pname, GLint param);
|
|
||||||
GLvoid (APIENTRY * qglTextureImage2D)(GLuint texture, GLenum target, GLint level, GLint internalformat,
|
|
||||||
GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
|
|
||||||
GLvoid (APIENTRY * qglTextureSubImage2D)(GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset,
|
|
||||||
GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
|
|
||||||
GLvoid (APIENTRY * qglCopyTextureImage2D)(GLuint texture, GLenum target, GLint level, GLenum internalformat,
|
|
||||||
GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
|
|
||||||
GLvoid (APIENTRY * qglCompressedTextureImage2D)(GLuint texture, GLenum target, GLint level, GLenum internalformat,
|
|
||||||
GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
|
|
||||||
GLvoid (APIENTRY * qglCompressedTextureSubImage2D)(GLuint texture, GLenum target, GLint level,
|
|
||||||
GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format,
|
|
||||||
GLsizei imageSize, const GLvoid *data);
|
|
||||||
GLvoid (APIENTRY * qglGenerateTextureMipmap)(GLuint texture, GLenum target);
|
|
||||||
|
|
||||||
GLvoid(APIENTRY * qglProgramUniform1i)(GLuint program, GLint location, GLint v0);
|
|
||||||
GLvoid(APIENTRY * qglProgramUniform1f)(GLuint program, GLint location, GLfloat v0);
|
|
||||||
GLvoid(APIENTRY * qglProgramUniform2f)(GLuint program, GLint location,
|
|
||||||
GLfloat v0, GLfloat v1);
|
|
||||||
GLvoid(APIENTRY * qglProgramUniform3f)(GLuint program, GLint location,
|
|
||||||
GLfloat v0, GLfloat v1, GLfloat v2);
|
|
||||||
GLvoid(APIENTRY * qglProgramUniform4f)(GLuint program, GLint location,
|
|
||||||
GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
|
|
||||||
GLvoid(APIENTRY * qglProgramUniform1fv)(GLuint program, GLint location,
|
|
||||||
GLsizei count, const GLfloat *value);
|
|
||||||
GLvoid(APIENTRY * qglProgramUniformMatrix4fv)(GLuint program, GLint location,
|
|
||||||
GLsizei count, GLboolean transpose,
|
|
||||||
const GLfloat *value);
|
|
||||||
|
|
||||||
GLvoid(APIENTRY * qglNamedRenderbufferStorage)(GLuint renderbuffer,
|
|
||||||
GLenum internalformat, GLsizei width, GLsizei height);
|
|
||||||
|
|
||||||
GLvoid(APIENTRY * qglNamedRenderbufferStorageMultisample)(GLuint renderbuffer,
|
|
||||||
GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
|
|
||||||
|
|
||||||
GLenum(APIENTRY * qglCheckNamedFramebufferStatus)(GLuint framebuffer, GLenum target);
|
|
||||||
GLvoid(APIENTRY * qglNamedFramebufferTexture2D)(GLuint framebuffer,
|
|
||||||
GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
|
||||||
GLvoid(APIENTRY * qglNamedFramebufferRenderbuffer)(GLuint framebuffer,
|
|
||||||
GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
|
|
||||||
|
|
||||||
|
|
||||||
static qboolean GLimp_HaveExtension(const char *ext)
|
static qboolean GLimp_HaveExtension(const char *ext)
|
||||||
{
|
{
|
||||||
const char *ptr = Q_stristr( glConfig.extensions_string, ext );
|
const char *ptr = Q_stristr( glConfig.extensions_string, ext );
|
||||||
|
|
|
@ -32,7 +32,7 @@ R_CheckFBO
|
||||||
*/
|
*/
|
||||||
qboolean R_CheckFBO(const FBO_t * fbo)
|
qboolean R_CheckFBO(const FBO_t * fbo)
|
||||||
{
|
{
|
||||||
GLenum code = qglCheckNamedFramebufferStatus(fbo->frameBuffer, GL_FRAMEBUFFER_EXT);
|
GLenum code = qglCheckNamedFramebufferStatusEXT(fbo->frameBuffer, GL_FRAMEBUFFER_EXT);
|
||||||
|
|
||||||
if(code == GL_FRAMEBUFFER_COMPLETE_EXT)
|
if(code == GL_FRAMEBUFFER_COMPLETE_EXT)
|
||||||
return qtrue;
|
return qtrue;
|
||||||
|
@ -184,20 +184,20 @@ void FBO_CreateBuffer(FBO_t *fbo, int format, int index, int multisample)
|
||||||
qglGenRenderbuffersEXT(1, pRenderBuffer);
|
qglGenRenderbuffersEXT(1, pRenderBuffer);
|
||||||
|
|
||||||
if (multisample && glRefConfig.framebufferMultisample)
|
if (multisample && glRefConfig.framebufferMultisample)
|
||||||
qglNamedRenderbufferStorageMultisample(*pRenderBuffer, multisample, format, fbo->width, fbo->height);
|
qglNamedRenderbufferStorageMultisampleEXT(*pRenderBuffer, multisample, format, fbo->width, fbo->height);
|
||||||
else
|
else
|
||||||
qglNamedRenderbufferStorage(*pRenderBuffer, format, fbo->width, fbo->height);
|
qglNamedRenderbufferStorageEXT(*pRenderBuffer, format, fbo->width, fbo->height);
|
||||||
|
|
||||||
if(absent)
|
if(absent)
|
||||||
{
|
{
|
||||||
if (attachment == 0)
|
if (attachment == 0)
|
||||||
{
|
{
|
||||||
qglNamedFramebufferRenderbuffer(fbo->frameBuffer, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, *pRenderBuffer);
|
qglNamedFramebufferRenderbufferEXT(fbo->frameBuffer, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, *pRenderBuffer);
|
||||||
qglNamedFramebufferRenderbuffer(fbo->frameBuffer, GL_STENCIL_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, *pRenderBuffer);
|
qglNamedFramebufferRenderbufferEXT(fbo->frameBuffer, GL_STENCIL_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, *pRenderBuffer);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qglNamedFramebufferRenderbuffer(fbo->frameBuffer, attachment, GL_RENDERBUFFER_EXT, *pRenderBuffer);
|
qglNamedFramebufferRenderbufferEXT(fbo->frameBuffer, attachment, GL_RENDERBUFFER_EXT, *pRenderBuffer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -216,7 +216,7 @@ void FBO_AttachImage(FBO_t *fbo, image_t *image, GLenum attachment, GLuint cubem
|
||||||
if (image->flags & IMGFLAG_CUBEMAP)
|
if (image->flags & IMGFLAG_CUBEMAP)
|
||||||
target = GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB + cubemapside;
|
target = GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB + cubemapside;
|
||||||
|
|
||||||
qglNamedFramebufferTexture2D(fbo->frameBuffer, attachment, target, image->texnum, 0);
|
qglNamedFramebufferTexture2DEXT(fbo->frameBuffer, attachment, target, image->texnum, 0);
|
||||||
index = attachment - GL_COLOR_ATTACHMENT0_EXT;
|
index = attachment - GL_COLOR_ATTACHMENT0_EXT;
|
||||||
if (index >= 0 && index <= 15)
|
if (index >= 0 && index <= 15)
|
||||||
fbo->colorImage[index] = image;
|
fbo->colorImage[index] = image;
|
||||||
|
|
|
@ -701,7 +701,7 @@ void GLSL_SetUniformInt(shaderProgram_t *program, int uniformNum, GLint value)
|
||||||
|
|
||||||
*compare = value;
|
*compare = value;
|
||||||
|
|
||||||
qglProgramUniform1i(program->program, uniforms[uniformNum], value);
|
qglProgramUniform1iEXT(program->program, uniforms[uniformNum], value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLSL_SetUniformFloat(shaderProgram_t *program, int uniformNum, GLfloat value)
|
void GLSL_SetUniformFloat(shaderProgram_t *program, int uniformNum, GLfloat value)
|
||||||
|
@ -725,7 +725,7 @@ void GLSL_SetUniformFloat(shaderProgram_t *program, int uniformNum, GLfloat valu
|
||||||
|
|
||||||
*compare = value;
|
*compare = value;
|
||||||
|
|
||||||
qglProgramUniform1f(program->program, uniforms[uniformNum], value);
|
qglProgramUniform1fEXT(program->program, uniforms[uniformNum], value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLSL_SetUniformVec2(shaderProgram_t *program, int uniformNum, const vec2_t v)
|
void GLSL_SetUniformVec2(shaderProgram_t *program, int uniformNum, const vec2_t v)
|
||||||
|
@ -750,7 +750,7 @@ void GLSL_SetUniformVec2(shaderProgram_t *program, int uniformNum, const vec2_t
|
||||||
compare[0] = v[0];
|
compare[0] = v[0];
|
||||||
compare[1] = v[1];
|
compare[1] = v[1];
|
||||||
|
|
||||||
qglProgramUniform2f(program->program, uniforms[uniformNum], v[0], v[1]);
|
qglProgramUniform2fEXT(program->program, uniforms[uniformNum], v[0], v[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLSL_SetUniformVec3(shaderProgram_t *program, int uniformNum, const vec3_t v)
|
void GLSL_SetUniformVec3(shaderProgram_t *program, int uniformNum, const vec3_t v)
|
||||||
|
@ -774,7 +774,7 @@ void GLSL_SetUniformVec3(shaderProgram_t *program, int uniformNum, const vec3_t
|
||||||
|
|
||||||
VectorCopy(v, compare);
|
VectorCopy(v, compare);
|
||||||
|
|
||||||
qglProgramUniform3f(program->program, uniforms[uniformNum], v[0], v[1], v[2]);
|
qglProgramUniform3fEXT(program->program, uniforms[uniformNum], v[0], v[1], v[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLSL_SetUniformVec4(shaderProgram_t *program, int uniformNum, const vec4_t v)
|
void GLSL_SetUniformVec4(shaderProgram_t *program, int uniformNum, const vec4_t v)
|
||||||
|
@ -798,7 +798,7 @@ void GLSL_SetUniformVec4(shaderProgram_t *program, int uniformNum, const vec4_t
|
||||||
|
|
||||||
VectorCopy4(v, compare);
|
VectorCopy4(v, compare);
|
||||||
|
|
||||||
qglProgramUniform4f(program->program, uniforms[uniformNum], v[0], v[1], v[2], v[3]);
|
qglProgramUniform4fEXT(program->program, uniforms[uniformNum], v[0], v[1], v[2], v[3]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLSL_SetUniformFloat5(shaderProgram_t *program, int uniformNum, const vec5_t v)
|
void GLSL_SetUniformFloat5(shaderProgram_t *program, int uniformNum, const vec5_t v)
|
||||||
|
@ -822,7 +822,7 @@ void GLSL_SetUniformFloat5(shaderProgram_t *program, int uniformNum, const vec5_
|
||||||
|
|
||||||
VectorCopy5(v, compare);
|
VectorCopy5(v, compare);
|
||||||
|
|
||||||
qglProgramUniform1fv(program->program, uniforms[uniformNum], 5, v);
|
qglProgramUniform1fvEXT(program->program, uniforms[uniformNum], 5, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLSL_SetUniformMat4(shaderProgram_t *program, int uniformNum, const mat4_t matrix)
|
void GLSL_SetUniformMat4(shaderProgram_t *program, int uniformNum, const mat4_t matrix)
|
||||||
|
@ -846,7 +846,7 @@ void GLSL_SetUniformMat4(shaderProgram_t *program, int uniformNum, const mat4_t
|
||||||
|
|
||||||
Mat4Copy(matrix, compare);
|
Mat4Copy(matrix, compare);
|
||||||
|
|
||||||
qglProgramUniformMatrix4fv(program->program, uniforms[uniformNum], 1, GL_FALSE, matrix);
|
qglProgramUniformMatrix4fvEXT(program->program, uniforms[uniformNum], 1, GL_FALSE, matrix);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLSL_DeleteGPUShader(shaderProgram_t *program)
|
void GLSL_DeleteGPUShader(shaderProgram_t *program)
|
||||||
|
|
|
@ -116,8 +116,8 @@ void GL_TextureMode( const char *string ) {
|
||||||
for ( i = 0 ; i < tr.numImages ; i++ ) {
|
for ( i = 0 ; i < tr.numImages ; i++ ) {
|
||||||
glt = tr.images[ i ];
|
glt = tr.images[ i ];
|
||||||
if ( glt->flags & IMGFLAG_MIPMAP && !(glt->flags & IMGFLAG_CUBEMAP)) {
|
if ( glt->flags & IMGFLAG_MIPMAP && !(glt->flags & IMGFLAG_CUBEMAP)) {
|
||||||
qglTextureParameterf(glt->texnum, GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, gl_filter_min);
|
qglTextureParameterfEXT(glt->texnum, GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, gl_filter_min);
|
||||||
qglTextureParameterf(glt->texnum, GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gl_filter_max);
|
qglTextureParameterfEXT(glt->texnum, GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gl_filter_max);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1858,7 +1858,7 @@ static void RawImage_UploadToRgtc2Texture(GLuint texture, byte *data, int width,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
qglCompressedTextureImage2D(texture, GL_TEXTURE_2D, mip, GL_COMPRESSED_RG_RGTC2, width, height, 0, size, compressedData);
|
qglCompressedTextureImage2DEXT(texture, GL_TEXTURE_2D, mip, GL_COMPRESSED_RG_RGTC2, width, height, 0, size, compressedData);
|
||||||
|
|
||||||
ri.Hunk_FreeTempMemory(compressedData);
|
ri.Hunk_FreeTempMemory(compressedData);
|
||||||
}
|
}
|
||||||
|
@ -1938,7 +1938,7 @@ static void RawImage_UploadTexture(GLuint texture, byte *data, int x, int y, int
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
lastMip = (width == 1 && height == 1) || !mipmap;
|
lastMip = (width == 1 && height == 1) || !mipmap;
|
||||||
qglTextureImage2D(texture, target, miplevel, internalFormat, width, height, 0, dataFormat, dataType, NULL);
|
qglTextureImage2DEXT(texture, target, miplevel, internalFormat, width, height, 0, dataFormat, dataType, NULL);
|
||||||
|
|
||||||
width = MAX(1, width >> 1);
|
width = MAX(1, width >> 1);
|
||||||
height = MAX(1, height >> 1);
|
height = MAX(1, height >> 1);
|
||||||
|
@ -1971,9 +1971,9 @@ static void RawImage_UploadTexture(GLuint texture, byte *data, int x, int y, int
|
||||||
if (compressed)
|
if (compressed)
|
||||||
{
|
{
|
||||||
if (subtexture)
|
if (subtexture)
|
||||||
qglCompressedTextureSubImage2D(texture, target, miplevel, x, y, width, height, picFormat, size, data);
|
qglCompressedTextureSubImage2DEXT(texture, target, miplevel, x, y, width, height, picFormat, size, data);
|
||||||
else
|
else
|
||||||
qglCompressedTextureImage2D(texture, target, miplevel, picFormat, width, height, 0, size, data);
|
qglCompressedTextureImage2DEXT(texture, target, miplevel, picFormat, width, height, 0, size, data);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1983,9 +1983,9 @@ static void RawImage_UploadTexture(GLuint texture, byte *data, int x, int y, int
|
||||||
if (rgtc)
|
if (rgtc)
|
||||||
RawImage_UploadToRgtc2Texture(texture, data, width, height, miplevel);
|
RawImage_UploadToRgtc2Texture(texture, data, width, height, miplevel);
|
||||||
else if (subtexture)
|
else if (subtexture)
|
||||||
qglTextureSubImage2D(texture, target, miplevel, x, y, width, height, dataFormat, dataType, data);
|
qglTextureSubImage2DEXT(texture, target, miplevel, x, y, width, height, dataFormat, dataType, data);
|
||||||
else
|
else
|
||||||
qglTextureImage2D(texture, target, miplevel, internalFormat, width, height, 0, dataFormat, dataType, data);
|
qglTextureImage2DEXT(texture, target, miplevel, internalFormat, width, height, 0, dataFormat, dataType, data);
|
||||||
|
|
||||||
if (!lastMip && numMips < 2)
|
if (!lastMip && numMips < 2)
|
||||||
{
|
{
|
||||||
|
@ -2112,19 +2112,19 @@ done:
|
||||||
if (mipmap)
|
if (mipmap)
|
||||||
{
|
{
|
||||||
if (textureFilterAnisotropic && !cubemap)
|
if (textureFilterAnisotropic && !cubemap)
|
||||||
qglTextureParameteri(image->texnum, textureTarget, GL_TEXTURE_MAX_ANISOTROPY_EXT,
|
qglTextureParameteriEXT(image->texnum, textureTarget, GL_TEXTURE_MAX_ANISOTROPY_EXT,
|
||||||
(GLint)Com_Clamp(1, maxAnisotropy, r_ext_max_anisotropy->integer));
|
(GLint)Com_Clamp(1, maxAnisotropy, r_ext_max_anisotropy->integer));
|
||||||
|
|
||||||
qglTextureParameterf(image->texnum, textureTarget, GL_TEXTURE_MIN_FILTER, gl_filter_min);
|
qglTextureParameterfEXT(image->texnum, textureTarget, GL_TEXTURE_MIN_FILTER, gl_filter_min);
|
||||||
qglTextureParameterf(image->texnum, textureTarget, GL_TEXTURE_MAG_FILTER, gl_filter_max);
|
qglTextureParameterfEXT(image->texnum, textureTarget, GL_TEXTURE_MAG_FILTER, gl_filter_max);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (textureFilterAnisotropic && !cubemap)
|
if (textureFilterAnisotropic && !cubemap)
|
||||||
qglTextureParameteri(image->texnum, textureTarget, GL_TEXTURE_MAX_ANISOTROPY_EXT, 1);
|
qglTextureParameteriEXT(image->texnum, textureTarget, GL_TEXTURE_MAX_ANISOTROPY_EXT, 1);
|
||||||
|
|
||||||
qglTextureParameterf(image->texnum, textureTarget, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
qglTextureParameterfEXT(image->texnum, textureTarget, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||||
qglTextureParameterf(image->texnum, textureTarget, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
qglTextureParameterfEXT(image->texnum, textureTarget, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fix for sampling depth buffer on old nVidia cards
|
// Fix for sampling depth buffer on old nVidia cards
|
||||||
|
@ -2135,9 +2135,9 @@ done:
|
||||||
case GL_DEPTH_COMPONENT16_ARB:
|
case GL_DEPTH_COMPONENT16_ARB:
|
||||||
case GL_DEPTH_COMPONENT24_ARB:
|
case GL_DEPTH_COMPONENT24_ARB:
|
||||||
case GL_DEPTH_COMPONENT32_ARB:
|
case GL_DEPTH_COMPONENT32_ARB:
|
||||||
qglTextureParameterf(image->texnum, textureTarget, GL_DEPTH_TEXTURE_MODE, GL_LUMINANCE);
|
qglTextureParameterfEXT(image->texnum, textureTarget, GL_DEPTH_TEXTURE_MODE, GL_LUMINANCE);
|
||||||
qglTextureParameterf(image->texnum, textureTarget, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
qglTextureParameterfEXT(image->texnum, textureTarget, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||||
qglTextureParameterf(image->texnum, textureTarget, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
qglTextureParameterfEXT(image->texnum, textureTarget, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -2199,14 +2199,14 @@ image_t *R_CreateImage2( const char *name, byte *pic, int width, int height, GLe
|
||||||
|
|
||||||
if (image->flags & IMGFLAG_CUBEMAP)
|
if (image->flags & IMGFLAG_CUBEMAP)
|
||||||
{
|
{
|
||||||
qglTextureParameterf(image->texnum, GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, glWrapClampMode);
|
qglTextureParameterfEXT(image->texnum, GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, glWrapClampMode);
|
||||||
qglTextureParameterf(image->texnum, GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_T, glWrapClampMode);
|
qglTextureParameterfEXT(image->texnum, GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_T, glWrapClampMode);
|
||||||
qglTextureParameteri(image->texnum, GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_R, glWrapClampMode);
|
qglTextureParameteriEXT(image->texnum, GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_R, glWrapClampMode);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qglTextureParameterf(image->texnum, GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, glWrapClampMode);
|
qglTextureParameterfEXT(image->texnum, GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, glWrapClampMode);
|
||||||
qglTextureParameterf(image->texnum, GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, glWrapClampMode);
|
qglTextureParameterfEXT(image->texnum, GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, glWrapClampMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
hash = generateHashValue(name);
|
hash = generateHashValue(name);
|
||||||
|
@ -2819,8 +2819,8 @@ void R_CreateBuiltinImages( void ) {
|
||||||
for ( x = 0; x < 4; x++)
|
for ( x = 0; x < 4; x++)
|
||||||
{
|
{
|
||||||
tr.sunShadowDepthImage[x] = R_CreateImage(va("*sunshadowdepth%i", x), NULL, r_shadowMapSize->integer, r_shadowMapSize->integer, IMGTYPE_COLORALPHA, IMGFLAG_NO_COMPRESSION | IMGFLAG_CLAMPTOEDGE, GL_DEPTH_COMPONENT24_ARB);
|
tr.sunShadowDepthImage[x] = R_CreateImage(va("*sunshadowdepth%i", x), NULL, r_shadowMapSize->integer, r_shadowMapSize->integer, IMGTYPE_COLORALPHA, IMGFLAG_NO_COMPRESSION | IMGFLAG_CLAMPTOEDGE, GL_DEPTH_COMPONENT24_ARB);
|
||||||
qglTextureParameterf(tr.sunShadowDepthImage[x]->texnum, GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_R_TO_TEXTURE);
|
qglTextureParameterfEXT(tr.sunShadowDepthImage[x]->texnum, GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_R_TO_TEXTURE);
|
||||||
qglTextureParameterf(tr.sunShadowDepthImage[x]->texnum, GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL);
|
qglTextureParameterfEXT(tr.sunShadowDepthImage[x]->texnum, GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
tr.screenShadowImage = R_CreateImage("*screenShadow", NULL, width, height, IMGTYPE_COLORALPHA, IMGFLAG_NO_COMPRESSION | IMGFLAG_CLAMPTOEDGE, GL_RGBA8);
|
tr.screenShadowImage = R_CreateImage("*screenShadow", NULL, width, height, IMGTYPE_COLORALPHA, IMGFLAG_NO_COMPRESSION | IMGFLAG_CLAMPTOEDGE, GL_RGBA8);
|
||||||
|
|
Loading…
Reference in a new issue