• Advertisement

Archived

This topic is now archived and is closed to further replies.

[java] Display lists and a 3D brain

This topic is 5100 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi there, I was wondering if someone could help me out... I''m developing an application on Java that loads a 3d brain and allows manipulation on it. the problem is that i use display lists to improve performance and i have to recompile the display list to include any changes in the manipulations. eg wireframe mode. Is there any way to pass any change in the values without having to stop, recompile and display again ? Even when recompiling, i get a message: GLUT: Warning in (unamed): GL error: invalid enumerant Hope to get some light on this!

Share this post


Link to post
Share on other sites
Advertisement
This is an OpenGL specific issue, you''d got much more answers by posting in the OpenGL forum.

Anyway, since OpenGL is stated based you can set the current state _before_ calling the list.

For example, you could have :

if(wireframeMode)
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
else
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);

glCallList(list); //render stuff


So in your display list you put only "render calls" (glBegin / glEnd, glDrawElement,...) and before calling the display list you modify the state (position, materials,...).

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Basically the rule is, use display lists (because they''re easy and very efficient) if the object mesh remains static. If you''re simply trying to implement a wireframe mode, by all means use overnhet''s method, but if you want people to transform vertices directly, then you have reached the limitation of display lists. What I would recommend is the equally powerful Vertex Arrays method to draw your mesh.
[url]http://www.google.com/search?hl=en&lr=&ie=UTF-8&oe=UTF-8&q=OpenGL+Vertex+Arrays&btnG=Google+Search[/url]

Share this post


Link to post
Share on other sites

  • Advertisement