wxGLContext example in a wxGLCanvas

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
akkumar
Earned a small fee
Earned a small fee
Posts: 15
Joined: Sat Sep 11, 2004 8:35 pm
Location: CA

wxGLContext example in a wxGLCanvas

Post by akkumar »

I was going thru' the constructor of wxGLCanvas and came across this third overloaded form .


void wxGLCanvas(wxWindow* parent, wxGLContext* sharedContext = NULL, wxWindowID id = -1, const wxPoint& pos, const wxSize& size, long style=0, const wxString& name="GLCanvas", int* attribList = 0, const wxPalette& palette = wxNullPalette)


What does sharedcontext indicate ? Can anyone point me to a practical example where this could be useful.
Karthik.
User avatar
Ryan Norton
wxWorld Domination!
wxWorld Domination!
Posts: 1319
Joined: Mon Aug 30, 2004 6:01 pm

Re: wxGLContext example in a wxGLCanvas

Post by Ryan Norton »

akkumar wrote:I was going thru' the constructor of wxGLCanvas and came across this third overloaded form .


void wxGLCanvas(wxWindow* parent, wxGLContext* sharedContext = NULL, wxWindowID id = -1, const wxPoint& pos, const wxSize& size, long style=0, const wxString& name="GLCanvas", int* attribList = 0, const wxPalette& palette = wxNullPalette)


What does sharedcontext indicate ? Can anyone point me to a practical example where this could be useful.
sharedcontext is used to share resources (display lists, etc.) with another context (I.E. another canvas for now).

For a more specific explanation -
http://developer.apple.com/qa/qa2001/qa1248.html

I'll also add some docs for wxGLContext to head.
[Mostly retired moderator, still check in to clean up some stuff]
Post Reply