Bezos2 is my latest version of the Bezos learning project that uses raw OpenGL and C++ with Lua.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Bezos2/src/render.hpp

31 lines
605 B

#pragma once
#include "screen.hpp"
#include "framebuffer.hpp"
#include "text.hpp"
#include "document.hpp"
#include <GLFW/glfw3.h>
#include <memory>
struct Engine {
Deck& deck;
std::shared_ptr<FrameBuffer> framebuffer = nullptr;
std::shared_ptr<Screen> screen = nullptr;
std::shared_ptr<Text> text = nullptr;
int at_slide = 0;
float mouse_x = 0.0f;
float mouse_y = 0.0f;
GLFWwindow* window = nullptr;
void render();
void change_slide(int dir);
void mouse(float x, float y) {
mouse_x = x;
mouse_y = y;
}
void update();
void quit();
void init();
bool active();
};