YAGE
v0.1.1
Yet Another Game Engine
Main Page
Related Pages
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Pages
window.h
Go to the documentation of this file.
1
/* ----------------------------------------------------------------------------
2
* window.h
3
*
4
* Copyright (c) 2017 Yann Herklotz Grave <ymherklotz@gmail.com> -- MIT License
5
* See file LICENSE for more details
6
* ----------------------------------------------------------------------------
7
*/
8
12
#ifndef WINDOW_H
13
#define WINDOW_H
14
15
#include <glad/glad.h>
16
17
#include <GLFW/glfw3.h>
18
19
#include <string>
20
21
namespace
yage
22
{
23
24
// window flags that can change it's appearance
25
enum
WindowFlags
:
unsigned
{
26
SHOWN
= 0x1,
27
HIDDEN
= 0x2,
28
FULLSCREEN
= 0x4,
29
BORDERLESS
= 0x8,
30
};
31
32
// window wrapper around GLFWwindow pointer
33
class
Window
34
{
35
private
:
37
GLFWwindow *
window_
=
nullptr
;
38
39
public
:
40
Window
();
41
Window
(
const
Window
&) =
delete
;
42
Window
(
Window
&&) =
delete
;
44
~Window
();
45
46
Window
&
operator=
(
const
Window
&) =
delete
;
47
Window
&
operator=
(
Window
&&) =
delete
;
48
50
void
create
(
const
std::string &window_name,
int
width,
int
height,
51
unsigned
flags =
WindowFlags::SHOWN
);
53
void
swapBuffer
();
55
void
clearBuffer
();
57
void
hide
();
59
void
show
();
60
};
61
62
}
// namespace yage
63
64
#endif
yage::HIDDEN
Definition:
window.h:27
yage::Window::Window
Window()
yage::Window::swapBuffer
void swapBuffer()
swap the buffer
Definition:
window.cpp:51
yage::Window::hide
void hide()
hide windowProc
Definition:
window.cpp:65
yage::Window::window_
GLFWwindow * window_
window handle
Definition:
window.h:37
yage::Window
Definition:
window.h:33
yage::Window::create
void create(const std::string &window_name, int width, int height, unsigned flags=WindowFlags::SHOWN)
create the window, initialize the handle and update the width and height
Definition:
window.cpp:23
yage::FULLSCREEN
Definition:
window.h:28
yage::WindowFlags
WindowFlags
Definition:
window.h:25
yage::Window::~Window
~Window()
destroys the window handle
Definition:
window.cpp:18
yage::Window::show
void show()
show window
Definition:
window.cpp:70
yage::SHOWN
Definition:
window.h:26
yage::Window::clearBuffer
void clearBuffer()
clear buffer
Definition:
window.cpp:57
yage::Window::operator=
Window & operator=(const Window &)=delete
yage::BORDERLESS
Definition:
window.h:29
yage
base
window.h
Generated on Mon Sep 25 2017 20:19:15 for YAGE by
1.8.6