guilder

ATI 5970 stencil buffer drawing glDrawPixels slow

Discussion created by guilder on Dec 13, 2010
Latest reply on Jan 11, 2011 by frali
ATI 5970 stencil buffer drawing glDrawPixels slow

I am new to this forum, hoping someone can help me with my problem.

I am looking for fastest method to copy application generated stencil data to stencil buffer? My OpenGL app uses ATI Radeon 5970 video card and when I used glDrawPixels to copy the data as below the performance was terribly slow about 3 FPS.

glDrawPixels(768, 768, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, (const GLvoid* )data);

What is interesting is the same app runs 25 FPS on ATI Radeon 3800 video card.

I even tried using the pixel buffer objects in conjunction with glDrawPixels, the performance seems to be fine (note this is only when the width/height is a multiple of 32) but the stencil buffer is corrupted.
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, m_pbo);
glBufferSubData(GL_PIXEL_UNPACK_BUFFER, 0, size, (const GLvoid *) plane_data);
glDrawPixels(768, 768, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, 0);

Note, I do not use shaders.

Please let me know if anyone needs a sample code.

thanks in advance

Outcomes