summaryrefslogtreecommitdiff
path: root/indra/llrender/llcubemap.h
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-05-04 16:07:50 +0000
committerDave Parks <davep@lindenlab.com>2022-05-04 16:07:50 +0000
commit93260cfeff2382dd1ffeecaef208d37bf21c2a01 (patch)
treea51461dd9f27c27931e2feb288920f7feff71480 /indra/llrender/llcubemap.h
parent82311e4b44a863078fb1f47d56e9543abaae210c (diff)
SL-17283 LLReflectionMapManager prototype. Remove snapshot code related overhead from reflection map renders. Add parallax correction and support for multiple reflection maps.
Diffstat (limited to 'indra/llrender/llcubemap.h')
-rw-r--r--indra/llrender/llcubemap.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/indra/llrender/llcubemap.h b/indra/llrender/llcubemap.h
index 9ce4a94bca..b9e081cea3 100644
--- a/indra/llrender/llcubemap.h
+++ b/indra/llrender/llcubemap.h
@@ -41,11 +41,15 @@ public:
LLCubeMap(bool init_as_srgb);
void init(const std::vector<LLPointer<LLImageRaw> >& rawimages);
+ // initialize as an undefined cubemap at the given resolution
+ // used for render-to-cubemap operations
+ // avoids usage of LLImageRaw
+ void initReflectionMap(U32 resolution, U32 components = 3);
+
// init from environment map images
// Similar to init, but takes ownership of rawimages and makes this cubemap
// respect the resolution of rawimages
// Raw images must point to array of six square images that are all the same resolution
- // For example usage, see LLEnvironmentMap
void initEnvironmentMap(const std::vector<LLPointer<LLImageRaw> >& rawimages);
void initGL();
void initRawData(const std::vector<LLPointer<LLImageRaw> >& rawimages);
@@ -62,6 +66,12 @@ public:
void setMatrix(S32 stage);
void restoreMatrix();
+ U32 getResolution() { return mImages[0].notNull() ? mImages[0]->getWidth(0) : 0; }
+
+ // generate mip maps for this Cube Map using GL
+ // NOTE: Cube Map MUST already be resident in VRAM
+ void generateMipMaps();
+
GLuint getGLName();
void destroyGL();