Bug 817 - GLContextImpl's getDefaultPixelDataType()/getDefaultPixelDataFormat() returns 0
: GLContextImpl's getDefaultPixelDataType()/getDefaultPixelDataFormat() returns 0
Status: RESOLVED FIXED
: None
: Jogl
: JogAmp
: core (show other bugs)
: 2
: All all
: --- major
: Sven Gothel
:
:
: 1390
  Show dependency treegraph
 
Reported: 2013-08-16 02:28 CEST by Sven Gothel
Modified: 2019-09-05 05:39 CEST (History)
2 users (show)

:
Type: DEFECT
SCM Refs:
c19f9916bc59765e5aaf307b8ecd5d25dfcad6b6 bab13046729d8283876e4d2f8855a38ff311d375 65833bbcec423f9741116dc9b785e6954f2fcec7 be0204ffe66bb9cb2918bfb01d0235fcaf0b3920
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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!