gKitGL
SamplerManager.h
00001 
00002 #ifndef _GKSAMPLER_MANAGER_H
00003 #define _GKSAMPLER_MANAGER_H
00004 
00005 #include "GLManager.h"
00006 #include "GL/GLPlatform.h"
00007 #include "GL/TPSampler.h"
00008 
00009 
00010 namespace gk {
00011 
00012 //! \ingroup openGL
00013 //@{
00014     
00015 //! gestion 'auto' des ressources openGL : pour les samplers de textures (mipmap linear).
00016 inline
00017 GLSampler *createSampler( const GLenum wrap= GL_CLAMP_TO_BORDER )
00018 {
00019     return GLManager<GLSampler>::manager().insert( 
00020         new GLLinearSampler(wrap) );
00021 }
00022 
00023 //! gestion 'auto' des ressources openGL : pour les samplers de textures (mipmap linear).
00024 inline
00025 GLSampler *createLinearSampler( const GLenum wrap= GL_CLAMP_TO_BORDER )
00026 {
00027     return GLManager<GLSampler>::manager().insert( 
00028         new GLLinearSampler(wrap) );
00029 }
00030 
00031 //! gestion 'auto' des ressources openGL : pour les samplers de textures (anisotropic).
00032 inline
00033 GLSampler *createAnisotropicSampler( const float filter= 4, const GLenum wrap= GL_CLAMP_TO_BORDER )
00034 {
00035     return GLManager<GLSampler>::manager().insert( 
00036         new GLAnisotropicSampler(filter, wrap) );
00037 }
00038 
00039 //! gestion 'auto' des ressources openGL : pour les samplers de textures (nearest).
00040 inline
00041 GLSampler *createNearestSampler( const GLenum wrap= GL_CLAMP_TO_BORDER )
00042 {
00043     return GLManager<GLSampler>::manager().insert( 
00044         new GLNearestSampler(wrap) );
00045 }
00046 
00047 //! gestion 'auto' des ressources openGL : pour les samplers de textures depth component.
00048 inline
00049 GLSampler *createDepthSampler( const GLenum wrap= GL_CLAMP_TO_BORDER )
00050 {
00051     return GLManager<GLSampler>::manager().insert( 
00052         new GLDepthSampler(wrap) );
00053 }
00054 
00055 //@}
00056 
00057 }
00058 
00059 #endif
 All Classes Namespaces Functions Variables Typedefs Enumerator Friends