Visualization Library 2.0.0

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | Protected Attributes | List of all members
vl::Texture::SetupParams Class Reference

SetupParams wraps all the parameters needed to crate a Texture. More...

#include <Texture.hpp>

+ Inheritance diagram for vl::Texture::SetupParams:

Public Member Functions

 SetupParams ()
 
void setImagePath (const String &path)
 
const StringimagePath () const
 
void setImage (const Image *image)
 
const Imageimage () const
 
const BufferObjectbufferObject () const
 
BufferObjectbufferObject ()
 
void setBufferObject (BufferObject *bo)
 
void setDimension (ETextureDimension dimension)
 
ETextureDimension dimension () const
 
void setFormat (ETextureFormat format)
 
ETextureFormat format () const
 
void setBorder (bool on)
 
bool border () const
 
void setGenMipmaps (bool on)
 
bool genMipmaps () const
 
void setWidth (int w)
 
int width () const
 
void setHeight (int h)
 
int height () const
 
void setDepth (int d)
 
int depth () const
 
int samples () const
 
void setSamples (int samples)
 
bool fixedSamplesLocations () const
 
void setFixedSamplesLocations (bool fixed)
 
- Public Member Functions inherited from vl::Object
 Object ()
 Constructor. More...
 
 Object (const Object &other)
 Copy constructor: copies the name, ref count mutex and user data. More...
 
Objectoperator= (const Object &other)
 Copy operator: copies the object's name, ref count mutex and user data. More...
 
const std::string & objectName () const
 The name of the object, by default set to the object's class name. More...
 
void setObjectName (const char *name)
 The name of the object, by default set to the object's class name in debug builds. More...
 
void setObjectName (const std::string &name)
 The name of the object, by default set to the object's class name in debug builds. More...
 
void setRefCountMutex (IMutex *mutex)
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
IMutexrefCountMutex ()
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
const IMutexrefCountMutex () const
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
int referenceCount () const
 Returns the number of references of an object. More...
 
void incReference () const
 Increments the reference count of an object. More...
 
void decReference ()
 Decrements the reference count of an object and deletes it if both automaticDelete() is true the count reaches 0. More...
 
void setAutomaticDelete (bool autodel_on)
 If set to true the Object is deleted when its reference count reaches 0. More...
 
bool automaticDelete () const
 If set to true the Object is deleted when its reference count reaches 0. More...
 
template<class T >
T * as ()
 Casts an Object to the specified class. More...
 
template<class T >
const T * as () const
 Casts an Object to the specified class. More...
 

Protected Attributes

String mImagePath
 
ref< BufferObjectmBufferObject
 
ref< ImagemImage
 
ETextureDimension mDimension
 
ETextureFormat mFormat
 
int mWidth
 
int mHeight
 
int mDepth
 
int mSamples
 
bool mBorder
 
bool mGenMipmaps
 
bool mFixedSamplesLocation
 
- Protected Attributes inherited from vl::Object
std::string mObjectName
 
IMutexmRefCountMutex
 
int mReferenceCount
 
bool mAutomaticDelete
 

Additional Inherited Members

- Protected Member Functions inherited from vl::Object
virtual ~Object ()
 

Detailed Description

SetupParams wraps all the parameters needed to crate a Texture.

A SetupParams object is automatically setup and bound to a Texture after calling prepareTexture2D() and similar functions. Once the SetupParams are bound to a Texture calling Texture::createTexture() will create a new Texture according to what specified in the SetupParams objects. After Texture::createTexture() the SetupParams object is kept but eventual Image and BufferObjects will be released. If an Image was used it's filePath() is assigned to SetupParam::imagePath().

Definition at line 154 of file Texture.hpp.

Constructor & Destructor Documentation

◆ SetupParams()

vl::Texture::SetupParams::SetupParams ( )
inline

Definition at line 157 of file Texture.hpp.

References vl::TD_TEXTURE_2D, and vl::TF_RGBA.

Member Function Documentation

◆ border()

bool vl::Texture::SetupParams::border ( ) const
inline

Definition at line 185 of file Texture.hpp.

Referenced by vl::Texture::createTexture().

◆ bufferObject() [1/2]

const BufferObject* vl::Texture::SetupParams::bufferObject ( ) const
inline

Definition at line 174 of file Texture.hpp.

Referenced by vlX::VLXClassWrapper_Texture::exportTexture().

◆ bufferObject() [2/2]

BufferObject* vl::Texture::SetupParams::bufferObject ( )
inline

Definition at line 175 of file Texture.hpp.

◆ depth()

int vl::Texture::SetupParams::depth ( ) const
inline

◆ dimension()

ETextureDimension vl::Texture::SetupParams::dimension ( ) const
inline

◆ fixedSamplesLocations()

bool vl::Texture::SetupParams::fixedSamplesLocations ( ) const
inline

Definition at line 202 of file Texture.hpp.

Referenced by vlX::VLXClassWrapper_Texture::exportTexture().

◆ format()

ETextureFormat vl::Texture::SetupParams::format ( ) const
inline

◆ genMipmaps()

bool vl::Texture::SetupParams::genMipmaps ( ) const
inline

◆ height()

int vl::Texture::SetupParams::height ( ) const
inline

◆ image()

const Image* vl::Texture::SetupParams::image ( ) const
inline

◆ imagePath()

const String& vl::Texture::SetupParams::imagePath ( ) const
inline

Definition at line 169 of file Texture.hpp.

Referenced by vlX::VLXClassWrapper_Texture::exportTexture().

◆ samples()

int vl::Texture::SetupParams::samples ( ) const
inline

Definition at line 199 of file Texture.hpp.

Referenced by vlX::VLXClassWrapper_Texture::exportTexture().

◆ setBorder()

void vl::Texture::SetupParams::setBorder ( bool  on)
inline

Definition at line 184 of file Texture.hpp.

◆ setBufferObject()

void vl::Texture::SetupParams::setBufferObject ( BufferObject bo)
inline

Definition at line 176 of file Texture.hpp.

Referenced by vlX::VLXClassWrapper_Texture::importTexture().

◆ setDepth()

void vl::Texture::SetupParams::setDepth ( int  d)
inline

Definition at line 196 of file Texture.hpp.

Referenced by vlX::VLXClassWrapper_Texture::importTexture().

◆ setDimension()

void vl::Texture::SetupParams::setDimension ( ETextureDimension  dimension)
inline

◆ setFixedSamplesLocations()

void vl::Texture::SetupParams::setFixedSamplesLocations ( bool  fixed)
inline

Definition at line 203 of file Texture.hpp.

Referenced by vlX::VLXClassWrapper_Texture::importTexture().

◆ setFormat()

void vl::Texture::SetupParams::setFormat ( ETextureFormat  format)
inline

Definition at line 181 of file Texture.hpp.

Referenced by vlX::VLXClassWrapper_Texture::importTexture().

◆ setGenMipmaps()

void vl::Texture::SetupParams::setGenMipmaps ( bool  on)
inline

Definition at line 187 of file Texture.hpp.

Referenced by vlX::VLXClassWrapper_Texture::importTexture().

◆ setHeight()

void vl::Texture::SetupParams::setHeight ( int  h)
inline

Definition at line 193 of file Texture.hpp.

Referenced by vlX::VLXClassWrapper_Texture::importTexture().

◆ setImage()

void vl::Texture::SetupParams::setImage ( const Image image)
inline

◆ setImagePath()

void vl::Texture::SetupParams::setImagePath ( const String path)
inline

Definition at line 168 of file Texture.hpp.

Referenced by vlX::VLXClassWrapper_Texture::importTexture().

◆ setSamples()

void vl::Texture::SetupParams::setSamples ( int  samples)
inline

Definition at line 200 of file Texture.hpp.

Referenced by vlX::VLXClassWrapper_Texture::importTexture().

◆ setWidth()

void vl::Texture::SetupParams::setWidth ( int  w)
inline

Definition at line 190 of file Texture.hpp.

Referenced by vlX::VLXClassWrapper_Texture::importTexture().

◆ width()

int vl::Texture::SetupParams::width ( ) const
inline

Member Data Documentation

◆ mBorder

bool vl::Texture::SetupParams::mBorder
protected

Definition at line 213 of file Texture.hpp.

◆ mBufferObject

ref<BufferObject> vl::Texture::SetupParams::mBufferObject
protected

Definition at line 207 of file Texture.hpp.

◆ mDepth

int vl::Texture::SetupParams::mDepth
protected

Definition at line 211 of file Texture.hpp.

◆ mDimension

ETextureDimension vl::Texture::SetupParams::mDimension
protected

Definition at line 209 of file Texture.hpp.

◆ mFixedSamplesLocation

bool vl::Texture::SetupParams::mFixedSamplesLocation
protected

Definition at line 215 of file Texture.hpp.

◆ mFormat

ETextureFormat vl::Texture::SetupParams::mFormat
protected

Definition at line 210 of file Texture.hpp.

◆ mGenMipmaps

bool vl::Texture::SetupParams::mGenMipmaps
protected

Definition at line 214 of file Texture.hpp.

◆ mHeight

int vl::Texture::SetupParams::mHeight
protected

Definition at line 211 of file Texture.hpp.

◆ mImage

ref<Image> vl::Texture::SetupParams::mImage
protected

Definition at line 208 of file Texture.hpp.

◆ mImagePath

String vl::Texture::SetupParams::mImagePath
protected

Definition at line 206 of file Texture.hpp.

◆ mSamples

int vl::Texture::SetupParams::mSamples
protected

Definition at line 212 of file Texture.hpp.

◆ mWidth

int vl::Texture::SetupParams::mWidth
protected

Definition at line 211 of file Texture.hpp.


The documentation for this class was generated from the following file: