BMC Engine
v1.0.0
An open-source game engine powered by C and C++
Loading...
Searching...
No Matches
BMC-ENGINE
rendering
window
Window.h
1
#ifndef WINDOW_H
2
#define WINDOW_H
3
4
#include "stb_image.h"
5
6
#include "glad/glad.h"
7
#include "GLFW/glfw3.h"
8
9
#include <iostream>
10
11
#include "math/Vector.h"
12
13
#include "imgui.h"
14
#include "imgui_impl_glfw.h"
15
#include "imgui_impl_opengl3.h"
16
17
#include "errors/ErrorHandler.h"
18
23
class
Window
{
24
public
:
31
Window
(
const
char
* title,
int
width,
int
height);
// title with size
32
38
Window
(
const
char
* title,
Vector2
size);
// ditto
39
44
Window
(
const
char
* title);
45
49
~Window
();
50
54
bool
shouldClose
();
55
60
void
setIcon
(
const
char
* file);
61
67
void
setSize
(
int
width,
int
height);
68
73
void
setSize
(
Vector2
size);
74
78
void
initImGui
();
79
83
void
close
();
84
88
void
maximize
();
89
93
int
getWidth
();
94
98
int
getHeight
();
99
103
Vector2
*
getSize
();
104
108
GLFWwindow*
getWindow
();
109
110
private
:
111
bool
_create(
const
char
* title,
int
width,
int
height);
112
void
_setSize(
int
width,
int
height);
113
void
_calcViewport(
int
width,
int
height);
114
static
void
_framebuffer_size_callback(GLFWwindow* window,
int
width,
int
height);
115
116
GLFWwindow* window;
117
};
118
119
#endif
// WINDOW_H
Vector2
Definition
Vector.h:7
Window
Definition
Window.h:23
Window::getHeight
int getHeight()
Definition
Window.cpp:81
Window::getWindow
GLFWwindow * getWindow()
Definition
Window.cpp:93
Window::setSize
void setSize(int width, int height)
Definition
Window.cpp:43
Window::~Window
~Window()
Definition
Window.cpp:20
Window::getWidth
int getWidth()
Definition
Window.cpp:74
Window::Window
Window(const char *title, int width, int height)
Definition
Window.cpp:5
Window::close
void close()
Definition
Window.cpp:64
Window::maximize
void maximize()
Definition
Window.cpp:69
Window::initImGui
void initImGui()
Definition
Window.cpp:53
Window::getSize
Vector2 * getSize()
Definition
Window.cpp:88
Window::setIcon
void setIcon(const char *file)
Definition
Window.cpp:31
Window::shouldClose
bool shouldClose()
Definition
Window.cpp:26
Generated by
1.11.0