Hello,

today I want to share my experiment with transform feedback. I implemented an 
example from the book "OpenGL Superbible, Fifth Edition". In Chapter 11 there 
is a spring mass system example. The aim is the calculation of the physics into 
the vertex shader. The result should have to transfer with transform feedback 
into a second buffer (ping pong) and this buffer have to rendered. I was a 
little bit overextended with this in osg, because there was no support for 
this. Also I implemented this in OpenGL and after this I do the same in a 
osg::Drawable (drawImplementation function) in my osg example. A positive fact 
is I see something in my osg example, but it doesn't do the same like the 
opengl example. It looks strange and I don't have any idea what's wrong. :-( I 
attached the two examples to this e-mail.

I someone want to test the examples, I use cmake an I wrote a shell script, 
which creates a build and a release directory and execute cmake in the build 
directory. The osgDemo and the shader file are moved to the release directory 
when you do 'make install'.

Following a short overview of the examples:

opengl_transform_feedback.7z
  - main.cpp <-- main function
  - mycallbacks(.cpp/.h) <-- glut callback functions
  - springmasssystem(.cpp/.h) <-- spring mass object (init and draw function)
  - spring_mass.vert <-- vertex shader (spring mass physics)


osg_transform_feedback.7z
  - main.cpp <-- main function (osgviewer)
  - myextensions.h <-- extension class (base class is osg::GL2Extensions)
  - springmasssystem(.cpp/.h) <-- drawable class (spring mass system)
  - spring_mass.vert

I hope some osg users are interested in this topic and have some ideas.

Thanks!

Martin 
-- 
NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!                          
        
Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a

Attachment: opengl_transform_feedback.7z
Description: application/7z-compressed

Attachment: osg_transform_feedback.7z
Description: application/7z-compressed

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to