Re: [osg-users] Fwd: SKYBOX ?
On Wed, Sep 3, 2008 at 7:27 PM, Jeremy Moles [EMAIL PROTECTED] wrote: In your defense, however, I'm not able to actually get any test code for Extensions working at all. Some of the examples create Extensions objects (osgvertexprogram, osgmultitexture), but they never return a valid pointer--at least for me. The Extensions objects will be null until they are first access from a thread that has a valid graphics context, its only once you have a graphics context that you can do any OpenGL command including checking for extensions. So query the extensions object after realize and you should have success. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Fwd: SKYBOX ?
On Thu, 2008-09-04 at 10:22 +0100, Robert Osfield wrote: On Wed, Sep 3, 2008 at 7:27 PM, Jeremy Moles [EMAIL PROTECTED] wrote: In your defense, however, I'm not able to actually get any test code for Extensions working at all. Some of the examples create Extensions objects (osgvertexprogram, osgmultitexture), but they never return a valid pointer--at least for me. The Extensions objects will be null until they are first access from a thread that has a valid graphics context, its only once you have a graphics context that you can do any OpenGL command including checking for extensions. So query the extensions object after realize and you should have success. Hmm, I'm still not able to get it working. I'm using the code from osgmultitexture and the textExt pointer is always null for me. Do you think it's a local bug, or is that a valid pointer on your system when you run osgmultitexture? I'd like to make a quick example, osgglinfo, if I can get this working easily. :) Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Fwd: SKYBOX ?
Hello Nao, Would you have some advice about this, please? Please don't send e-mail to someone directly when you post questions on a mailing list. If I didn't reply, there are a couple possible reasons, which may be that I didn't get to it yet, or that I don't have anything to add (which is the case here). In any case, it's kind of like assuming that your question takes precedence over whatever else I may be doing, which is a bit rude. Like most people on the mailing list, I have paid work to do, and answering messages on the list is done on the off-time (while something compiles, or whatever). Now, when I try to use a 2048x2048 jpeg image for the texture, I get this message (after viewer.run()): Scaling image 'skybox-1.jpg' from (2048,2048) to (512,512) And indeed the image seems rescaled to 512x512. It does not have the quality of 2048x2048 image. Is there a way to use the 2048x2048 image without rescaing? What component is enforcing this 512x512 restriction? I have no idea why OSG would scale an image from 2048x2048 to 512x512. As far as I know, OSG should only auto-resize an image if its dimensions are not powers of two, and 2048 is a power of two... You could place a breakpoint where the message originates (search for Scaling image in the OSG sources, and place a breakpoint there) and then run your application, and when the breakpoint is reached, examine the call stack to see where the resize originates from. Sorry I can't help more. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Fwd: SKYBOX ?
On Wed, 2008-09-03 at 13:17 -0400, Jean-Sébastien Guay wrote: Hello Nao, Would you have some advice about this, please? Please don't send e-mail to someone directly when you post questions on a mailing list. If I didn't reply, there are a couple possible reasons, which may be that I didn't get to it yet, or that I don't have anything to add (which is the case here). In any case, it's kind of like assuming that your question takes precedence over whatever else I may be doing, which is a bit rude. Like most people on the mailing list, I have paid work to do, and answering messages on the list is done on the off-time (while something compiles, or whatever). Now, when I try to use a 2048x2048 jpeg image for the texture, I get this message (after viewer.run()): Scaling image 'skybox-1.jpg' from (2048,2048) to (512,512) And indeed the image seems rescaled to 512x512. It does not have the quality of 2048x2048 image. Is there a way to use the 2048x2048 image without rescaing? What component is enforcing this 512x512 restriction? These values are determined by your OpenGL driver. The osg::Image class queries these values and ensures that all images adhere to this (see osg::Texture::getExtensions(...)) and the method ::maxTextureSize. In your defense, however, I'm not able to actually get any test code for Extensions working at all. Some of the examples create Extensions objects (osgvertexprogram, osgmultitexture), but they never return a valid pointer--at least for me. I have no idea why OSG would scale an image from 2048x2048 to 512x512. As far as I know, OSG should only auto-resize an image if its dimensions are not powers of two, and 2048 is a power of two... You could place a breakpoint where the message originates (search for Scaling image in the OSG sources, and place a breakpoint there) and then run your application, and when the breakpoint is reached, examine the call stack to see where the resize originates from. Sorry I can't help more. J-S ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org