reference

This documentation is automatically generated from the openFrameworks source code using doxygen and refers to the most recent release, version 0.12.0.

#include <ofCubeMap.h>

Classes

class  Data
 
struct  ofCubeMapSettings
 

Public Member Functions

 ofCubeMap ()
 
 ofCubeMap (const ofCubeMap &mom)
 
 ofCubeMap (ofCubeMap &&mom)
 
 ~ofCubeMap ()
 
bool load (const of::filesystem::path &apath, int aFaceResolution, bool aBFlipY=true)
 
bool load (const of::filesystem::path &apath, int aFaceResolution, bool aBFlipY, int aIrradianceRes, int aPreFilterRes)
 
bool load (ofCubeMapSettings aSettings)
 
ofCubeMapoperator= (const ofCubeMap &mom)
 Copy a given ofCubeMap into this cube map.
 
ofCubeMapoperator= (ofCubeMap &&mom)
 
void clear ()
 
void draw ()
 
void drawCubeMap ()
 
void drawIrradiance ()
 
void drawPrefilteredCube (float aRoughness)
 
bool isEnabled ()
 
const bool isEnabled () const
 
void setEnabled (bool ab)
 
bool hasCubeMap ()
 
bool hasPrefilteredMap ()
 
bool hasIrradianceMap ()
 
int getFaceResolution ()
 
GLuint getTextureId ()
 
bool isHdr ()
 
void setExposure (float aExposure)
 
float getExposure ()
 
void setUseBrdfLutTexture (bool ab)
 
bool isUsingLutBrdfTexture ()
 
GLuint getIrradianceMapId ()
 
GLuint getPrefilterMapId ()
 

Static Public Member Functions

static GLenum getTextureTarget ()
 
static bool hasActiveCubeMap ()
 
static std::shared_ptr< ofCubeMap::DatagetActiveData ()
 
static void clearTextureData (std::shared_ptr< ofCubeMap::Data > adata)
 
static void regenerateAllTextures ()
 
static const ofTexturegetBrdfLutTexture ()
 

Protected Member Functions

void _drawCubeStart (GLuint aCubeMapId)
 
void _drawCubeEnd ()
 
void _checkSetup ()
 
void _createCubeMap (ofTexture &aSrcTex)
 
GLuint _createFloatCubeMap (ofTexture &aSrcTex, int aSrcRes)
 
void _equiRectToCubeMap (GLuint &aCubeTexId, ofTexture &aSrcTex, int aSrcRes, bool aBConvertToNonFloat)
 
void _createIrradianceMap (GLuint aSrcCubeFid, bool aBMakeCache, const of::filesystem::path &aCachePath)
 
bool _loadIrradianceMap (const of::filesystem::path &aCachePath)
 
void _createPrefilteredCubeMap (GLuint aSrcCubeFid, int aSrcRes, bool aBMakeCache, const of::filesystem::path &aCachePath)
 
bool _loadPrefilterMap (const of::filesystem::path &aCachePath)
 
void _configureCubeTextures (GLuint aCubeMapId, bool abLinearMipLinear)
 
void _initEmptyTextures (GLuint aCubeMapId, int aSize)
 
void _initEmptyTextures (GLuint aCubeMapId, GLuint aInternalFormat, int aSize, int aNumMipMaps)
 
void _allocateCubeMesh ()
 
std::vector< glm::mat4 > _getViewMatrices (const glm::vec3 &apos)
 
bool _loadRenderShader ()
 
bool _loadEquiRectToCubeMapShader ()
 
GLuint getTexStorageFormat ()
 
GLuint getTexStorageFormat (GLuint aInternalFormat)
 
GLuint getGlTypeFromInternalFormat ()
 
GLuint getGlTypeFromInternalFormat (GLuint aInternalFormat)
 
int getNumPixelChannels ()
 

Static Protected Member Functions

static void _createBrdfLUT ()
 

Protected Attributes

std::shared_ptr< ofCubeMap::Datadata
 
GLuint texFormat = GL_RGB
 
glm::mat4 projectionMat
 
ofShader shaderEquiRectToCubeMap
 
ofShader shaderRender
 
ofShader shaderIrradianceMap
 
ofShader shaderPreFilterMap
 

Static Protected Attributes

static ofTexture sBrdfLutTex
 
static ofVboMesh sCubeMesh
 
static ofShader shaderBrdfLUT
 

Constructor & Destructor Documentation

◆ ofCubeMap() [1/3]

ofCubeMap::ofCubeMap ( )

◆ ofCubeMap() [2/3]

ofCubeMap::ofCubeMap ( const ofCubeMap mom)

◆ ofCubeMap() [3/3]

ofCubeMap::ofCubeMap ( ofCubeMap &&  mom)

◆ ~ofCubeMap()

ofCubeMap::~ofCubeMap ( )

Member Function Documentation

◆ _allocateCubeMesh()

void ofCubeMap::_allocateCubeMesh ( )
protected

◆ _checkSetup()

void ofCubeMap::_checkSetup ( )
protected

◆ _configureCubeTextures()

void ofCubeMap::_configureCubeTextures ( GLuint  aCubeMapId,
bool  abLinearMipLinear 
)
protected

◆ _createBrdfLUT()

void ofCubeMap::_createBrdfLUT ( )
staticprotected

◆ _createCubeMap()

void ofCubeMap::_createCubeMap ( ofTexture aSrcTex)
protected

◆ _createFloatCubeMap()

GLuint ofCubeMap::_createFloatCubeMap ( ofTexture aSrcTex,
int  aSrcRes 
)
protected

◆ _createIrradianceMap()

void ofCubeMap::_createIrradianceMap ( GLuint  aSrcCubeFid,
bool  aBMakeCache,
const of::filesystem::path &  aCachePath 
)
protected

◆ _createPrefilteredCubeMap()

void ofCubeMap::_createPrefilteredCubeMap ( GLuint  aSrcCubeFid,
int  aSrcRes,
bool  aBMakeCache,
const of::filesystem::path &  aCachePath 
)
protected

◆ _drawCubeEnd()

void ofCubeMap::_drawCubeEnd ( )
protected

◆ _drawCubeStart()

void ofCubeMap::_drawCubeStart ( GLuint  aCubeMapId)
protected

◆ _equiRectToCubeMap()

void ofCubeMap::_equiRectToCubeMap ( GLuint &  aCubeTexId,
ofTexture aSrcTex,
int  aSrcRes,
bool  aBConvertToNonFloat 
)
protected

◆ _getViewMatrices()

std::vector< glm::mat4 > ofCubeMap::_getViewMatrices ( const glm::vec3 &  apos)
protected

◆ _initEmptyTextures() [1/2]

void ofCubeMap::_initEmptyTextures ( GLuint  aCubeMapId,
GLuint  aInternalFormat,
int  aSize,
int  aNumMipMaps 
)
protected

◆ _initEmptyTextures() [2/2]

void ofCubeMap::_initEmptyTextures ( GLuint  aCubeMapId,
int  aSize 
)
protected

◆ _loadEquiRectToCubeMapShader()

bool ofCubeMap::_loadEquiRectToCubeMapShader ( )
protected

◆ _loadIrradianceMap()

bool ofCubeMap::_loadIrradianceMap ( const of::filesystem::path &  aCachePath)
protected

◆ _loadPrefilterMap()

bool ofCubeMap::_loadPrefilterMap ( const of::filesystem::path &  aCachePath)
protected

◆ _loadRenderShader()

bool ofCubeMap::_loadRenderShader ( )
protected

◆ clear()

void ofCubeMap::clear ( )

◆ clearTextureData()

void ofCubeMap::clearTextureData ( std::shared_ptr< ofCubeMap::Data adata)
static

◆ draw()

void ofCubeMap::draw ( )

◆ drawCubeMap()

void ofCubeMap::drawCubeMap ( )

◆ drawIrradiance()

void ofCubeMap::drawIrradiance ( )

◆ drawPrefilteredCube()

void ofCubeMap::drawPrefilteredCube ( float  aRoughness)

◆ getActiveData()

std::shared_ptr< ofCubeMap::Data > ofCubeMap::getActiveData ( )
static

◆ getBrdfLutTexture()

const ofTexture & ofCubeMap::getBrdfLutTexture ( )
static

◆ getExposure()

float ofCubeMap::getExposure ( )
inline

◆ getFaceResolution()

int ofCubeMap::getFaceResolution ( )
inline

◆ getGlTypeFromInternalFormat() [1/2]

GLuint ofCubeMap::getGlTypeFromInternalFormat ( )
protected

◆ getGlTypeFromInternalFormat() [2/2]

GLuint ofCubeMap::getGlTypeFromInternalFormat ( GLuint  aInternalFormat)
protected

◆ getIrradianceMapId()

GLuint ofCubeMap::getIrradianceMapId ( )
inline

◆ getNumPixelChannels()

int ofCubeMap::getNumPixelChannels ( )
protected

◆ getPrefilterMapId()

GLuint ofCubeMap::getPrefilterMapId ( )
inline

◆ getTexStorageFormat() [1/2]

GLuint ofCubeMap::getTexStorageFormat ( )
protected

◆ getTexStorageFormat() [2/2]

GLuint ofCubeMap::getTexStorageFormat ( GLuint  aInternalFormat)
protected

◆ getTextureId()

GLuint ofCubeMap::getTextureId ( )

◆ getTextureTarget()

GLenum ofCubeMap::getTextureTarget ( )
static

◆ hasActiveCubeMap()

bool ofCubeMap::hasActiveCubeMap ( )
static

◆ hasCubeMap()

bool ofCubeMap::hasCubeMap ( )

◆ hasIrradianceMap()

bool ofCubeMap::hasIrradianceMap ( )

◆ hasPrefilteredMap()

bool ofCubeMap::hasPrefilteredMap ( )

◆ isEnabled() [1/2]

bool ofCubeMap::isEnabled ( )
inline

◆ isEnabled() [2/2]

const bool ofCubeMap::isEnabled ( ) const
inline

◆ isHdr()

bool ofCubeMap::isHdr ( )

◆ isUsingLutBrdfTexture()

bool ofCubeMap::isUsingLutBrdfTexture ( )
inline

◆ load() [1/3]

bool ofCubeMap::load ( const of::filesystem::path &  apath,
int  aFaceResolution,
bool  aBFlipY,
int  aIrradianceRes,
int  aPreFilterRes 
)

\load an image and convert to cube map.

Parameters
apathpath to the image to load.
aFaceResolutionresolution of the cube map image sides.
aBFlipYflip the images upside down.
aIrradianceResresolution of the irradiance map. (default is 32).
aPreFilterResresolution of the prefiltered map. (default is 128).

◆ load() [2/3]

bool ofCubeMap::load ( const of::filesystem::path &  apath,
int  aFaceResolution,
bool  aBFlipY = true 
)

\load an image and convert to cube map.

Parameters
apathpath to the image to load.
aFaceResolutionresolution of the cube map image sides.
aBFlipYflip the images upside down.

◆ load() [3/3]

bool ofCubeMap::load ( ofCubeMapSettings  aSettings)

◆ operator=() [1/2]

ofCubeMap & ofCubeMap::operator= ( const ofCubeMap mom)

Copy a given ofCubeMap into this cube map.

ofCubeMap

Parameters
momThe ofCubeMap to copy from. Reuses internal GL texture IDs.

◆ operator=() [2/2]

ofCubeMap & ofCubeMap::operator= ( ofCubeMap &&  mom)

◆ regenerateAllTextures()

static void ofCubeMap::regenerateAllTextures ( )
static

◆ setEnabled()

void ofCubeMap::setEnabled ( bool  ab)
inline

◆ setExposure()

void ofCubeMap::setExposure ( float  aExposure)

◆ setUseBrdfLutTexture()

void ofCubeMap::setUseBrdfLutTexture ( bool  ab)

Member Data Documentation

◆ data

std::shared_ptr<ofCubeMap::Data> ofCubeMap::data
protected

◆ projectionMat

glm::mat4 ofCubeMap::projectionMat
protected

◆ sBrdfLutTex

ofTexture ofCubeMap::sBrdfLutTex
staticprotected

◆ sCubeMesh

ofVboMesh ofCubeMap::sCubeMesh
staticprotected

◆ shaderBrdfLUT

ofShader ofCubeMap::shaderBrdfLUT
staticprotected

◆ shaderEquiRectToCubeMap

ofShader ofCubeMap::shaderEquiRectToCubeMap
protected

◆ shaderIrradianceMap

ofShader ofCubeMap::shaderIrradianceMap
protected

◆ shaderPreFilterMap

ofShader ofCubeMap::shaderPreFilterMap
protected

◆ shaderRender

ofShader ofCubeMap::shaderRender
protected

◆ texFormat

GLuint ofCubeMap::texFormat = GL_RGB
protected

The documentation for this class was generated from the following files:
  • /Users/icq4ever/Desktop/oF0120/libs/openFrameworks/gl/ofCubeMap.h
  • /Users/icq4ever/Desktop/oF0120/libs/openFrameworks/gl/ofCubeMap.cpp