diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-03-24 22:27:39 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-03-25 21:06:11 +0300 |
commit | b1c025d1e8dd3a26e66740eab102814da76c06bf (patch) | |
tree | 57a11ca3d0b86650c897571014b67b70e66a3e10 /source/blender/editors/space_view3d | |
parent | 879eabedda2790fd39d0e2f66184bceb6e0dbf4b (diff) |
GPUTexture: Small refactor.
This includes a few modification:
- The biggest one is call glActiveTexture before doing any call to
glBindTexture for rendering purpose (uniform value depends on it).
This is also better to know what's going on when rendering UI. So if
there is missing UI elements because of this commit look for this first.
This allows us to have "less calls" to glActiveTexture (I did not
measure the final count) and less checks inside GPU_texture.
- Remove use of GL_TEXTURE0 as a uniform value in a few places.
- Be more strict and use BLI_assert for bad usage of GPU_texture functions.
- Disable filtering for integer and stencil textures (not supported by
OGL specs).
- Replace bools inside GPUTexture by a bitflag supporting more options to
identify texture types.
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index ea92f18f714..f46d3c500bc 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -755,8 +755,6 @@ static void draw_empty_image(Object *ob, const short dflag, const unsigned char immEnd(); immUnbindProgram(); - - glBindTexture(GL_TEXTURE_2D, 0); /* necessary? */ } /* Draw the image outline */ |