Hi everyone,

got problems with the textureBackground, the resulting screen always stays
black and the texture isn't shown
(i've taken care that paths are correct -> also i can query correct image
height and width from the image, so i suppose that the image is loaded
correctly).

Does someone have any idea what might be wrong?

here's my code snippet:

                 ViewportPtr controlViewport =
_smgr->getWindow()->getPort(0);

                ImagePtr bkgImage = Image::create();

                beginEditCP(bkgImage);
                    bkgImage->read(imageFullPath.c_str());
                endEditCP(bkgImage);

#ifdef OPENSG_18
                ImageBackgroundPtr imageBkg = ImageBackground::create();
                beginEditCP(imageBkg);
                    imageBkg->setImage(bkgImage);
                    imageBkg->setScale(true);
                endEditCP(imageBkg);
#else
#ifdef OPENSG_20
                TextureBackgroundPtr imageBkg = TextureBackground::create();
                TextureObjChunkRecPtr bkgTex = TextureObjChunk::create();
                bkgTex->setImage(bkgImage);
                bkgTex->setScale(true);
                imageBkg->setTexture(bkgTex);
                //imageBkg->setScale(true);
                //TODO: test this
#endif
#endif

                beginEditCP(controlViewport);
                    controlViewport->setBackground(imageBkg);
                endEditCP(controlViewport);


thx in advance
cheers Georg
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to