initialize GLEW from Client
This commit is contained in:
parent
a6df74a757
commit
be56fd0aa5
@ -1,10 +1,14 @@
|
|||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include <GL/glew.h>
|
||||||
#include <SFML/OpenGL.hpp>
|
#include <SFML/OpenGL.hpp>
|
||||||
#include <SFML/Graphics.hpp>
|
#include <SFML/Graphics.hpp>
|
||||||
#include <SFML/System.hpp>
|
#include <SFML/System.hpp>
|
||||||
#include "Client.h"
|
#include "Client.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
Client::Client(bool fullscreen)
|
Client::Client(bool fullscreen)
|
||||||
{
|
{
|
||||||
@ -15,6 +19,11 @@ Client::Client(bool fullscreen)
|
|||||||
? sf::Style::Fullscreen
|
? sf::Style::Fullscreen
|
||||||
: sf::Style::Resize | sf::Style::Close;
|
: sf::Style::Resize | sf::Style::Close;
|
||||||
m_window = new sf::Window(mode, "Treacherous Terrain", style);
|
m_window = new sf::Window(mode, "Treacherous Terrain", style);
|
||||||
|
GLenum err = glewInit();
|
||||||
|
if (err != GLEW_OK)
|
||||||
|
{
|
||||||
|
cerr << "GLEW Initialization error: " << glewGetErrorString(err) << endl;
|
||||||
|
}
|
||||||
initgl();
|
initgl();
|
||||||
resize_window(m_window->getSize().x, m_window->getSize().y);
|
resize_window(m_window->getSize().x, m_window->getSize().y);
|
||||||
m_player = new Player();
|
m_player = new Player();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user