projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
DJGPP compilation
[wxWidgets.git]
/
src
/
mac
/
glcanvas.cpp
diff --git
a/src/mac/glcanvas.cpp
b/src/mac/glcanvas.cpp
index 0b86e94269243b0e5e550d8cf2846b763bd8eee9..2ff4a891281280606ad0baf1ae5123c0f0d907f0 100644
(file)
--- a/
src/mac/glcanvas.cpp
+++ b/
src/mac/glcanvas.cpp
@@
-111,9
+111,9
@@
void wxGLContext::SetColour(const char *colour)
* wxGLCanvas implementation
*/
* wxGLCanvas implementation
*/
-IMPLEMENT_CLASS(wxGLCanvas, wx
Scrolled
Window)
+IMPLEMENT_CLASS(wxGLCanvas, wxWindow)
-BEGIN_EVENT_TABLE(wxGLCanvas, wx
Scrolled
Window)
+BEGIN_EVENT_TABLE(wxGLCanvas, wxWindow)
EVT_SIZE(wxGLCanvas::OnSize)
END_EVENT_TABLE()
EVT_SIZE(wxGLCanvas::OnSize)
END_EVENT_TABLE()
@@
-217,7
+217,7
@@
bool wxGLCanvas::Create(wxWindow *parent, const wxGLContext *shared, wxWindowID
int *attribList, const wxPalette& palette)
{
m_macEraseOnRedraw = false ;
int *attribList, const wxPalette& palette)
{
m_macEraseOnRedraw = false ;
- wx
Scrolled
Window::Create( parent, id, pos, size, style, name );
+ wxWindow::Create( parent, id, pos, size, style, name );
AGLPixelFormat fmt = ChoosePixelFormat(attribList);
wxCHECK_MSG( fmt, false, wxT("Couldn't create OpenGl pixel format") );
AGLPixelFormat fmt = ChoosePixelFormat(attribList);
wxCHECK_MSG( fmt, false, wxT("Couldn't create OpenGl pixel format") );
@@
-263,20
+263,32
@@
void wxGLCanvas::SetViewport()
}
void wxGLCanvas::OnSize(wxSizeEvent& event)
}
void wxGLCanvas::OnSize(wxSizeEvent& event)
+{
+ MacUpdateView() ;
+}
+
+void wxGLCanvas::MacUpdateView()
{
if (m_glContext)
{
UpdateContext();
m_glContext->SetCurrent();
{
if (m_glContext)
{
UpdateContext();
m_glContext->SetCurrent();
-
SetViewport();
SetViewport();
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 15.0 );
- glMatrixMode(GL_MODELVIEW);
}
}
}
}
+void wxGLCanvas::MacSuperChangedPosition()
+{
+ MacUpdateView() ;
+ wxWindow::MacSuperChangedPosition() ;
+}
+
+void wxGLCanvas::MacTopLevelWindowChangedPosition()
+{
+ MacUpdateView() ;
+ wxWindow::MacTopLevelWindowChangedPosition() ;
+}
+
void wxGLCanvas::SetCurrent()
{
if (m_glContext)
void wxGLCanvas::SetCurrent()
{
if (m_glContext)