Module: Mesa Branch: master Commit: 6d55fd705da829286ea45a7438526c2bede2059a URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6d55fd705da829286ea45a7438526c2bede2059a
Author: Brian Paul <bri...@vmware.com> Date: Thu Aug 13 14:07:25 2009 -0600 progs/tests: hack a PBO/dlist test --- 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 12f045b..92c8a2f 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++) { _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit