PDA

View Full Version : Problems with PBO to texture if size < 1024



Mr. Zombie
10-25-2010, 05:53 AM
Hello from a newbie.

I'm using PBOs to update textures. I got them to work, but stumbled upon weird issue. If size of texture is >= 1024, then PBOs work as intended, else I get flashing (appearing/disappearing) textures and then empty screen.
But, if I change size of PBO, then it will work.

Example:
- texture size is 512*512 BGRA
glBufferData(GL_PIXEL_UNPACK_BUFFER, 512*512*4, 0, GL_STREAM_DRAW);
won't work

glBufferData(GL_PIXEL_UNPACK_BUFFER, 512*512*16, 0, GL_STREAM_DRAW);
will work

songho's pboUnpack works fine with different resolutions. I'm using shaders and drawing with glDrawElements though.

Does anyone have the same problem? I googled this and searched this forum, but didn't find solution.

My videocard: Radeon 9800 pro 128bit 128mb. Supposed to support OpenGL up to 2.1 with latest drivers.