1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-09 12:22:34 +01:00
openrw/tests/test_globals.hpp
Daniel Evans 00dd9ee31e more test
2014-02-10 12:09:16 +00:00

33 lines
498 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("test_data");
}
~Global() {
wnd.close();
}
static Global& get()
{
static Global g;
return g;
}
};
#endif