removed code (re)setting the camera from wxGLCanvas::OnSize()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12369 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -426,19 +426,6 @@ void wxGLCanvas::SwapBuffers()
|
|||||||
|
|
||||||
void wxGLCanvas::OnSize(wxSizeEvent& WXUNUSED(event))
|
void wxGLCanvas::OnSize(wxSizeEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
int width, height;
|
|
||||||
GetClientSize( &width, &height );
|
|
||||||
|
|
||||||
if (m_glContext && GTK_WIDGET_REALIZED(m_glWidget) )
|
|
||||||
{
|
|
||||||
SetCurrent();
|
|
||||||
|
|
||||||
glViewport(0, 0, (GLint)width, (GLint)height );
|
|
||||||
glMatrixMode(GL_PROJECTION);
|
|
||||||
glLoadIdentity();
|
|
||||||
glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 15.0 );
|
|
||||||
glMatrixMode(GL_MODELVIEW);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGLCanvas::SetCurrent()
|
void wxGLCanvas::SetCurrent()
|
||||||
|
@@ -426,19 +426,6 @@ void wxGLCanvas::SwapBuffers()
|
|||||||
|
|
||||||
void wxGLCanvas::OnSize(wxSizeEvent& WXUNUSED(event))
|
void wxGLCanvas::OnSize(wxSizeEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
int width, height;
|
|
||||||
GetClientSize( &width, &height );
|
|
||||||
|
|
||||||
if (m_glContext && GTK_WIDGET_REALIZED(m_glWidget) )
|
|
||||||
{
|
|
||||||
SetCurrent();
|
|
||||||
|
|
||||||
glViewport(0, 0, (GLint)width, (GLint)height );
|
|
||||||
glMatrixMode(GL_PROJECTION);
|
|
||||||
glLoadIdentity();
|
|
||||||
glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 15.0 );
|
|
||||||
glMatrixMode(GL_MODELVIEW);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGLCanvas::SetCurrent()
|
void wxGLCanvas::SetCurrent()
|
||||||
|
@@ -273,12 +273,7 @@ void wxGLCanvas::MacUpdateView()
|
|||||||
{
|
{
|
||||||
UpdateContext();
|
UpdateContext();
|
||||||
m_glContext->SetCurrent();
|
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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -273,12 +273,7 @@ void wxGLCanvas::MacUpdateView()
|
|||||||
{
|
{
|
||||||
UpdateContext();
|
UpdateContext();
|
||||||
m_glContext->SetCurrent();
|
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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -522,19 +522,6 @@ void wxGLCanvas::SwapBuffers()
|
|||||||
|
|
||||||
void wxGLCanvas::OnSize(wxSizeEvent& event)
|
void wxGLCanvas::OnSize(wxSizeEvent& event)
|
||||||
{
|
{
|
||||||
int width, height;
|
|
||||||
GetClientSize(& width, & height);
|
|
||||||
|
|
||||||
if (m_glContext)
|
|
||||||
{
|
|
||||||
m_glContext->SetCurrent();
|
|
||||||
|
|
||||||
glViewport(0, 0, (GLint)width, (GLint)height);
|
|
||||||
glMatrixMode(GL_PROJECTION);
|
|
||||||
glLoadIdentity();
|
|
||||||
glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 15.0 );
|
|
||||||
glMatrixMode(GL_MODELVIEW);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGLCanvas::SetCurrent()
|
void wxGLCanvas::SetCurrent()
|
||||||
|
Reference in New Issue
Block a user