Rendering stalls on glVertex

I’m working on a custom renderer using JOGL. It uses several geometric passes to set up input data, followed by a final pass using a fullscreen quad and a fragment shader to finish the job. I have recently been trying to use a border on my 3D texture in an attempt to get rid of some drawing artifacts. The 3D texture is referenced by the shader, but is not directly mapped onto the fullscreen quad.

My current problem is that upon starting up, my program initializes, and runs most of the code to render the first frame, then stalls before finishing that frame, and no further rendering occurs. It seems related to my recent 3D texture changes, as I am able to get the renderer back by disabling my (attempted) use of a texture border. I have isolated the stall, and am certain that it occurs at the glVertex call for the 4th vertex of the fullscreen quad in my final rendering pass (the only pass that uses the 3D texture & the shader that refers to it). By “stalling”, i mean that it appears as if my glVertex() call is blocking indefinately.

Can anyone offer some insight as to why my texture border attempt has offended it? ???

The 3D texture data is loaded into vData.greyscaleData (a ByteBuffer), and padded with a 1 byte zero valued border on all 3 dimensions, then loaded into a texture object with this code:


gl.glBindTexture(GL.GL_TEXTURE_3D, texHandles[t_GREYSCALE_DATA]);
    gl.glTexParameteri(GL.GL_TEXTURE_3D, GL.GL_TEXTURE_MIN_FILTER,  GL.GL_LINEAR);
    gl.glTexParameteri(GL.GL_TEXTURE_3D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_LINEAR);
    gl.glTexParameteri(GL.GL_TEXTURE_3D, GL.GL_TEXTURE_WRAP_R, GL.GL_CLAMP);
    gl.glTexParameteri(GL.GL_TEXTURE_3D, GL.GL_TEXTURE_WRAP_S, GL.GL_CLAMP);
    gl.glTexParameteri(GL.GL_TEXTURE_3D, GL.GL_TEXTURE_WRAP_T, GL.GL_CLAMP);
    if(GREYSCALE_TEX_BORDERS)
      vData.addBorders();
    gl.glTexImage3D(GL.GL_TEXTURE_3D,0,GL.GL_INTENSITY,vData.xDim,vData.yDim,vData.zDim,
                    GREYSCALE_TEX_BORDERS?1:0,GL.GL_LUMINANCE,GL.GL_UNSIGNED_BYTE,
                    vData.greyscaleData);

I have checked and rechecked that i am rewinding my buffers; is there something else obvious that i’m missing?

Hope someone knows what the deal is. :-\

Hi, did you try DebugGL or TraceGL, it sometimes gives some usefull information.

I don’t know for your problem. Perhaps GLIntercept which gives very interesting informationsmay help

      Vincent

I’m currently using a DebugGL for everything, which has come in most handy. But the problem here, as i described, is that no error is being thrown, and my app is not crashing. For whatever reason, when i make the glVertex call for the last vertex of that quad, the call simply never returns.

Are you 100% sure it’s the call to glVertex3f that’s hanging? Have you verified this either with printing code or by using SIGQUIT/Ctrl-Break?

I think the best way for you to track down what’s going on is to simplify your program piece by piece until you can see exactly the operations leading up to the hang. Presumably some of your passes are completing successfully, so if you comment those out you might be able to isolate it to a setup problem in your last pass.

I have verified for certain that it is the glVertex call that is hanging. there are stderr printouts immediately before and immediately after it. The one before it prints, the one after it does not.

I’m back-burnering this issue for now, as i have found another way to remove the offending artifacts. Thanks for the input.