summaryrefslogtreecommitdiff
path: root/engine/texture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engine/texture.cpp')
-rw-r--r--engine/texture.cpp19
1 files changed, 0 insertions, 19 deletions
diff --git a/engine/texture.cpp b/engine/texture.cpp
deleted file mode 100644
index c3575f2..0000000
--- a/engine/texture.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-#include <SDL/SDL_opengl.h>
-#include <stdexcept>
-#include "texture.h"
-#include <stdio.h>
-
-unsigned int Texture::tex() {
- return texture;
-}
-
-void Texture::build() {
- if(!data) {
- throw(std::runtime_error("No texture data"));
- }
- glGenTextures(1, &texture);
- glBindTexture(GL_TEXTURE_2D, texture);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- gluBuild2DMipmaps(GL_TEXTURE_2D, 4, width, height, format, GL_UNSIGNED_BYTE, data);
-}