Elias Almqvist 2 years ago
parent 1de6a7280b
commit 99e57ec654
  1. 7
      headers/window.hpp
  2. 4
      src/main.cpp
  3. 1
      src/window.cpp

@ -3,8 +3,11 @@
// Default window dimensions
#define D_WINDOW_TITLE "Euclid Engine"
#define D_WINDOW_WIDTH 640
#define D_WINDOW_HEIGHT 480
// #define D_WINDOW_WIDTH 640
// #define D_WINDOW_HEIGHT 480
#define D_WINDOW_WIDTH 1920
#define D_WINDOW_HEIGHT 1080
class Window {
public:

@ -138,14 +138,14 @@ int main() {
Renderer::TexturedObject ro(verts, indices);
Renderer::TexturedObject ro2(verts, indices);
ro2.setTexture("assets/textures/meep.jpg"); // TODO: fix texture bug
ro.setTexture(RUSTY_METAL_TEXTURE);
ro2.setTexture("assets/textures/meep.jpg"); // TODO: fix texture bug
scene.spawnObject(&ro);
scene.spawnObject(&ro2);
// Controller test
Controller player(&win, glm::vec3(0.0f, 0.0f, -8.0f));
Controller player(&win, glm::vec3(0.0f, 0.0f, 8.0f));
scene.setCamera(&player);
while (!glfwWindowShouldClose(win.win)) {

@ -17,6 +17,7 @@ void Window::spawn() {
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_FLOATING, GL_TRUE);
win = glfwCreateWindow(_width, _height, _title, NULL, NULL);
if (win == NULL) {

Loading…
Cancel
Save