DXGL r384 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r383‎ | r384 | r385 >
Date:21:56, 9 June 2013
Author:admin
Status:new
Tags:
Comment:
Use EXT_direct_state_access to load matrices.
Modified paths:
  • /ddraw/glutil.cpp (modified) (history)

Diff [purge]

Index: ddraw/glutil.cpp
@@ -277,9 +277,17 @@
278278
279279 void SetMatrix(GLenum mode, GLfloat *mat1, GLfloat *mat2, bool *dirty)
280280 {
281 - MatrixMode(mode);
282 - glLoadMatrixf(mat1);
283 - if(mode == GL_MODELVIEW) glMultMatrixf(mat2);
 281+ if(GLEXT_EXT_direct_state_access)
 282+ {
 283+ glMatrixLoadfEXT(mode,mat1);
 284+ if(mode == GL_MODELVIEW) glMatrixMultfEXT(mode,mat2);
 285+ }
 286+ else
 287+ {
 288+ MatrixMode(mode);
 289+ glLoadMatrixf(mat1);
 290+ if(mode == GL_MODELVIEW) glMultMatrixf(mat2);
 291+ }
284292 if(dirty) *dirty = false;
285293 }
286294