Hey all,
I'm currently trying to upgrade from 2.3.2 to 2.4.2, but when I change the static libs of 2.3.2 to the static libs of 2.4.2 and run the application, my code crashes on glewInit returning GLEW_ERROR_NO_GL_VERSION.
I haven't changed any code from the working 2.3 version to the crashing 2.4 version, so I'm assuming it's because of something internally being different.
The code for my init function is below, any help would be greatly appreciated!~
Anasky
void clsOpenGLDataHelper::Init( )
{
// Initialize window, ~OpenGL deletes it
m_WindowMode = sf::VideoMode( m_ScreenWidth, m_ScreenHeight );
m_ContextSettings = sf::ContextSettings( 24U, 8U, 4U, 4U, 6U, sf::ContextSettings::Attribute::Default );
m_Style = sf::Style::None;
m_Window = new sf::Window( );
m_Window->setVerticalSyncEnabled( true );
m_Window->create( m_WindowMode, "Client", m_Style, m_ContextSettings );
m_Window->setPosition( sf::Vector2i( ( m_ScreenWidth - m_WindowMode.width ) / 2, ( m_ScreenHeight - m_WindowMode.height ) / 2 ) );
m_Window->setActive( true );
OpenGL.Resize( );
clsOpenGL::CheckOGLerror( );
m_WindowHandle = m_Window->getSystemHandle( );
glewExperimental = GL_TRUE;
GLenum init = glewInit( );
if (init != GLEW_OK)
{
throw std::runtime_error( std::string( "glewInit failed" ) + (const char*) glewGetErrorString( init ) );
}
if (!glewIsSupported( "GL_VERSION_1_5" ) && !glewIsSupported( "GL_ARB_vertex_buffer_object" ))
{
throw std::runtime_error( "ARB_vertex_buffer_object not supported!" );
}
clsOpenGL::CheckOGLerror( );
}