-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
39 lines (28 loc) · 795 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include <iostream>
#include <GL/glfw.h>
#include "graphics.h"
#include "GLFT_Font.hpp"
#include <fstream>
int main()
{
rendererAllmighty renderer;
renderer.initWindow(800,600,24,GLFW_WINDOW, "CORE");
renderer.setOrtho();
std::ofstream outfile("testfil");
if (outfile.is_open() == 0 )
std::cout << "it's not open either\n";
outfile << "bleeh";
outfile.close();
std::ifstream file( "tank.png", std::ios::binary );
if ( file.is_open() == false)
std::cout << "it's not open\n";
GLFT_Font normalFont("binreg.ttf",24);
std::cout << "Entering main-loop\n";
while (!glfwGetKey( GLFW_KEY_ESC ) && glfwGetWindowParam( GLFW_OPENED ))
{
normalFont.drawText(10,10, "Testar att printa");
renderer.swapBuffers();
}
glfwTerminate();
return 0;
}