BMC Engine v1.0.0
An open-source game engine powered by C and C++
|
#include <Window.h>
Public Member Functions | |
Window (const char *title, int width, int height) | |
Window (const char *title, Vector2 size) | |
Window (const char *title) | |
~Window () | |
bool | shouldClose () |
void | setIcon (const char *file) |
void | setSize (int width, int height) |
void | setSize (Vector2 size) |
void | initImGui () |
void | close () |
void | maximize () |
int | getWidth () |
int | getHeight () |
Vector2 * | getSize () |
GLFWwindow * | getWindow () |
An easier implementation for creating a GLFW window, instead of using GLFW functions.
Window::Window | ( | const char * | title, |
int | width, | ||
int | height ) |
Creates the window object.
title | const char* to assign to the window's name to. |
width | The width, in pixels, to create the window with. |
height | The height, in pixels, to create the window with. |
Window::Window | ( | const char * | title, |
Vector2 | size ) |
Creates the window object.
title | const char* to assign to the window's name to. |
size | The size, as a Vector2, to set the window size to. |
Window::Window | ( | const char * | title | ) |
Creates the window object.
title | const char* to assign to the window's name to. |
Window::~Window | ( | ) |
Delete the window and clean up GLFW.
void Window::close | ( | ) |
Call glfwSetWindowShouldClose to tell GLFW to close the window.
int Window::getHeight | ( | ) |
int Window::getWidth | ( | ) |
GLFWwindow * Window::getWindow | ( | ) |
void Window::initImGui | ( | ) |
Initialize ImGui
void Window::maximize | ( | ) |
Maximize the window.
void Window::setIcon | ( | const char * | file | ) |
Sets the icon of the window on the taskbar and title bar.
file | The file path to set the icon to. |
void Window::setSize | ( | int | width, |
int | height ) |
Set the size of the window.
width | The width, in pixels, to set. |
height | The height, in pixels, to set. |
void Window::setSize | ( | Vector2 | size | ) |
Set the size of the window.
size | The size, as a Vector2, to set. |
bool Window::shouldClose | ( | ) |