Re: [osg-users] OSG and shaders

2009-08-12 Thread Tomlinson, Gordon
users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Hadrien Thomas Sent: Wednesday, August 12, 2009 7:33 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] OSG and shaders I've asked a friend what to do. He told me to look

Re: [osg-users] OSG and shaders

2009-08-12 Thread Hadrien Thomas
I've asked a friend what to do. He told me to look in the sources, which I am doing right now and might help me for every problem instead of coming here whining about the lack of documentation (which I now understand thanks to you Kim Bale). Beign a noob, I forgot OSG was opensource... He told

Re: [osg-users] OSG and shaders

2009-08-12 Thread Maxime BOUCHER
carnibirdy wrote: > Hello everybody! > > Afeter some research on the net, I gathered some clues, day after day and I > managed to make the shader i had to... just in part. > > I have no more problem with shaders! My only concern is now Openscenegraph. > > I don't understand AT ALL who has the

Re: [osg-users] OSG and shaders

2009-08-12 Thread J.P. Delport
Hi, also see here: http://mew.cx/osg_glsl_july2005.pdf OpenSceneGraph Quick Start Guide http://www.lulu.com/content/paperback-book/openscenegraph-quick-start-guide/767629 Mail archives http://news.gmane.org/gmane.comp.graphics.openscenegraph.user OpenGL Shading Language http://www.amazon.com/O

Re: [osg-users] OSG and shaders

2009-08-12 Thread Kim Bale
Hi Hadrien, The learning curve for the OSG is pretty steep, I think we can all agree on that. However, if you have a good knowledge of graphics in general or OpenGL in particular, the transition to the OSG is fairly straightforward. Documentation can be sparse in some areas, but one should rememb

Re: [osg-users] OSG and shaders

2009-08-12 Thread Hadrien Thomas
Hello everybody! Afeter some research on the net, I gathered some clues, day after day and I managed to make the shader i had to... just in part. I have no more problem with shaders! My only concern is now Openscenegraph. I don't understand AT ALL who has the knowledge of this language?? The re

Re: [osg-users] OSG and shaders

2009-08-06 Thread Maxime BOUCHER
Hi, carnibirdy wrote: > > For now, I'm still blocked with OSG. > I want to map the same texture to the 6 faces of a cube. > > I made a Geometry called "cube" and 6 DrawElementsUInt called "face1/2/.../6". > > I don't know how to setTexCoords to each QUADS. > I thought about making 6 Geometry s

Re: [osg-users] OSG and shaders

2009-08-06 Thread Kim Bale
I agree with Paul, the Orange book is a *must have* title if you're learning shaders. http://books.google.co.uk/books?id=kDXOXv_GeswC&dq=opengl+shader+language&printsec=frontcover&source=bn&hl=en&ei=E5Z6Svb-K5Cy-AbQ87lS&sa=X&oi=book_result&ct=result&resnum=5#v=onepage&q=opengl%20shader%20language&

Re: [osg-users] OSG and shaders

2009-08-06 Thread Hadrien Thomas
Thank you for the book reference. I will think about purchasing it. I can afford it but it's a big expense for me :-* For now, I'm still blocked with OSG. I want to map the same texture to the 6 faces of a cube. I made a Geometry called "cube" and 6 DrawElementsUInt called "face1/2/.../6". I

Re: [osg-users] OSG and shaders

2009-08-05 Thread Paul Speed
And it deserves saying, if you can get your hands on an OpenGL Orange Book you'll be that many more steps ahead. I thought it was really good at explaining things in depth while also being easily navigated to drill in on target areas. I had complex shaders up and running in a few days with th

Re: [osg-users] OSG and shaders

2009-08-05 Thread Hadrien Thomas
Thank you very much, I was so desperate :\ -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=15851#15851 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/lis

Re: [osg-users] OSG and shaders

2009-08-05 Thread Maxime BOUCHER
Well, I'm doing an internship too. At the beginning I didn't know osg at all, neither shaders. There are still an extraordinary amount of things I ignore about OSG (my advice: when you try to do or understand something, take a look at how it's done in OpenGL). Shaders aren't as hard to use as

Re: [osg-users] OSG and shaders

2009-08-05 Thread Hadrien Thomas
Thank you for the links. I have already read them and found nothing useful at this stage. As every link I've read... The shaders codes are given without the mains, the mains without the shaders, the openscenegraph.org tutorials are with osgGL2 (which I can't work with), and there is no other t

Re: [osg-users] OSG and shaders

2009-08-05 Thread Ulrich Hertlein
On 5/08/09 11:41 AM, Maxime BOUCHER wrote: @btrall: Where do you find this ShaderGen? I found it neither in the classlist nor the osg examples. It could be that it's not part of 2.8 but in trunk it's in: src/osgUtil/ShaderGen.cpp include/osgUtil/ShaderGen examples/osgshadergen/osgshadergen.c

Re: [osg-users] OSG and shaders

2009-08-05 Thread Maxime BOUCHER
Hi, @btrall: Where do you find this ShaderGen? I found it neither in the classlist nor the osg examples. @carnibirdy: Rewritting the lights effects and texture mapping in the shader is quite easy. You can find implementation examples here (http://www.typhoonlabs.com/), in the "OpenGL Shading L

Re: [osg-users] OSG and shaders

2009-08-04 Thread Thrall, Bryan
Hadrien Thomas wrote on Tuesday, August 04, 2009 10:57 AM: > Ok. > It's going to be a lot of work for me I guess :P > > Thank you for your help! Perhaps osgUtil::ShaderGenVisitor and the osgshadergen example can help you out? They were designed to reproduce the fixed functionality pipeline in sh

Re: [osg-users] OSG and shaders

2009-08-04 Thread Hadrien Thomas
Ok. It's going to be a lot of work for me I guess :P Thank you for your help! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=15780#15780 ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] OSG and shaders

2009-08-04 Thread Kim Bale
If you add a shader to an object it removes all of the effects of OpenGL's fixed pipeline rendering. As a result if you want any of that fixed pipeline rendering back (such as lighting, texture mapping etc.) you will have to write an equivalent implementation within the shader. K. 2009/8/4 Hadri

Re: [osg-users] OSG and shaders

2009-08-04 Thread Hadrien Thomas
Good afternoon, It's me again ^^ I tried some available shaders and i'm afraid that i don't understand at all how it works. It blows away all the textures and the lighting. Am I supposed to put them in the shaders? -- Read this topic online here: http://forum.openscenegraph.or

Re: [osg-users] OSG and shaders

2009-08-04 Thread Hadrien Thomas
Thank you very much! I think I copied an error... what a big mistake :P That works! I can finally begin to see the effects of shaders! Fantastic! :P -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=15773#15773 ___

Re: [osg-users] OSG and shaders

2009-08-04 Thread Kim Bale
Hi Hadrien 0(3) : error C1008: undefined variable "glPosition" 0(3) : error C1008: undefined variable "glProjectionMatrix" 0(3) : error C1008: undefined variable "glModelViewMatrix" 0(3) : error C1008: undefined variable "glVertex" GLSL functions all have the prefix gl_ not gl. i.e. glPosition sh

Re: [osg-users] OSG and shaders

2009-08-04 Thread Hadrien Thomas
Hi, I found this tutorial which was very convenient: http://www.openscenegraph.org/documentation/NPSTutorials/osgGL2ShaderIntro.htm But the problem was the path of my shader files. Now I have solved that, it compiles but there is still a problem remaining: Code: VERTEX glCompileShader "" FAI

Re: [osg-users] OSG and shaders

2009-08-03 Thread Simon Hammett
> > Ps: I just noticed that i dont know what are: drawWidth and drawColor. But if > it's not the main problem, can you tell me? > You're missing a vertex shader. Your program isn't linking. -- http://www.ssTk.co.uk ___ osg-users mailing list osg-users

Re: [osg-users] OSG and shaders

2009-08-03 Thread Hadrien Thomas
Good evening ^^ I tried to paste some code from a co-worker but it doesnt seem to work and I dont know why: Main.cpp: Code: #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include int main(int ac

Re: [osg-users] OSG and shaders

2009-08-03 Thread Maxime BOUCHER
Simon Hammett wrote: > http://www.typhoonlabs.com/ > > Download chapters 1 through 5 and ShaderDesigner. > > Very very handy. > > There's also the orange book: (though I've not read it myself) > > http://www.amazon.com/OpenGL-Shading-Language-Randi-Rost/dp/0321637631 > > That's exactly wha

Re: [osg-users] OSG and shaders

2009-08-03 Thread Hadrien Thomas
Thank you very much. I'll visit your links this afternoon! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=15722#15722 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.opensce

Re: [osg-users] OSG and shaders

2009-08-03 Thread Simon Hammett
http://www.typhoonlabs.com/ Download chapters 1 through 5 and ShaderDesigner. Very very handy. There's also the orange book: (though I've not read it myself) http://www.amazon.com/OpenGL-Shading-Language-Randi-Rost/dp/0321637631 2009/8/3 Hadrien Thomas : > Hi! > > I just registered to this for

Re: [osg-users] OSG and shaders

2009-08-03 Thread Martin Großer
Hello Hadrien, You can find a basic introduction in the OSG Tutorials: http://www.openscenegraph.org/projects/osg/wiki/Support/Tutorials Another Tutorials about GLSL-Shaders can you find on the lighthouse website: http://www.lighthouse3d.com/opengl/glsl/ And the Quickref-Doc of GLSL is very u

[osg-users] OSG and shaders

2009-08-03 Thread Hadrien Thomas
Hi! I just registered to this forum. I hope I am not a kind of intruder or something. I am starting right now a 6 month internship. I have to build a library of effects with GLSL and OSG. The problem is that I'm not used to OSG (but I had some courses for OpenInventor which has the same system