VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtGLRenderToTexture.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2017 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 #pragma once
6 
8 
10 #include "DtDataFormat.h"
11 
12 #include <vector>
13 #include <string>
14 
15 namespace makVrv
16 {
18  {
19  public:
20  DtGLRenderTexture(int width, int height, GLenum internalFormat, bool hasDepth);
21  virtual ~DtGLRenderTexture();
22 
23  void activateForDrawingInto(void);
24  void deactivateForDrawingInto(void);
25 
26  void bindColorTexture(int unit);
27  void unbindColorTexture(int unit);
28 
29  int getWidth(void) const;
30  int getHeight(void) const;
31  private:
32  unsigned myColorTextureID;
34 
35  unsigned myFBOID;
36 
37  void initColorTexture();
38  void initDepthBufferTexture();
39  void initFBO();
40 
41  int myWidth;
42  int myHeight;
43 
44  bool myHasDepth;
45 
46  bool myIsValid;
48  };
49 
51  {
52  public:
54  virtual ~DtGLScreenQuad();
55 
56  void draw();
57 
58  private:
59  unsigned vbo;
60  unsigned vao;
61  };
62 
64  {
70  };
71 
73  {
74  public:
75  DtGLShader(const std::string& source, DtGLShaderType type);
76  ~DtGLShader();
77  bool isValid(void) const;
78  unsigned id(void) const;
79  private:
80  unsigned myShaderID;
81  bool myIsValid;
82  };
83 
84  typedef std::vector<DtGLShader*> VectorShaders;
85 
87  {
88  public:
89  DtGLProgram(const VectorShaders& shaders);
90  ~DtGLProgram();
91  void bind(void);
92  void unbind(void);
93  bool isValid(void) const;
94 
95  private:
96  unsigned myProgramID;
97  bool myIsValid;
99  };
100 }
101 

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)