diff options
author | Brian Paul <brianp@vmware.com> | 2009-08-14 11:27:51 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-08-14 11:27:51 -0600 |
commit | d09a19bf6e09eb0c8908e9b5378962ac17bcbc4c (patch) | |
tree | dde75617a85679ebd80b3d86e7f2889203c8da24 /progs | |
parent | db598b899868ba6db8f3f525a22a45331589592e (diff) | |
parent | 1574b05189fee1b5802024b505ba93fff345e95c (diff) |
Merge branch 'mesa_7_5_branch'
Diffstat (limited to 'progs')
-rw-r--r-- | progs/tests/texwrap.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/progs/tests/texwrap.c b/progs/tests/texwrap.c index 12f045b72e..92c8a2f14c 100644 --- a/progs/tests/texwrap.c +++ b/progs/tests/texwrap.c @@ -258,8 +258,26 @@ static void Init( void ) } glBindTexture(GL_TEXTURE_2D, BORDER_TEXTURE); +#ifdef TEST_PBO_DLIST + /* test fetching teximage from PBO in display list */ + { + GLuint b = 42, l = 10; + + glBindBufferARB(GL_PIXEL_UNPACK_BUFFER, b); + glBufferDataARB(GL_PIXEL_UNPACK_BUFFER, sizeof(BorderImage), + BorderImage, GL_STREAM_DRAW); + + glNewList(l, GL_COMPILE); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, SIZE+2, SIZE+2, 1, + GL_RGBA, GL_UNSIGNED_BYTE, (void *) 0/* BorderImage*/); + glEndList(); + glCallList(l); + glBindBufferARB(GL_PIXEL_UNPACK_BUFFER, 0); + } +#else glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, SIZE+2, SIZE+2, 1, GL_RGBA, GL_UNSIGNED_BYTE, (void *) BorderImage); +#endif for (i = 0; i < SIZE; i++) { for (j = 0; j < SIZE; j++) { |