OpenGL examples fix for Linux.
This commit is contained in:
parent
4bdba629fb
commit
fd2070bd90
@ -36,15 +36,13 @@ void OpenGLWidget::setSurfaceMeshToRender(const PolyVox::SurfaceMesh<PositionMat
|
||||
|
||||
void OpenGLWidget::initializeGL()
|
||||
{
|
||||
#ifdef WIN32
|
||||
//If we are on Windows we will need GLEW to access recent OpenGL functionality
|
||||
//We need GLEW to access recent OpenGL functionality
|
||||
GLenum err = glewInit();
|
||||
if (GLEW_OK != err)
|
||||
{
|
||||
/* Problem: glewInit failed, something is seriously wrong. */
|
||||
std::cout << "Error: " << glewGetErrorString(err) << std::endl;
|
||||
std::cout << "GLEW Error: " << glewGetErrorString(err) << std::endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
//Set up the clear colour
|
||||
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
|
@ -162,15 +162,13 @@ void OpenGLWidget::initializeGL()
|
||||
m_bUseOpenGLVertexBufferObjects = true;
|
||||
if(m_bUseOpenGLVertexBufferObjects)
|
||||
{
|
||||
#ifdef WIN32
|
||||
//If we are on Windows we will need GLEW to access recent OpenGL functionality
|
||||
//We need GLEW to access recent OpenGL functionality
|
||||
GLenum err = glewInit();
|
||||
if (GLEW_OK != err)
|
||||
{
|
||||
/* Problem: glewInit failed, something is seriously wrong. */
|
||||
cout << "Error: " << glewGetErrorString(err) << endl;
|
||||
cout << "GLEW Error: " << glewGetErrorString(err) << endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
glShadeModel(GL_SMOOTH); // Enable Smooth Shading
|
||||
|
@ -2,6 +2,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
||||
|
||||
PROJECT(PolyVox)
|
||||
|
||||
add_subdirectory(bindings)
|
||||
add_subdirectory(PolyVoxCore)
|
||||
add_subdirectory(PolyVoxUtil)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user