PDA

View Full Version : return the geometry.. TO ME



Jernej
08-04-2004, 03:22 AM
i think i can speed-up my work-in-progress game
a lot, if i convert my file format to more
streamlined data, the geometry data is retrieved
from some 3D grid array which enables very easy
map editing, but when rendering the code is very
slow, it is almost like decompressing zlib steream for every 1*1*1 size of world, so i have gone
trough documentation to see if i can get my geometry back, and store it in separate file,
which i would render and use the original form just for collision detection, here is what i
*think* i need:

glRenderMode(GL_FEEDBACK);

GL_FEEDBACK

Feedback mode. No pixel fragments are produced, and no change to the frame buffer contents is made. Instead, the coordinates and attributes of vertexes that would have been drawn had the render mode been GL_RENDER are returned in a feedback buffer, which must be created (see glFeedbackBuffer) before feedback mode is entered.

glFeedbackBuffer:

The glFeedbackBuffer function controls feedback. Feedback, like selection, is a GL mode. The mode is selected by calling glRenderMode with GL_FEEDBACK. When the GL is in feedback mode, no pixels are produced by rasterization. Instead, information about primitives that would have been rasterized is fed back to the application using the GL.

so, basicly i want to do is something similar to
gl display lists, but also be able to save it to disk, and load back later.

i admit it that i don't have any clue how to use
glFeedbackBuffer, so ANY help would be greatly
appreciated and credited.

i have done a lot of search about glFeedbackBuffer
on google and it came up only with opengl
documentations of functions, what i realy need
is an example how to use these 2 calls.

Jernej L.

neomind
08-04-2004, 05:50 AM
Did some gooling of my own. Found this link:
example (http://www.codeproject.com/opengl/glexport.asp?df=100&forumid=1853&exp=0&select=803484)

It is a program using the feedback mode with some source code describing the process. Maybe it helps?

Jernej
08-04-2004, 12:10 PM
looks useful, i'll let you know how it goes.

Jernej
08-05-2004, 12:37 AM
one more question, does the feedback buffer return
geometry already perspectived and translated for
camera view?