LibreOffice Module vcl (master)  1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
PackedTextureAtlasManager Class Referencefinal

Pack textures into one texture atlas. More...

#include <PackedTextureAtlas.hxx>

Public Member Functions

 PackedTextureAtlasManager (int nTextureWidth, int nTextureHeight)
 nTextureWidth and nTextureHeight are the dimensions of the common texture(s) nTextureLimit is the maximum limit of that a texture atlas can have (0 or less - unlimited) More...
 
 ~PackedTextureAtlasManager ()
 
OpenGLTexture InsertBuffer (int nWidth, int nHeight, int nFormat, int nType, sal_uInt8 const *pData)
 
OpenGLTexture Reserve (int nWidth, int nHeight)
 
std::vector< GLuint > ReduceTextureNumber (int nMaxNumberOfTextures)
 

Private Member Functions

void CreateNewTexture ()
 
 PackedTextureAtlasManager (const PackedTextureAtlasManager &)=delete
 
PackedTextureAtlasManageroperator= (const PackedTextureAtlasManager &)=delete
 

Private Attributes

std::vector< std::unique_ptr< PackedTexture > > maPackedTextures
 
int const mnTextureWidth
 
int const mnTextureHeight
 

Detailed Description

Pack textures into one texture atlas.

This is based on algorithm described in 1 and is an adaptation of "texture atlas generator" from 2.

Definition at line 29 of file PackedTextureAtlas.hxx.

Constructor & Destructor Documentation

PackedTextureAtlasManager::PackedTextureAtlasManager ( const PackedTextureAtlasManager )
privatedelete
PackedTextureAtlasManager::PackedTextureAtlasManager ( int  nTextureWidth,
int  nTextureHeight 
)

nTextureWidth and nTextureHeight are the dimensions of the common texture(s) nTextureLimit is the maximum limit of that a texture atlas can have (0 or less - unlimited)

PackedTextureAtlasManager::~PackedTextureAtlasManager ( )

Member Function Documentation

void PackedTextureAtlasManager::CreateNewTexture ( )
private
OpenGLTexture PackedTextureAtlasManager::InsertBuffer ( int  nWidth,
int  nHeight,
int  nFormat,
int  nType,
sal_uInt8 const *  pData 
)
PackedTextureAtlasManager& PackedTextureAtlasManager::operator= ( const PackedTextureAtlasManager )
privatedelete
std::vector<GLuint> PackedTextureAtlasManager::ReduceTextureNumber ( int  nMaxNumberOfTextures)
OpenGLTexture PackedTextureAtlasManager::Reserve ( int  nWidth,
int  nHeight 
)

Member Data Documentation

std::vector<std::unique_ptr<PackedTexture> > PackedTextureAtlasManager::maPackedTextures
private

Definition at line 31 of file PackedTextureAtlas.hxx.

int const PackedTextureAtlasManager::mnTextureHeight
private

Definition at line 34 of file PackedTextureAtlas.hxx.

int const PackedTextureAtlasManager::mnTextureWidth
private

Definition at line 33 of file PackedTextureAtlas.hxx.


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