Bug 237 - GLU: GLUtessellator callback is mixing up vertexData
Summary: GLU: GLUtessellator callback is mixing up vertexData
Alias: None
Product: Jogl
Classification: JogAmp
Component: core (show other bugs)
Version: 1
Hardware: All all
: P3 normal
Assignee: Sven Gothel
Depends on:
Reported: 2006-07-09 10:32 CEST by Sven Gothel
Modified: 2010-03-24 07:49 CET (History)
0 users

See Also:
SCM Refs:
Workaround: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Sven Gothel 2010-03-24 07:49:23 CET

---- Reported by aaronanderson 2006-07-09 22:32:51 ----

I am using the GLU tessellation functionality. The callback is registered as so:

glu.gluTessCallback(tesselator, GLU.GLU_TESS_VERTEX_DATA, fontTesselator);
glu.gluTessCallback(tesselator, GLU.GLU_TESS_COMBINE_DATA, fontTesselator);
glu.gluTessCallback(tesselator, GLU.GLU_TESS_ERROR_DATA, fontTesselator);
glu.gluTessCallback(tesselator, GLU.GLU_TESS_EDGE_FLAG_DATA, fontTesselator);

For every vertex I call the GLU Tess Vertex method(vertexData is a double[] 
size 3)

glu.gluTessVertex(tesselator, vertexData,0, new Integer(-1));

However, in my callback when the vertexData callback is invoked:
 public void vertexData(Object vertexData, Object userData) {

vertexData holds the Integer value passed in as the userData in the original 
gluTessVertex call and userData is always null.

---- Additional Comments From kbr 2006-07-10 00:24:27 ----

I am unable to reproduce this problem by modifying the Tess.java example in the
jogl-demos package appropriately. The vertexData callback is always called
correctly. I suspect the submitter is confusing the vertexData and combineData
callbacks. It seems that the only way to usefully use the combineData callback
is to pass the vertex's coordinates as its own data. In the future please post
issues like these to the forums first before filing bugs so others can comment
on them.

---- Additional Comments From aaronanderson 2006-07-12 13:01:59 ----

I had confused vertexData with polygonData and coordinates. I apologize for the 
errant issue.

--- Bug imported by sgothel@jausoft.com 2010-03-24 07:49 EDT  ---

This bug was previously known as _bug_ 237 at https://jogl.dev.java.net/bugs/show_bug.cgi?id=237