Rune Engine
Version 0.2.7-alpha
Documentation for how to make games using the Rune Engine.
texture.h
1
9
#ifndef TEXTURE_H_DEFINED
10
#define TEXTURE_H_DEFINED
11
13
#define LINEAR_FILTER 0x2601
14
#define NEAREST_FILTER 0x2600
16
17
#include "core.h"
18
#include <string>
19
20
namespace
rune
{
21
22
class
RUNE_ENGINE
Texture
23
{
24
private
:
25
unsigned
int
m_textureID;
26
std::string m_filePath;
27
unsigned
char
* m_localBuffer;
28
int
m_width, m_height, m_BPP;
29
30
public
:
32
Texture
(std::string
const
& path,
unsigned
int
filerMode = LINEAR_FILTER);
34
Texture
();
36
~
Texture
(
void
);
38
bool
loadFromFile(std::string
const
& path,
unsigned
int
filterMode = LINEAR_FILTER);
40
void
bind(
unsigned
int
slot = 0);
42
void
unbind();
44
unsigned
int
getTextureID(
void
);
46
unsigned
int
getHeight(
void
);
47
//Get the width of the texture.
48
unsigned
int
getWidth(
void
);
50
unsigned
char
* getTextureData(
void
);
51
52
};
53
}
54
55
#endif
rune
The main namespace to be used for interfacing with the engine.
Definition:
animator.h:21
rune::Texture
A texture that can be applied to drawable objects.
Definition:
texture.h:23
RuneEngine
src
Renderer
texture.h
Generated on Tue Feb 2 2021 12:53:34 for the Rune Engine with
1.8.18.