Flow Visualisation
Texture.h
Go to the documentation of this file.
1 //
2 // Texture.h
3 // flowviz
4 //
5 // Created by Johann Götz on 04.06.15.
6 // Copyright (c) 2015 Johann Götz. All rights reserved.
7 //
8 
9 #ifndef __flowviz__Texture__
10 #define __flowviz__Texture__
11 
12 #include <stdio.h>
13 #include "OpenGL/gl3.h"
14 #include <SDL2/SDL.h>
15 
16 namespace render {
17 
21  class Texture
22  {
23  private:
24  SDL_Surface *m_textureData;
25  GLuint m_texture;
27  public:
28  Texture() : m_textureData(NULL), m_texture(0) { }
29  ~Texture();
30 
35  void loadTexture(const char* file);
36 
41  void createGlTexture();
42 
47  void setActive();
48 
53  void setActive(GLenum target);
54  };
55 
56 }
57 
58 #endif /* defined(__flowviz__Texture__) */
void setActive()
Set this texture active as Texture 0 GL Texture must be created before running this method...
Definition: Texture.cpp:49
Represents OpenGL texture.
Definition: Texture.h:21
void createGlTexture()
Creates OpenGL Texture from pixel data Texture must be loaded before running this method...
Definition: Texture.cpp:34
Definition: Camera.h:19
void loadTexture(const char *file)
Loads Texture data from image file.
Definition: Texture.cpp:26
~Texture()
Definition: Texture.cpp:15
Texture()
opengl texture number
Definition: Texture.h:28