Hi Don,

Calling wglGetCurrentContext() just before starting the render traversal 
(update/cull/draw) returns a valid value (at least, it isn't null). I don't 
know the exact state at the call to glBindTexture() ...

The problem seems to be related to the construction of the window, as creating 
a Producer render surface, passing it the window handle and calling realize 
seems to fix the problem.

I've started another thread "Producer and Win32" that sums up the problem a 
little better.

Thanks,
Gian

-----Original Message-----
From: [EMAIL PROTECTED] on behalf of Don Burns
Sent: Sat 8/19/2006 7:50 AM
To: osg users
Subject: Re: [osg-users] "Bug" in Texture2D
 
Do you have a valid graphics context when bind is called?

-don

On 8/17/06, Gian Lorenzetto <[EMAIL PROTECTED]> wrote:
>
>  Eh, didn't closely enough at the line above the "bug" .
>
>
>
> _textureObjectBuffer[contextID] = textureObject = generateTextureObject(
>
>
> contextID,GL_TEXTURE_2D,_numMipmapLevels,_internalFormat,_textureWidth,_textureHeight,1,0);
>
>                                                        ^^^^^^^^^
>
>
>
> Either way, I still get a crash in the call to bind(), which in turn calls
> glBindTexture(.). So I guess there is still an initialisation problem .
>
>
>
> Gian
>
>
>
> * *
>
> Hi all,
>
>
>
> After juggling some thirdparty dependencies on Win32 I've managed to get a
> debug build of OSG working with my app and found a possible bug in
> Texture2D.
>
>
>
> My app is crashing during the first call to sceneview->cull() during
> displaylist construction. In Texture2D::apply(State& state), the line
>
>
>
> TextureObject* textureObject = getTextureObject(contextID); (line 115,
> texture2d.cpp)
>
>
>
> is returning a NULL ptr. Because there is a valid texture, control flow
> passes into the third "if" statement and attempts to call
>
>
>
> textureObject->bind(); (line 179, texture2d.cpp)
>
>
>
> which causes a memory fault.
>
>
>
> For some reason, if I delay adding geometry to the scene until after
> calling update(), cull() and draw(), things work fine. I'll keep looking
> into the problem, but from the code it looks as though
> getTextureObject(contextID) should not be returning NULL .
>
>
>
> Gian
>
>
>
> *Gian** Lorenzetto
> Technology & Software Manager
> Anatomics Pty Ltd
> Suite 4 Level 1, 568 St Kilda Rd, Melbourne VIC 3004 Australia
> Telephone +61 (0) 3 9529 8088
> Facsimile +61 (0) 3 9529 8099
> Email [EMAIL PROTECTED]
> www.anatomics.com*
>
> [image: Anatomics Logo]
>
> The information transmitted is intended solely for the person or entity to
> which it is addressed to and may contain confidential and /or privileged
> materials. If you are not the intended recipient of this message, you are
> hereby notified that any use, review, retransmissions or dissemination is
> prohibited. If you received this email in error, please notify the sender
> and delete the email and attached material. Any views expressed in this
> message are those of the individual sender and may not necessarily reflect
> the views of the company.
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/
>
>
>

<<winmail.dat>>

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to