diff options
author | SmileTheory <SmileTheory@gmail.com> | 2013-11-19 03:18:23 -0800 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2014-06-17 17:43:36 +0100 |
commit | 85e0fa4841fd5ca6bf6c9b2f0204ee7be9c0915b (patch) | |
tree | 967d7968faf0c62bc683bfa5eb9e00aa3b89d4b2 /src/renderergl2/tr_backend.c | |
parent | 38af27b32b1302fd5ddd83d992fc8ec73209b3ad (diff) |
OpenGL2: Match glsl data type names: matrix_t -> mat4_t, vec*i_t -> ivec*_t
Diffstat (limited to 'src/renderergl2/tr_backend.c')
-rw-r--r-- | src/renderergl2/tr_backend.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/renderergl2/tr_backend.c b/src/renderergl2/tr_backend.c index b9cbedd9..def0786a 100644 --- a/src/renderergl2/tr_backend.c +++ b/src/renderergl2/tr_backend.c @@ -372,17 +372,17 @@ void GL_State( unsigned long stateBits ) } -void GL_SetProjectionMatrix(matrix_t matrix) +void GL_SetProjectionMatrix(mat4_t matrix) { - Matrix16Copy(matrix, glState.projection); - Matrix16Multiply(glState.projection, glState.modelview, glState.modelviewProjection); + Mat4Copy(matrix, glState.projection); + Mat4Multiply(glState.projection, glState.modelview, glState.modelviewProjection); } -void GL_SetModelviewMatrix(matrix_t matrix) +void GL_SetModelviewMatrix(mat4_t matrix) { - Matrix16Copy(matrix, glState.modelview); - Matrix16Multiply(glState.projection, glState.modelview, glState.modelviewProjection); + Mat4Copy(matrix, glState.modelview); + Mat4Multiply(glState.projection, glState.modelview, glState.modelviewProjection); } @@ -766,7 +766,7 @@ RB_SetGL2D ================ */ void RB_SetGL2D (void) { - matrix_t matrix; + mat4_t matrix; int width, height; if (backEnd.projection2D && backEnd.last2DFBO == glState.currentFBO) @@ -790,9 +790,9 @@ void RB_SetGL2D (void) { qglViewport( 0, 0, width, height ); qglScissor( 0, 0, width, height ); - Matrix16Ortho(0, width, height, 0, 0, 1, matrix); + Mat4Ortho(0, width, height, 0, 0, 1, matrix); GL_SetProjectionMatrix(matrix); - Matrix16Identity(matrix); + Mat4Identity(matrix); GL_SetModelviewMatrix(matrix); GL_State( GLS_DEPTHTEST_DISABLE | @@ -882,7 +882,7 @@ void RE_StretchRaw (int x, int y, int w, int h, int cols, int rows, const byte * GLSL_BindProgram(&tr.textureColorShader); - GLSL_SetUniformMatrix16(&tr.textureColorShader, UNIFORM_MODELVIEWPROJECTIONMATRIX, glState.modelviewProjection); + GLSL_SetUniformMat4(&tr.textureColorShader, UNIFORM_MODELVIEWPROJECTIONMATRIX, glState.modelviewProjection); GLSL_SetUniformVec4(&tr.textureColorShader, UNIFORM_COLOR, colorWhite); RB_InstantQuad2(quadVerts, texCoords); @@ -1123,9 +1123,9 @@ const void *RB_DrawSurfs( const void *data ) { GL_BindToTMU(tr.sunShadowDepthImage[1], TB_SHADOWMAP2); GL_BindToTMU(tr.sunShadowDepthImage[2], TB_SHADOWMAP3); - GLSL_SetUniformMatrix16(&tr.shadowmaskShader, UNIFORM_SHADOWMVP, backEnd.refdef.sunShadowMvp[0]); - GLSL_SetUniformMatrix16(&tr.shadowmaskShader, UNIFORM_SHADOWMVP2, backEnd.refdef.sunShadowMvp[1]); - GLSL_SetUniformMatrix16(&tr.shadowmaskShader, UNIFORM_SHADOWMVP3, backEnd.refdef.sunShadowMvp[2]); + GLSL_SetUniformMat4(&tr.shadowmaskShader, UNIFORM_SHADOWMVP, backEnd.refdef.sunShadowMvp[0]); + GLSL_SetUniformMat4(&tr.shadowmaskShader, UNIFORM_SHADOWMVP2, backEnd.refdef.sunShadowMvp[1]); + GLSL_SetUniformMat4(&tr.shadowmaskShader, UNIFORM_SHADOWMVP3, backEnd.refdef.sunShadowMvp[2]); GLSL_SetUniformVec3(&tr.shadowmaskShader, UNIFORM_VIEWORIGIN, backEnd.refdef.vieworg); { @@ -1579,7 +1579,7 @@ const void *RB_PostProcess(const void *data) { const postProcessCommand_t *cmd = data; FBO_t *srcFbo; - vec4i_t srcBox, dstBox; + ivec4_t srcBox, dstBox; qboolean autoExposure; // finish any 2D drawing if needed @@ -1665,7 +1665,7 @@ const void *RB_PostProcess(const void *data) if (0) { - vec4i_t dstBox; + ivec4_t dstBox; VectorSet4(dstBox, 0, 0, 128, 128); FBO_BlitFromTexture(tr.sunShadowDepthImage[0], NULL, NULL, NULL, dstBox, NULL, NULL, 0); VectorSet4(dstBox, 128, 0, 128, 128); @@ -1676,7 +1676,7 @@ const void *RB_PostProcess(const void *data) if (0) { - vec4i_t dstBox; + ivec4_t dstBox; VectorSet4(dstBox, 256, glConfig.vidHeight - 256, 256, 256); FBO_BlitFromTexture(tr.renderDepthImage, NULL, NULL, NULL, dstBox, NULL, NULL, 0); VectorSet4(dstBox, 512, glConfig.vidHeight - 256, 256, 256); @@ -1685,7 +1685,7 @@ const void *RB_PostProcess(const void *data) if (0) { - vec4i_t dstBox; + ivec4_t dstBox; VectorSet4(dstBox, 256, glConfig.vidHeight - 256, 256, 256); FBO_BlitFromTexture(tr.sunRaysImage, NULL, NULL, NULL, dstBox, NULL, NULL, 0); } @@ -1693,7 +1693,7 @@ const void *RB_PostProcess(const void *data) #if 0 if (r_cubeMapping->integer && tr.numCubemaps) { - vec4i_t dstBox; + ivec4_t dstBox; int cubemapIndex = R_CubemapForPoint( backEnd.viewParms.or.origin ); if (cubemapIndex) |