Bug 736 - GLArrayDataServer.createData with dataType=GL_UNSIGNED_INT causing exception
Summary: GLArrayDataServer.createData with dataType=GL_UNSIGNED_INT causing exception
Status: RESOLVED FIXED
Alias: None
Product: Jogl
Classification: JogAmp
Component: opengl (show other bugs)
Version: 2
Hardware: pc_x86_64 windows
: --- enhancement
Assignee: Sven Gothel
URL:
Depends on:
Blocks:
 
Reported: 2013-05-15 17:00 CEST by Petr Skramovsky
Modified: 2013-05-17 09:10 CEST (History)
0 users

See Also:
Type: ---
SCM Refs:
979e8375e59050d3c7a37ba4902eb8b789813831
Workaround: ---


Attachments
fix (378 bytes, patch)
2013-05-15 22:13 CEST, Petr Skramovsky
Details | Diff

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