Hi, On Fri, 2011-01-07 at 13:27 +0100, Josef Grunig wrote: > Dear OpenSG Users, > > I was looking for the first time at OpenSG2.0 after some years working on 1.8. > > I wanted to set up a simple example that renders a cube map texture of > the scene into an FBO. > Having a look at the sources I found the CubemapGenerator class and > it's test. Unfortunately the test compiles, but not the shaders, so I > have not a good starting point. > > Can someone point me in the right direction on how use that class? It > seems to be a Core, how is it supposed to work?
the shaders should only come from the hdr part of the test. Could you press 'g' and see if that gives you an image. This replaces the core of the hdrroot node with a simple group and should disable the shaders involved there (something you could also just add to the normal example code). In general the CubemapGenerator works with chunk overrides, so the generated texture chunk is added during the traversal as a texture override for the unit you specify with setTexUnit. In the default setupMode it also adds the needed TexEnv/TexCoordGen/TexCoordTransform chunks for a mirror setup. SetupMode controls which chunks are added, e.g. the default is SetupTexture | SetupTexEnv | SetupTexGen | OverrideTex SetupTexture controls whether or not the texture chunk is created internally (if set, otherwise the _sfTexture value is used). Note this does not control if the chunks is added as an override. SetupTexEnv : create, setup and add TexEnv override SetupTexGen : create, setup and add TexGen/TexTransform override OverrideTex : add the TexChunkOverride Let me know more detailed questions. A different example is in Examples/CSM/Mirror, that one should work without shaders out of the box. It at least gives you the scene structure. kind regards gerrit ------------------------------------------------------------------------------ Gaining the trust of online customers is vital for the success of any company that requires sensitive data to be transmitted over the Web. Learn how to best implement a security strategy that keeps consumers' information secure and instills the confidence they need to proceed with transactions. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users