RenderTubes::RenderTubes(wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size)
:wxGLCanvas(parent,id,pos,size)
{
SetUpGL();
}
RenderTubes::~RenderTubes() {
}
void RenderTubes::SetUpGL()
{
wxSize temp = this->GetSize();
glViewport(0,0,temp.GetWidth(),temp.GetHeight());
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
//
// glMatrixMode(GL_MODELVIEW);
// glLoadIdentity();
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
glClear(GL_DEPTH_BUFFER_BIT|GL_COLOR_BUFFER_BIT);
glFinish();
}
openGL and wxWidgets
Hi All,
I'm having trouble using OpenGL on widgets. I have tried creating a canvas over a static box as well as a panel attempting to draw on it. When I do it over the static box I can see the canvas was indeed created since I could cover up the caption with it, but no matter what I do, I can't clear it or draw on it.
This is only a snippet, I can post more upon request.
Mahalo,
Aiea
Hi,
sounds like you are not calling the
wxGLCanvas::SwapBuffers
try that,
Peter Wraae Marino
www.osghelp.com
sounds like you are not calling the
wxGLCanvas::SwapBuffers
try that,
Peter Wraae Marino
www.osghelp.com
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement