diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-04-19 15:38:26 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-04-19 15:44:42 +0300 |
commit | b01df8222f7d262c7cc08a6e38ab693cad5e27da (patch) | |
tree | 9741710b54dbbbccbfd72ad4f165329776de635d /source/blender/gpu/intern/gpu_draw.c | |
parent | 9c84d9981909333882b1d71954cee6710dd88748 (diff) |
Comment out places which are using texture matrix mode for core profile
There is only two places which are using texture matrix mode:
- Tiled tface support.
- Texture shading mode for texture mapping.
Both cases are subject for reconsideration: it is likely that we'll be getting
rid of tface, which means game properties like tiles needs to be revisited
anyway. As for texture shading it is using basic shader which is also not
supported by core profile anyway.
Diffstat (limited to 'source/blender/gpu/intern/gpu_draw.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_draw.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c index 4115c115536..a213d8dd911 100644 --- a/source/blender/gpu/intern/gpu_draw.c +++ b/source/blender/gpu/intern/gpu_draw.c @@ -420,9 +420,11 @@ void GPU_clear_tpage(bool force) GTS.curtile = 0; GTS.curima = NULL; if (GTS.curtilemode != 0) { +#if SUPPORT_LEGACY_MATRIX glMatrixMode(GL_TEXTURE); glLoadIdentity(); /* TEXTURE */ glMatrixMode(GL_MODELVIEW); +#endif } GTS.curtilemode = 0; GTS.curtileXRep = 0; @@ -604,6 +606,7 @@ int GPU_verify_image( if (GTS.tilemode != GTS.curtilemode || GTS.curtileXRep != GTS.tileXRep || GTS.curtileYRep != GTS.tileYRep) { +#if SUPPORT_LEGACY_MATRIX glMatrixMode(GL_TEXTURE); glLoadIdentity(); /* TEXTURE */ @@ -611,6 +614,7 @@ int GPU_verify_image( glScalef(ima->xrep, ima->yrep, 0); /* TEXTURE */ glMatrixMode(GL_MODELVIEW); +#endif } /* check if we have a valid image */ @@ -2117,9 +2121,11 @@ void GPU_end_object_materials(void) /* resetting the texture matrix after the scaling needed for tiled textures */ if (GTS.tilemode) { +#if SUPPORT_LEGACY_MATRIX glMatrixMode(GL_TEXTURE); glLoadIdentity(); /* TEXTURE */ glMatrixMode(GL_MODELVIEW); +#endif } } @@ -2302,9 +2308,11 @@ void GPU_state_init(void) glDepthRange(0.0, 1.0); +#if SUPPORT_LEGACY_MATRIX glMatrixMode(GL_TEXTURE); glLoadIdentity(); /* TEXTURE */ glMatrixMode(GL_MODELVIEW); +#endif glFrontFace(GL_CCW); glCullFace(GL_BACK); |