Bug 464 - TextRenderer setUseVertexArrays not working as intended
Summary: TextRenderer setUseVertexArrays not working as intended
Status: VERIFIED FIXED
Alias: None
Product: Jogl
Classification: JogAmp
Component: awt (show other bugs)
Version: 2
Hardware: All all
: --- major
Assignee: Sven Gothel
URL:
Depends on:
Blocks:
 
Reported: 2011-01-25 16:16 CET by John No
Modified: 2011-02-01 05:44 CET (History)
1 user (show)

See Also:
Type: ---
SCM Refs:
e894ead4feb75efc0246da0d5b8d3005342c6c1c 2be6672f08e0217f886256ffca1f2b4152f164cc
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John No 2011-01-25 16:16:50 CET
Due to a driver problem on my system the glBindBuffer() method causes my JVM to crash with:

Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [atioglxx.dll+0x26a876]
j  com.jogamp.opengl.impl.gl4.GL4bcImpl.dispatch_glGenBuffers1(ILjava/lang/Object;IZJ)V+0
j  com.jogamp.opengl.impl.gl4.GL4bcImpl.glGenBuffers(ILjava/nio/IntBuffer;)V+87
j  com.jogamp.opengl.util.awt.TextRenderer$Pipelined_QuadRenderer.<init>(Lcom/jogamp/opengl/util/awt/TextRenderer;)V+69
j  com.jogamp.opengl.util.awt.TextRenderer$Glyph.draw3D(FFFF)F+128
j  com.jogamp.opengl.util.awt.TextRenderer.internal_draw3D(Ljava/lang/CharSequence;FFFF)V+49
j  com.jogamp.opengl.util.awt.TextRenderer.draw3D(Ljava/lang/String;FFFF)V+8
j  com.jogamp.opengl.util.awt.TextRenderer.draw(Ljava/lang/String;II)V+8 

Setting the useVertexArrays variable to false forces the TextRenderer to use immediate mode for drawing, but some methods still call gl.glBindBuffer causing jvm crashes. These methods use the is15Available method to check for VBO capability and are completely ignoring the useVertexArrays variable.

Fix:
Changing the return statement of is15Available to "return isExtensionAvailable_GL_VERSION_1_5 && useVertexArrays;".

Forum-discussion:
http://jogamp.762907.n3.nabble.com/Problems-with-update-to-b266-tp2280749p2280749.html
Comment 1 Wade Walker 2011-01-25 17:40:07 CET
Hi John,

Were you going to submit a patch for this, or did you want me to? Let me know if you need help writing the unit test.
Comment 2 John No 2011-01-25 19:45:32 CET
Well the patch is a oneliner and i already set up git and ant to build jogl myself, so i'll try to get the unit test done as well...
guess if i get stuck somewhere i know where to ask :>
Comment 3 Sven Gothel 2011-02-01 05:44:45 CET
e894ead4feb75efc0246da0d5b8d3005342c6c1c
2be6672f08e0217f886256ffca1f2b4152f164cc


manual merged (CR/LF) ..
Thank you John!