Bug 79

Summary: PBuffers on macintosh fail to glCopyTexSubImage2D
Product: [JogAmp] Jogl Reporter: Sven Gothel <sgothel>
Component: coreAssignee: Sven Gothel <sgothel>
Status: VERIFIED FIXED    
Severity: normal    
Priority: P3    
Version: 1   
Hardware: All   
OS: macosx   
Type: DEFECT SCM Refs:
Workaround: ---

Description Sven Gothel 2010-03-24 07:46:31 CET


---- Reported by raverboy 2004-04-27 11:44:18 ----

In order to get around various artifacts caused by failed pixel ownership 
tests, I render my offscreen textures to a pbuffer instead of to the 
framebuffer.

This now works correctly on Windows and Linux with 1.1 beta 2, but on Macintosh 
I get on opengl error 1282 (invalid operation) when I try copying the buffer to 
a texture.

If I've read my docs correctly, 1282 should only happen if I do the copy within 
a begin/end (I'm not), or if the texture hasn't been initialized (it is).


- The line of code that causes the error:
gl.glCopyTexSubImage2D(GL.GL_TEXTURE_2D, 0, 0, 0, 0, 0, 256, 256);

- The full test case source code:
http://www.wurmonline.com/newclient/PBufferTest.java

- A JNLP to the test case:
http://www.wurmonline.com/newclient/pbuffertest.jnlp



---- Additional Comments From kbr 2004-04-29 14:58:36 ----

It looks like the Mac OS X pbuffer support was never tested. The code has been rewritten and the 
attached test case now runs properly (though slowly -- not sure if this is a bug in the new code or the 
GeForce 4 MX I'm running with). The HWShadowmapsSimple and ProceduralTexturePhysics demos still 
don't work, but I haven't had a chance to look into why. Problems were expected with these demos 
because of differences in supported extensions between the Mac OS X NVidia OpenGL drivers (which 
Apple provides) and the Windows and Linux NVidia OpenGL drivers (which NVidia provides).

I'm closing this as fixed. Please open a new issue if there are still problems, including performance 
problems.




--- Bug imported by sgothel@jausoft.com 2010-03-24 07:46 EDT  ---

This bug was previously known as _bug_ 79 at https://jogl.dev.java.net/bugs/show_bug.cgi?id=79