diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-05-12 19:02:31 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-05-12 19:02:31 +0300 |
commit | 1bcbad446e57de309e8747280bc6cad93187622c (patch) | |
tree | 197766334428a770477d4313a58d2a6e0a0f2117 /source/blender/gpu/intern/gpu_texture.c | |
parent | 7d12d8956ded188f8d0a7c8589e715e8a2e33742 (diff) |
Fix ogl deprecated calls.
Diffstat (limited to 'source/blender/gpu/intern/gpu_texture.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_texture.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_texture.c b/source/blender/gpu/intern/gpu_texture.c index 3bda41eaff6..637cdff1262 100644 --- a/source/blender/gpu/intern/gpu_texture.c +++ b/source/blender/gpu/intern/gpu_texture.c @@ -504,7 +504,9 @@ static GPUTexture *GPU_texture_cube_create( glTexParameteri(tex->target_base, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(tex->target_base, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_R_TO_TEXTURE); glTexParameteri(tex->target_base, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL); +#ifdef WITH_LEGACY_OPENGL glTexParameteri(tex->target_base, GL_DEPTH_TEXTURE_MODE, GL_INTENSITY); +#endif } else { glTexParameteri(tex->target_base, GL_TEXTURE_MIN_FILTER, GL_LINEAR); @@ -568,10 +570,16 @@ GPUTexture *GPU_texture_from_blender(Image *ima, ImageUser *iuser, int textarget glBindTexture(textarget, tex->bindcode); glGetTexLevelParameteriv(gettarget, 0, GL_TEXTURE_WIDTH, &w); glGetTexLevelParameteriv(gettarget, 0, GL_TEXTURE_HEIGHT, &h); +#ifdef WITH_LEGACY_OPENGL glGetTexLevelParameteriv(gettarget, 0, GL_TEXTURE_BORDER, &border); tex->w = w - border; tex->h = h - border; +#else + tex->w = w; + tex->h = h; + UNUSED_VARS(border); +#endif } glBindTexture(textarget, 0); |