HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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  ~RE_TextureCubeMap() override;
27 
28  /// Returns the amount of main memory (NOT graphics memory!)
29  /// owned by this RE_TextureCubeMap.
30  int64 getMemoryUsage(bool inclusive) const override;
31 
33  RE_TextureMap *clone() const override;
34 
35  // Public interface is in RE_TextureMap
36 private:
37  bool buildTexture(RE_Render *r, RE_Texture *tex,
38  void *data) override;
39  bool getNodeSource(const char *map, const char *rel,
40  void **mapptr,
41  RE_TextureDimension &textype,
42  RE_GPUType &datatype,
43  int &vectorsize,
44  int &w, int &h, int &d) override;
45  bool getFileSource(const char *map,
46  void **mapptr,
47  RE_TextureDimension &textype,
48  RE_GPUType &datatype,
49  int &vectorsize,
50  int &w, int &h, int &d,
51  bool preload) override;
52  void buildTextureName(UT_String &, const char *map,
53  const char *rel) override;
54 
55  bool loadCubeMap(IMG_File *fp, int w, int h,
56  RE_GPUType dt, int vs, void **mapptr);
57  bool loadSphereMap(IMG_File *fp,int w, int h, int sw, int sh,
58  RE_GPUType dt, int vs, void **mapptr);
59 
60  float myOpTime;
61 };
62 
63 #endif
virtual RE_TextureMap * clone() const =0
#define RE_API
Definition: RE_API.h:10
RE_TextureDimension getMapType() override
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
RE_GPUType
Definition: RE_Types.h:44
GLint GLenum GLsizei GLint GLsizei const void * data
Definition: glew.h:1379
GLubyte GLubyte GLubyte GLubyte w
Definition: glew.h:1890
long long int64
Definition: SYS_Types.h:116
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:55
GLfloat GLfloat GLfloat GLfloat h
Definition: glew.h:8011
virtual bool getFileSource(const char *map, void **mapptr, RE_TextureDimension &textype, RE_GPUType &datatype, int &vectorsize, int &w, int &h, int &d, bool preload_only)
GLdouble GLdouble GLdouble r
Definition: glew.h:1406
virtual bool buildTexture(RE_Render *r, RE_Texture *tex, void *data)=0