Kemena3D
Loading...
Searching...
No Matches
ktexture.h
Go to the documentation of this file.
1
5
6#ifndef KTEXTURE_H
7#define KTEXTURE_H
8
9#include "kexport.h"
10
11#include <iostream>
12#include <string>
13#include <vector>
14
15#include "glm/glm.hpp"
16#include <GL/glew.h>
17
18#ifdef __APPLE__
19#include <OpenGL/gl.h>
20#include <OpenGL/glu.h>
21#else
22#include <GL/gl.h>
23#include <GL/glu.h>
24#endif
25
26#include "kdatatype.h"
27
28namespace kemena
29{
37 {
38 public:
43
47 virtual ~kTexture();
48
55
60 void setTextureID(GLuint newTextureID);
61
66 GLuint getTextureID();
67
72 void setTextureName(kString newName);
73
79
84 void setType(kTextureType newType);
85
91
92 protected:
93 private:
94 GLuint textureID;
95 kString textureName;
97 };
98}
99
100#endif // KTEXTURE_H
void setTextureID(GLuint newTextureID)
Sets the GPU texture handle.
kTextureType getType()
Returns the texture type.
virtual ~kTexture()
Virtual destructor; allows safe polymorphic deletion of derived textures.
kString getTextureName()
Returns the GLSL sampler uniform name.
void setType(kTextureType newType)
Sets the texture type (2D or cube map).
GLuint getTextureID()
Returns the GPU texture handle.
void setTextureName(kString newName)
Sets the GLSL sampler uniform name for this texture.
kTexture * duplicate(kString newName)
Creates a shallow copy with a different sampler name.
kTexture()
Constructs an empty texture with no GPU handle assigned.
Core type aliases, enumerations, structs, and utility functions used throughout the engine.
Symbol visibility / linkage macro for the Kemena3D library.
#define KEMENA3D_API
Definition kexport.h:35
Top-level Kemena3D engine namespace.
Definition kanimation.h:23
std::string kString
Standard string alias.
Definition kdatatype.h:42
kTextureType
Distinguishes 2D from cube-map textures.
Definition kdatatype.h:136
@ TEX_TYPE_2D
Standard 2-dimensional texture.
Definition kdatatype.h:137