mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-09 12:22:34 +01:00
33 lines
498 B
C++
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 |