HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RE_ReflectMap.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: RE_ReflectMap.h ( RE Library, C++)
7  *
8  * COMMENTS:
9  * Contains a cube texture map and the code for generating a reflection
10  * map from an object.
11  */
12 #ifndef RE_ReflectMap_h
13 #define RE_ReflectMap_h
14 
15 class RE_Render;
16 class RE_OGLTexture;
17 class RE_OGLFramebuffer;
18 class RE_TextureCubeMap;
19 
20 #include <UT/UT_String.h>
21 #include <UT/UT_Vector3.h>
22 
23 #include "RE_Types.h"
24 #include "RE_TextureTypes.h"
25 
27 {
28 public:
29  RE_ReflectMap(const char *name);
30  ~RE_ReflectMap();
31 
32  void setResolution(int size);
33  void setHDR(bool enable);
34  void setOrigin(UT_Vector3F org);
35  void setMipmap(bool enable);
36 
37  UT_Vector3F getOrigin() const { return myOrigin; }
38 
39  bool isDirty() const { return myChanged; }
40 
41  bool prepRender(RE_Render *r,
43  void doneRender(RE_Render *r);
44 
45  RE_OGLTexture *getReflectMap() const { return myColorTex; }
46 
47  void setVersion(int64 version) { myVersion = version; }
48  int64 getVersion() const { return myVersion; }
49 
50  void setFrameTime(fpreal t) { myTime = t; }
51  fpreal getFrameTime() const { return myTime; }
52 
53  bool createFBO(RE_Render *r);
54 
55 private:
56  void resetFBO();
57  static bool shTexDeleted(RE_OGLTexture *tex, void *rmapobj);
58 
59  UT_String myName;
60  int myRes;
61  bool myHDR;
62  UT_Vector3F myOrigin;
63 
64  RE_OGLFramebuffer *myFBO;
65  RE_OGLTexture *myColorTex;
66 
67  RE_TextureCubeMap *myCubeMap;
68 
69  bool myRenderFlag;
70  bool myChanged;
71  bool myMipmap;
72  int64 myVersion;
73  fpreal myTime;
74 };
75 #endif
RE_TextureCubeFace
#define RE_API
Definition: RE_API.h:10
void setFrameTime(fpreal t)
Definition: RE_ReflectMap.h:50
UT_Vector3F getOrigin() const
Definition: RE_ReflectMap.h:37
GLsizeiptr size
Definition: glcorearb.h:663
int64 getVersion() const
Definition: RE_ReflectMap.h:48
long long int64
Definition: SYS_Types.h:107
RE_OGLTexture * getReflectMap() const
Definition: RE_ReflectMap.h:45
void setVersion(int64 version)
Definition: RE_ReflectMap.h:47
GLuint const GLchar * name
Definition: glcorearb.h:785
GT_API const UT_StringHolder version
double fpreal
Definition: SYS_Types.h:270
bool isDirty() const
Definition: RE_ReflectMap.h:39
GLboolean r
Definition: glcorearb.h:1221
fpreal getFrameTime() const
Definition: RE_ReflectMap.h:51