Bug 736

Summary: GLArrayDataServer.createData with dataType=GL_UNSIGNED_INT causing exception
Product: [JogAmp] Jogl Reporter: Petr Skramovsky <petr.skramovsky>
Component: openglAssignee: Sven Gothel <sgothel>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: ---    
Version: 2   
Hardware: pc_x86_64   
OS: windows   
Type: --- SCM Refs:
979e8375e59050d3c7a37ba4902eb8b789813831
Workaround: ---
Attachments: fix

Description Petr Skramovsky 2013-05-15 17:00:39 CEST
code example:
GLArrayDataServer.createData(3, GL.GL_UNSIGNED_INT, 1, GL.GL_STATIC_DRAW, GL.GL_ELEMENT_ARRAY_BUFFER);

causing:
javax.media.opengl.GLException: Given OpenGL data type not supported: 5125
	at com.jogamp.opengl.util.GLArrayDataWrapper.getBufferClass(GLArrayDataWrapper.java:188)
	at com.jogamp.opengl.util.GLArrayDataWrapper.init(GLArrayDataWrapper.java:255)
	at com.jogamp.opengl.util.GLArrayDataClient.init(GLArrayDataClient.java:389)
	at com.jogamp.opengl.util.GLArrayDataServer.init(GLArrayDataServer.java:364)
	at com.jogamp.opengl.util.GLArrayDataServer.createData(GLArrayDataServer.java:178)

expected result:
GLArrayDataWrapper.getBufferClass should return IntBuffer
Comment 1 Petr Skramovsky 2013-05-15 22:13:05 CEST
Created attachment 466 [details]
fix

this one line patch seems to fix the issue
Comment 2 Sven Gothel 2013-05-17 09:10:21 CEST
Merged your patch .. (silently added GL2ES2.GL_INT .. fwiw). Thank you!