[Piglit] [PATCH] Don't use default texture object
Anuj Phogat
anuj.phogat at gmail.com
Mon Mar 2 10:12:23 PST 2015
Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
---
tests/texturing/getteximage-simple.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/texturing/getteximage-simple.c b/tests/texturing/getteximage-simple.c
index 7971583..0befc78 100644
--- a/tests/texturing/getteximage-simple.c
+++ b/tests/texturing/getteximage-simple.c
@@ -71,11 +71,14 @@ piglit_display(void)
void piglit_init(int argc, char **argv)
{
+ GLuint tex;
int i;
for(i = 0; i < 4096; ++i)
data[i] = rand() & 0xff;
+ glGenTextures(1, &tex);
+ glBindTexture(GL_TEXTURE_2D, tex);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 64, 16, 0, GL_RGBA, GL_UNSIGNED_BYTE, data);
--
1.9.3
More information about the Piglit
mailing list