HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RE_TextureCubeMap.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: Render Library (C++)
7  *
8  * COMMENTS:
9  * Handle to a cube texture map stored in the texture cache. This class is
10  * primarily responsible for fetching images from various 2D sources and
11  * creating the texture for them.
12  */
13 
14 #ifndef __RE_TextureCubeMap_h__
15 #define __RE_TextureCubeMap_h__
16 
17 #include "RE_API.h"
18 #include "RE_TextureMap.h"
19 
20 class IMG_File;
21 
23 {
24 public:
26  virtual ~RE_TextureCubeMap();
27 
28  /// Returns the amount of main memory (NOT graphics memory!)
29  /// owned by this RE_TextureCubeMap.
30  virtual int64 getMemoryUsage(bool inclusive) const;
31 
33  virtual RE_TextureMap *clone() const;
34 
35  // Public interface is in RE_TextureMap
36 private:
37  virtual bool buildTexture(RE_Render *r, RE_Texture *tex, void *data);
38  virtual bool getNodeSource(const char *map, const char *rel,
39  void **mapptr,
40  RE_TextureDimension &textype,
41  RE_GPUType &datatype,
42  int &vectorsize,
43  int &w, int &h, int &d);
44  virtual bool getFileSource(const char *map,
45  void **mapptr,
46  RE_TextureDimension &textype,
47  RE_GPUType &datatype,
48  int &vectorsize,
49  int &w, int &h, int &d);
50  virtual void buildTextureName(UT_String &,
51  const char *map, const char *rel);
52 
53  bool loadCubeMap(IMG_File *fp, int w, int h,
54  RE_GPUType dt, int vs, void **mapptr);
55  bool loadSphereMap(IMG_File *fp,int w, int h, int sw, int sh,
56  RE_GPUType dt, int vs, void **mapptr);
57 
58  float myOpTime;
59 };
60 
61 #endif
virtual RE_TextureDimension getMapType()
virtual RE_TextureMap * clone() const =0
#define RE_API
Definition: RE_API.h:10
virtual bool getFileSource(const char *map, void **mapptr, RE_TextureDimension &textype, RE_GPUType &datatype, int &vectorsize, int &w, int &h, int &d)
virtual bool getNodeSource(const char *map, const char *rel, void **mapptr, RE_TextureDimension &textype, RE_GPUType &datatype, int &vectorsize, int &w, int &h, int &d)
RE_TextureDimension
long long int64
Definition: SYS_Types.h:106
RE_GPUType
Definition: RE_Types.h:42
png_FILE_p fp
Definition: png.h:2028
virtual void buildTextureName(UT_String &cachedname, const char *map, const char *rel)
virtual int64 getMemoryUsage(bool inclusive) const
Generic interface for reading and writing image files. This class handles the reading and writing of ...
Definition: IMG_File.h:54
GLboolean * data
Definition: glcorearb.h:130
GLfloat GLfloat GLfloat GLfloat h
Definition: glcorearb.h:2001
GLubyte GLubyte GLubyte GLubyte w
Definition: glcorearb.h:856
GLboolean r
Definition: glcorearb.h:1221
virtual bool buildTexture(RE_Render *r, RE_Texture *tex, void *data)=0