Hi,

I'm running OSG in single threaded mode and making the calls right after the
context setup code, but if you think that the scaling operation needs to be
done within the OSG's inner threads; then there's no chance that I could use
this function. If you suggest an alternative, I'll follow.

Regards,

Can

2008/10/27 Robert Osfield <[EMAIL PROTECTED]>

> Hi Can,
>
> You make no mention where about your call the scaleImage from, there
> is chance that you think you are calling it from a thread with the
> graphics context but don't.  Without more info about your usage there
> isn't anyone else can say.  Please remember the OSG is multi-threaded,
> and by default with put the graphics in its own thread per context so
> then main thread won't have the context current.
>
> Robert.
>
> On Mon, Oct 27, 2008 at 1:06 PM, Can T. Oguz <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > Yes, I've read the previous posts and I have a valid context. I have even
> > made the calls after the first frame() is executed (to ensure the
> context)
> >
> > Source image is 512x217
> > Dest image is 50x20
> > OS : Win XP
> > Image iss JPG,  GL_RGB
> > Card : NVidia 8800 GT
> > OSG : 2.6.1
> >
> > and the code is :
> >
> >
> > for (UINT i = 0; i < 3; i++)
> >
> > {
> >
> > Image
> >
> > * image = readImageFile(string(path) + textureFiles[i] + ".jpg");
> >
> > m_textures
> >
> > [i] = new Texture2D(image);
> >
> > m_thumbnails
> >
> > [i] = new Image(*image, CopyOp::DEEP_COPY_IMAGES);
> >
> > m_thumbnails
> >
> > [i]->scaleImage(50, 20, 1);
> >
> > }
> >
> > I've also tried a non-copied fresh image and I've got the same error.
> >
> > Thanks for reading,
> >
> > Can
> >
> >
> >
> > 2008/10/27 Tomlinson, Gordon <[EMAIL PROTECTED]>
> >>
> >> First guess 'Are you doing this in process with a valid graphics
> context'
> >>
> >>
> >> Might help if you provided some basic info such as"
> >>
> >>
> >> How are you scaling the image (code)
> >> What version of osg
> >> What OS
> >> how big is the image
> >> What type of image is it
> >> Graphics card
> >> etc.
> >>
> >> have you tried debug  the issue? , stepped into the code etc to see what
> >> might be amiss
> >>
> >>
> >>
> >> Gordon
> >>
> >> __________________________________________________________
> >> Gordon Tomlinson
> >>
> >> Product Manager 3D
> >> Email  : gtomlinson @ overwatch.textron.com
> >> __________________________________________________________
> >> (C): (+1) 571-265-2612
> >> (W): (+1) 703-437-7651
> >>
> >> "Self defence is not a function of learning tricks
> >> but is a function of how quickly and intensely one
> >> can arouse one's instinct for survival"
> >> - Master Tambo Tetsura
> >>
> >>
> >>
> >> ________________________________
> >> From: [EMAIL PROTECTED]
> >> [mailto:[EMAIL PROTECTED] On Behalf Of Can T.
> Oguz
> >> Sent: Monday, October 27, 2008 8:45 AM
> >> To: OpenSceneGraph Users
> >> Subject: [osg-users] gluScaleImage() returns "out of memory"
> >>
> >> Hi,
> >>
> >> I'm receiving an out of memory error while trying to scale an image.
> >>
> >> File : Image.cpp
> >> Line : 839 (2.6.1)
> >>
> >> In Image::scaleImage(), gluScaleImage() returns 1285 : out of memory.
> >>
> >> Any ideas?
> >>
> >> Can
> >> _______________________________________________
> >> osg-users mailing list
> >> [email protected]
> >>
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >>
> >
> >
> > _______________________________________________
> > osg-users mailing list
> > [email protected]
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >
> >
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to