NWengine 0.9
Loading...
Searching...
No Matches
Primitives.h
1#pragma once
2#include "vector"
3#include "Globals.h"
4
8class Primitives {
9public:
13 static void Init();
14
18 static void Destroy();
19};
20
25public:
26 uint32 VBO = 0;
27 uint32 EBO = 0;
28 uint32 VAO = 0;
35
40 QuadInternal(int a);
41
45 void Draw();
46
50 void Delete();
51};
52
56class Quad {
57public:
58 int width = 0;
59 int height = 0;
66 void UpdateSize(float width, float height);
67
73 Quad(float width = 1.0f, float height = 1.0f);
74
78 void Draw();
79};
The Primitives class represents a collection of primitive shapes.
Definition Primitives.h:8
static void Destroy()
Destroys the Primitives class.
Definition Primitives.cpp:76
static void Init()
Initializes the Primitives class.
Definition Primitives.cpp:72
The Quad class represents a quad shape.
Definition Primitives.h:56
void Draw()
Draws the quad.
Definition Primitives.cpp:67
int height
Definition Primitives.h:59
int width
Definition Primitives.h:58
Quad(float width=1.0f, float height=1.0f)
Constructs a new Quad object.
Definition Primitives.cpp:57
void UpdateSize(float width, float height)
Updates the size of the quad.
Definition Primitives.cpp:62
The QuadInternal class represents an internal implementation of a quad shape.
Definition Primitives.h:24
uint32 VBO
Definition Primitives.h:26
void Draw()
Draws the quad.
Definition Primitives.cpp:45
QuadInternal()
Constructs a new QuadInternal object.
Definition Primitives.cpp:11
void Delete()
Deletes the quad.
Definition Primitives.cpp:50
uint32 EBO
Definition Primitives.h:27
static QuadInternal quadInstance
Definition Primitives.h:29
uint32 VAO
Definition Primitives.h:28