Setting OpenGL context in the dtor of a wxGLCanvas derived class
Richard
legalize+jeeves at mail.xmission.com
Mon Oct 1 06:43:22 PDT 2007
[Please do not mail me a copy of your followup]
luca.cappa at sequoia.it ("Luca Cappa") spake the secret code
<op.tzicx2ktr4jy9l at computery> thusly:
>On Fri, 28 Sep 2007 22:33:54 +0200, Richard
><legalize+jeeves at mail.xmission.com> wrote:
>> What sort of "OpenGL cleanup" are you doing?
>
>I am destroying the textures I used for the glyph's font (calling
>glDeleteTextures), and if the context is not the right one, i will end up
>deleting the textures of another wxGLCanvas :-) which will be drawn with
>all flat coloured quads :)
That's what I suspected; this might be a deficiency in the wxGLCanvas
model here, based on simplistic usage. How to correct it would be an
interesting design problem. I can think of several ways to address it
depending on how "intrusive" you want wxGLCanvas to be. Maybe the
simplest thing to do is override one of its methods, or provide a new
virtual method call at the right place and let the default
implementation do nothing, but an application could override it to get
the right behavior.
--
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://www.xmission.com/~legalize/book/download/index.html>
Legalize Adulthood! <http://blogs.xmission.com/legalize/>
More information about the wx-users
mailing list