DI-Guy SDK Documentation  13.2
diguyGraphicsFrameBuffer.h
Go to the documentation of this file.
1 
2 #ifndef __bdiGeometryFrameBufferOgl_H
3 #define __bdiGeometryFrameBufferOgl_H
4 
5 #include <declspec_bdigraphics.h>
6 
7 class bdiGeometryTexture;
8 class bdiGeometryTextureFile;
9 
10 class BDI_DECLSPEC_bdigraphics diguyGraphicsFrameBuffer
11 {
12 public:
14  m_width(256), m_height(256),
15  m_shadow_map(0),
16  m_enable_mipmaps(0),
17  m_texture_unit(1){
18  ;
19  }
21 
22  virtual int resize(int width, int height) {
23  m_width = width;
24  m_height = height;
25  return 0;
26  }
27 
28  virtual void set_shadow_map(int shadow_map){ m_shadow_map = shadow_map; };
29  virtual void set_enable_mipmaps(int enable_mipmaps){ m_enable_mipmaps = enable_mipmaps; }
30  virtual void set_texture_unit(int texture_unit){ m_texture_unit = texture_unit; }
31 
32  virtual void bind() = 0;
33  virtual void clear() = 0;
34  virtual void unbind() = 0;
35 
36  unsigned int virtual get_texture_id() = 0;
37  unsigned int virtual get_frame_buffer_id() = 0;
38  unsigned int virtual get_depth_texture_id() = 0;
39 
40  int get_width() { return m_width; }
41  int get_height() { return m_height; }
42 
43 protected:
44  int m_width;
45  int m_height;
49 };
50 
51 #endif // __bdiGeometryFrameBufferOgl_H
52 
int m_texture_unit
Definition: diguyGraphicsFrameBuffer.h:48
virtual int resize(int width, int height)
Definition: diguyGraphicsFrameBuffer.h:22
virtual void set_enable_mipmaps(int enable_mipmaps)
Definition: diguyGraphicsFrameBuffer.h:29
int m_enable_mipmaps
Definition: diguyGraphicsFrameBuffer.h:47
int m_height
Definition: diguyGraphicsFrameBuffer.h:45
Definition: diguyGraphicsFrameBuffer.h:10
diguyGraphicsFrameBuffer()
Definition: diguyGraphicsFrameBuffer.h:13
int get_width()
Definition: diguyGraphicsFrameBuffer.h:40
int get_height()
Definition: diguyGraphicsFrameBuffer.h:41
virtual ~diguyGraphicsFrameBuffer()
Definition: diguyGraphicsFrameBuffer.h:20
int m_width
Definition: diguyGraphicsFrameBuffer.h:44
int m_shadow_map
Definition: diguyGraphicsFrameBuffer.h:46
virtual void set_texture_unit(int texture_unit)
Definition: diguyGraphicsFrameBuffer.h:30
virtual void set_shadow_map(int shadow_map)
Definition: diguyGraphicsFrameBuffer.h:28