Bug 817

Summary: GLContextImpl's getDefaultPixelDataType()/getDefaultPixelDataFormat() returns 0
Product: [JogAmp] Jogl Reporter: Sven Gothel <sgothel>
Component: coreAssignee: Sven Gothel <sgothel>
Status: RESOLVED FIXED    
Severity: major CC: petr.skramovsky, sgothel
Priority: ---    
Version: 2   
Hardware: All   
OS: all   
Type: DEFECT SCM Refs:
c19f9916bc59765e5aaf307b8ecd5d25dfcad6b6 bab13046729d8283876e4d2f8855a38ff311d375 65833bbcec423f9741116dc9b785e6954f2fcec7 be0204ffe66bb9cb2918bfb01d0235fcaf0b3920
Workaround: ---
Bug Depends on:    
Bug Blocks: 1390    

Description Sven Gothel 2013-08-16 02:28:25 CEST
GLContextImpl's getDefaultPixelDataType()/getDefaultPixelDataFormat() returns 0

Beside other use cases this affects GLPixelAttributes to calculate zero bytesPerPixel,
which in turn causes GLReadBufferUtil to use readPixelSize.

GLPixelAttributes shall throw a GLException if faulty args are being used.
Comment 1 Sven Gothel 2013-08-16 03:15:37 CEST
Petrs experienced failing GLContextImpl's getDefaultPixelDataType()/getDefaultPixelDataFormat() 
on NV GTX295 and driver 314.07 on Windows 8.
The GL query via 
      gl.glGetIntegerv(GL.GL_IMPLEMENTATION_COLOR_READ_FORMAT, glImplColorReadVals, 0);
      gl.glGetIntegerv(GL.GL_IMPLEMENTATION_COLOR_READ_TYPE, glImplColorReadVals, 1);            
seems to be buggy w/ that driver, even though it claims to be an ES2 compatible context.

Both methods shall fall back to default values.
Comment 2 Sven Gothel 2013-08-16 03:45:03 CEST
Fixed as proposed ..

Thx to Petr who discovered the bug and verified the test case and fix!