W main.cpp nie mam definicji... mam ją tylko w text.cpp,
#include <SFML/Window.hpp>
#include<swml/swml.h>
using namespace sf;
using namespace FFGE;
int main()
{
GLRect winrect(0,0,800,450);
Window window(VideoMode(winrect.width,winrect.height), "SFML window");
GLScene main_scene;
main_scene.view=GLView(winrect,winrect);
GLText::GLFont font;
font.loadFromFile("arial.ttf");
GLText text;
text.setFont(font);
text.message="it is working... interesting";
text.position.x=200;
text.position.y=200;
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(90,16/9.0,1,500);
glEnable(GL_BLEND);
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);
glEnable(GL_ALPHA_TEST);
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
bool running=true;
while (running)
{
Event event;
while (window.pollEvent(event))
{
switch (event.type)
{
case Event::Closed:
{
running=false;
break;
}
default:
break;
}
}
glClearColor(0.0f, 0.0f, 0.0f,0.0f);
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslated(0,0,-1);
main_scene(winrect);
window.display();
}
return EXIT_SUCCESS;
}