From: Jason Daly (jdaly++at++ist.ucf.edu)
Date: 11/07/2005 16:24:11
Christopher D. Johnson wrote:
>Greetings all. This question may be more OpenGL and less Performer specific but I'd like to get some feedback from you all anyway. I have a channel that is rendering a scene in a portion of a pfPipeWindow. I am then doing a glReadPixels on that area of the screen, doing some color transformation of the captured pixel data, and then calling glDrawPixels to write the color-transformed data to another part of the screen. So basically it looks like I have 2 identical channels, but one of them has a color filter on it. My problem arises when I try to write geometry on top of the area the glDrawPixels call is drawing to. If I, for example, do the following:
>
>"glRasterPos2i(ll[1][0]+ LT_LEFT_BORDER_OFFSET,
> ll[1][1]);
> charstr("VCR");
> glBegin (GL_LINES);
> glVertex2i(ll[1][0]+ LT_LEFT_BORDER_OFFSET,
> ll[1][1]-2);
> glVertex2i(ll[1][0]+ LT_LEFT_BORDER_OFFSET+20,
> ll[1][1]-2);
> glEnd();"
>
>where glRasterPos2i is set in such a way that the "VCR" string and the line being drawn are both within the boundary of the rectangle I drew with the glDrawPixels, the text shows up but the geometry does not. If I draw the line in such a way that part of it is within the area drawn by glDrawPixels and then goes outside of that area, the part of the line outside of the area shows up, and the part within does not. This occurs even though the text and line are drawn last of all things in the window. In fact, no geometry I create with OpenGL calls will render within the bounds of the glDrawPixels-drawn rectangle. Only text drawn with the call to "charstr" will show. Does anyone have a clue why the text would show up but any draw geometry would not?
>
>
Just a thought, not sure if it will work. Try adding
glDepthMask(GL_FALSE) before your glDrawPixels() call, and then
glDepthMask(GL_TRUE) afterward. The geometry you're drawing may be
failing the depth test, so disabling depth buffer writes before the draw
pixels call may help.
----"J"
"I'm a castaway stranded in a desolate land, I can see the footprints in the virtual sand." --Neil Peart
This archive was generated by hypermail 2b29 : Mon Nov 07 2005 - 16:24:28 PST