PDA

View Full Version : OpenGL Code works in QT creator doesnt work in visual studio?



johnsonalpha
7th December 2015, 07:14
I have OpenGL Code works in QT creator doesnt work in visual studio I have the basic QGLWidget implemented with (code below) this code works fine and builds fine in QTCreator but when in visual studio ill compile it and opengl screen is
white. What could be causing this?

void GLWidget::initializeGL(){
glClearColor(1, 0, 0, 1);
}

void GLWidget::paintGL(){
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
}