mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-07 03:12:36 +01:00
33 lines
493 B
C++
33 lines
493 B
C++
#ifndef _TESTGLOBABLS_HPP_
|
|
#define _TESTGLOBABLS_HPP_
|
|
|
|
#include <SFML/Window.hpp>
|
|
#include <engine/GameWorld.hpp>
|
|
|
|
// Many tests require OpenGL be functional, seems like a reasonable solution.
|
|
|
|
class Global
|
|
{
|
|
public:
|
|
sf::Window wnd;
|
|
GameWorld* e;
|
|
|
|
Global() {
|
|
wnd.create(sf::VideoMode(640, 360), "Testing");
|
|
glewExperimental = GL_TRUE;
|
|
glewInit();
|
|
e = new GameWorld("data");
|
|
}
|
|
|
|
~Global() {
|
|
wnd.close();
|
|
}
|
|
|
|
static Global& get()
|
|
{
|
|
static Global g;
|
|
return g;
|
|
}
|
|
};
|
|
|
|
#endif |