guilder
12-10-2010, 02:24 PM
Hello All,
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.
After browsing the forum, I even tried using the pixel buffer objects in conjunction with glDrawPixels, the performance seems to be fine 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);
Please let me know if anyone needs a sample code.
thanks in advance
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.
After browsing the forum, I even tried using the pixel buffer objects in conjunction with glDrawPixels, the performance seems to be fine 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);
Please let me know if anyone needs a sample code.
thanks in advance