DI-Guy SDK Documentation  13.7.1
diguyGraphicsFrameBuffer.h
Go to the documentation of this file.
1 /*********************************************************************
2  ** Copyright (c) 2022 MAK Technologies, Inc.
3  ** All rights reserved.
4  *********************************************************************/
5 
6  /*********************************************************************/
12 #pragma once
13 
14 #include <declspec_diguy.h>
15 
16 /****************************************************************************/
27 class BDI_DECLSPEC_diguy diguyGraphicsFrameBuffer
28 {
29 public:
30 
32  : m_width( -1 )
33  , m_height( -1)
34  , m_shadow_map( 0 )
35  , m_enable_mipmaps( 0 )
36  , m_texture_unit( 1 )
37  {
38  }
39 
40  virtual ~diguyGraphicsFrameBuffer() {}
41 
42  virtual int resize( int width, int height )
43  {
44  m_width = width;
45  m_height = height;
46  return 0;
47  }
48 
49  virtual void set_shadow_map( int shadow_map ) { m_shadow_map = shadow_map; }
50  virtual void set_enable_mipmaps( int enable_mipmaps ) { m_enable_mipmaps = enable_mipmaps; }
51  virtual void set_texture_unit( int texture_unit ) { m_texture_unit = texture_unit; }
52 
53  int get_width() { return m_width; }
54  int get_height() { return m_height; }
55 
56 /*****************************************************************************/
68  virtual void bind() = 0;
71  virtual void clear() = 0;
73  virtual void unbind() = 0;
74 
75  unsigned int virtual get_texture_id() = 0;
76  unsigned int virtual get_frame_buffer_id() = 0;
77  unsigned int virtual get_depth_texture_id() = 0;
78 
79 
80 protected:
81 
82  int m_width;
83  int m_height;
84  int m_shadow_map;
85  int m_enable_mipmaps;
86  int m_texture_unit;
87 
88 };
A class that represents a frame buffer, this is used by the graphics api to enable shadow maps in pro...
Definition: diguyGraphicsFrameBuffer.h:26