PDA

View Full Version : GLSL Transform back to FFP?



Golgoth
12-18-2006, 01:25 PM
Hi all!

I ve been processing this in my mind for awhile and push it back till I have no other choice but to solve this issue. So here we go…

Lets say we make transformations to a mesh in a shader.

First pass: Draw mesh with shader and transform it, SRT and/or vertex morphing of any kind.

For instance, to illustration that the mesh is being selected I would like to draw the mesh on top of the current one but in wire frame and without lighting.

The question is... Once the mesh have been transformed in a shader, is it possible to send or get back the resulting transformations to/in the FFP?

Do I need to draw it once more with another shader? any other possibilities?

thx

zeoverlord
12-18-2006, 04:58 PM
Yes, the new geometry shaders enable you to write the transformed data to a VBO.

Golgoth
12-18-2006, 05:13 PM
the new geometry shadersi know that directx 10 does have this feature... opengl does? must be recent stuff... damn im always the last to know, hihi..

I got GLEW 1.3.5.

glGetString(GL_VERSION) = 2.0.3
glGetString(GL_SHADING_LANGUAGE_VERSION) = 1.10 NVIDIA via Cg 1.3 compiler.

did i missed anything?

Golgoth
12-18-2006, 05:31 PM
ok, as it is for now as far as i draw multiple time and the shader is activated... the transforms are good... but my problem is, the second pass doesnt show at all. hummm...

Jan
12-19-2006, 01:33 AM
OpenGL does support geometry shaders for 2 weeks now. However, of course only on hardware, that supports it, which is only the Geforce 8.

There are no real other options, AFAIK, so you need to think of other ways to achieve your goal, if you want to support other cards than the Geforce 8, too.

Jan.

Golgoth
12-19-2006, 09:07 AM
O great, I do always have hard time to figure where is the latest opengl files... so im using Glew 1.3.5 that is supposed to support opengl 2.1… I do have a gforce7800… is that the reason why my current opengl version is 2.0.3 instead of being 2.1?

can you point me where to find some info/sample on the geometry shaders if it is not too much to ask?

Korval
12-19-2006, 10:26 AM
can you point me where to find some info/sample on the geometry shaders if it is not too much to ask?Maybe you misunderstood Jan. You do not have the hardware to run Geometry Shaders. So they are not a solution to your problem.

Golgoth
12-19-2006, 10:29 AM
No worries, if i have to, im 2 blocks away from a new video card! :)

Overmind
12-20-2006, 02:07 AM
The specs to the new extensions are here:
http://developer.nvidia.com/object/nvidia_opengl_specs.html

Geometry shaders are EXT_geometry_shader4.