Hi Johan,
I tried to send this mail from my other mailadress but it didn't seem to work
so I'm trying again now!
Hello,
I have been looking at openSG for a while now and I have some questions. I am
using windows 2000 with visual studio .net 2002
First I think the documentation available for download
http://www.opensg.org/downloads/OpenSG-1.2.0-srcdoc.tgz is corrupt. Can someone
verify if this is so?
Just downloaded it works fine for me.
When I try to compile openSG from the OpenSG-1.2.0-src.tgz file (from
VSbuild\VS7) first I get some out of heap space errors, then I get an error
that I need a file called freetype.h so I download something called freetype.
But then I get a bunch of other error messages. Is there a list of what is
needed? Or is it supposed to work? Maybe I got the wrong version of freetype?
Since I only need to modify a few files maybe I don't need to compile the whole OpenSG. How can I use modified files without compiling OpenSG? I've tried to make my own version of SimpleSceneManager (just putting it in my project directory) but I get the error:
"error C2491: 'osg::SimpleSceneManager::_highlightMaterial' : definition of
dllimport static data member not allowed"
Well I'm working with the intel compiler and cygwin. The .net opensg
dailybuild is not working at the moment I try to fix this. Then you can
download a version from http://www.opensg.org/dailybuild_logs/index.EN.html
Now to what I'm actually trying to do:
I need to use vertex and pixel shaders. Is there any support for Cg? That would
help me a lot. I've tried to take a look at the test program for the
vertexProgram but I can't figure out how the parameters are passed to the
program. It seems like the material properties are passed directly to the
vertex program. Is there a way to manually say what is passed to the program or
is it explained somewhere how it works?
Currently only local parameters are supported there is no support for
additional Vertex attributes but this will change quite soon.
To pass a parameter to the vertex program you can do this:
vp->setParameter("lightDir", 0, Vec4f(1,0,0,0));
vp->setParameter("lightPos", 1, Vec4f(1,0,0,0));
In the vertexprogram you get this parameter with
PARAM lightDir = program.local[0];
PARAM lightPos = program.local[1];
Via the glstate you can get material, light, ... attributes.
I wrote a CGChunk it is included in the cvs version in the
Source/Contrib directory. This is a very early version I'm currently
working on it and adding some more features.
I'm trying to add glow to emissive materials in my models. This I plan to do by
first drawing the scene with only the emissive parts to a secondery buffer then
copying the buffer to a texture and then blurring the texture by running it
through a vertex and fragment program a few times. When I finally have the
blurred texture I want to apply it to the original scene using blend filter.
(Just drawing a texture on top of the scene) Can StereoBufferViewport be used
for the extra buffer I need? And can I get the scene from the second buffer as
a texture by using GrabForeground? I realize I get an osg::Image from the
grabforground, can this Image be used as a texture in the sense that it can be
passed to the vertex program as a parameter? Is there any problems regarding
the rendering of multiple passes or is it just to do each step, one at a time?
You can use a TextureGrabForground, to grab the rendering results of a
Viewport into a texture.
One last thing I need is to be able to draw a texture to the foreground. For
this I would also like to use a vertex program. I need the vertexprogram to
rotate and resize the polygon that the texture is rendered on. This is the same
as I mentioned before except that the texture doesn't cover the the whole
viewport this time. I would need something that works like gluOrtho2D. Is there
anything like this in openSG or what should I do?
There is a new PolygonForeground this can be used for a number of things
like texture overlays, logos and others.
I hope somebody can help me with atleast some of my questions. Thanks in
advance!
Regards,
Johan
hope it helps,
Andreas
-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community? Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users