summaryrefslogtreecommitdiff
path: root/tests/texturing
diff options
context:
space:
mode:
authorAnuj Phogat <anuj.phogat@gmail.com>2015-03-17 14:40:34 -0700
committerAnuj Phogat <anuj.phogat@gmail.com>2015-05-11 15:07:01 -0700
commit1c8f74de11ba7ae4674ea82c3a7126cfc7ed611e (patch)
treeaef54424007bbad6d2514f297d33103daa81b140 /tests/texturing
parent545135cf427535d413731362e5365af00a9ce3e4 (diff)
Don't use default texture object
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Diffstat (limited to 'tests/texturing')
-rw-r--r--tests/texturing/getteximage-targets.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/texturing/getteximage-targets.c b/tests/texturing/getteximage-targets.c
index 80b63a282..3d1dfaad6 100644
--- a/tests/texturing/getteximage-targets.c
+++ b/tests/texturing/getteximage-targets.c
@@ -104,9 +104,12 @@ getTexImage(bool doPBO, GLenum target, GLubyte data[][IMAGE_SIZE],
int num_layers=1, num_faces=1, layer_size;
GLubyte data2[18][IMAGE_SIZE];
GLubyte *dataGet;
- GLuint packPBO;
+ GLuint tex, packPBO;
bool pass = true;
+ glGenTextures(1, &tex);
+ glBindTexture(target, tex);
+
switch (target) {
case GL_TEXTURE_1D:
glTexImage1D(GL_TEXTURE_1D, 0, internalformat, IMAGE_WIDTH, 0,
@@ -218,6 +221,8 @@ getTexImage(bool doPBO, GLenum target, GLubyte data[][IMAGE_SIZE],
glUnmapBuffer(GL_PIXEL_PACK_BUFFER);
glDeleteBuffers(1, &packPBO);
}
+
+ glDeleteTextures(1, &tex);
return pass;
}