[ wxwindows-Bugs-1782738 ] wxGlCanvas initialization problem on Carbon

SourceForge.net noreply at sourceforge.net
Wed Sep 5 07:54:58 PDT 2007


Bugs item #1782738, was opened at 2007-08-27 14:04
Message generated for change (Comment added) made by andrey_yazhuk
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1782738&group_id=9863

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: wxMac specific
Group: Platform specific
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Andrey (andrey_yazhuk)
Assigned to: Stefan Csomor (csomor)
Summary: wxGlCanvas initialization problem on Carbon

Initial Comment:
In our demo application we place several wxGlCanvas-derived objects in wxAuiNotebook control. When application starts the notebook displays garbage, this affects even non-OpenGL windows such as wxTextCtrl. This happens on only on Mac (Mac OS X / Carbon), the same code works well on Windows and GTK. It seems that window updates are ignored or handled incorrectly. Switching tabs does not help until we click on the tab where the last OpenGL window was placed, after that the problem magically disappears.

It seems that wxGlCanvas constructor contributes to the problem. If we move the following code from wxGLCanvas constructor to OnPaint() handler the application begins to work fine:

    GLboolean b;
    b = aglSetDrawable(m_glContext, m_drawable);
    wxCHECK_RET( b, wxT("Couldn't bind OpenGl context") );
    aglEnable(m_glContext , AGL_BUFFER_RECT ) ;
    b = aglSetCurrentContext(m_glContext);
    wxCHECK_RET( b, wxT("Couldn't activate OpenGl context") );


Related issue:
https://sourceforge.net/tracker/index.php?func=detail&aid=892534&group_id=9863&atid=109863


----------------------------------------------------------------------

>Comment By: Andrey (andrey_yazhuk)
Date: 2007-09-05 10:54

Message:
Logged In: YES 
user_id=1817710
Originator: YES

Here is a sample application, the problem was reproduced on OSX: 10.4.10
(Intel) Xcode: 2.4.1
File Added: openGLMacBug.cpp

----------------------------------------------------------------------

Comment By: Stefan Csomor (csomor)
Date: 2007-08-29 12:23

Message:
Logged In: YES 
user_id=81467
Originator: NO

could you please provide a patch to minimal sample or some other sample,
that reproduces the problem

Thanks,

Stefan

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1782738&group_id=9863




More information about the wx-dev mailing list