SuperTuxKart
Loading...
Searching...
No Matches
Public Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Static Private Member Functions | List of all members
TextureShaderBase Class Reference

A simple non-templated base class for a shader that uses textures. More...

#include <texture_shader.hpp>

Inheritance diagram for TextureShaderBase:
Inheritance graph
[legend]

Public Types

typedef std::function< void(GLuint, GLuint)> BindFunction
 

Protected Member Functions

GLuint createSamplers (SamplerTypeNew sampler_type)
 

Static Protected Member Functions

static void bindTextureNearest (GLuint tex_unit, GLuint tex_id)
 
static void bindTextureBilinear (GLuint texture_unit, GLuint tex_id)
 
static void bindTextureBilinearClamped (GLuint tex_unit, GLuint tex_id)
 
static void bindTextureNearestClamped (GLuint tex_unit, GLuint tex_id)
 
static void bindTextureTrilinearAnisotropic (GLuint tex_unit, GLuint tex_id)
 
static void bindTextureSemiTrilinear (GLuint tex_unit, GLuint tex_id)
 
static void bindCubemapTrilinear (GLuint tex_unit, GLuint tex_id)
 
static void bindTextureShadow (GLuint tex_unit, GLuint tex_id)
 
static void bindTrilinearClampedArrayTexture (GLuint tex_unit, GLuint tex_id)
 
static void bindTextureVolume (GLuint tex_unit, GLuint tex_id)
 
static void bindTextureBuffer (GLuint tex_unit, GLuint tex_id)
 

Protected Attributes

std::vector< BindFunction > m_bind_functions
 

Static Protected Attributes

static BindFunction m_all_bind_functions []
 
static GLuint m_all_texture_types []
 

Static Private Member Functions

static GLuint createNearestSampler ()
 
static GLuint createTrilinearSampler ()
 
static GLuint createBilinearSampler ()
 
static GLuint createShadowSampler ()
 
static GLuint createTrilinearClampedArray ()
 
static GLuint createBilinearClampedSampler ()
 
static GLuint createSemiTrilinearSampler ()
 

Detailed Description

A simple non-templated base class for a shader that uses textures.

A non templated base class is necessary to easily handle static objects (like list of all bind functions to call) - with templates each instance is a different class (with different static values).

Member Data Documentation

◆ m_all_bind_functions

TextureShaderBase::BindFunction TextureShaderBase::m_all_bind_functions
staticprotected
Initial value:
=
{ &TextureShaderBase::bindTextureNearest,
&TextureShaderBase::bindTextureTrilinearAnisotropic,
&TextureShaderBase::bindCubemapTrilinear,
&TextureShaderBase::bindTextureBilinear,
&TextureShaderBase::bindTextureShadow,
&TextureShaderBase::bindTrilinearClampedArrayTexture,
&TextureShaderBase::bindTextureVolume,
&TextureShaderBase::bindTextureNearestClamped,
&TextureShaderBase::bindTextureBilinearClamped,
&TextureShaderBase::bindTextureSemiTrilinear,
&TextureShaderBase::bindTextureBuffer
}

◆ m_all_texture_types

GLuint TextureShaderBase::m_all_texture_types
staticprotected
Initial value:
=
{ GL_TEXTURE_2D,
GL_TEXTURE_2D,
GL_TEXTURE_CUBE_MAP,
GL_TEXTURE_2D ,
GL_TEXTURE_2D_ARRAY,
GL_TEXTURE_2D_ARRAY,
GL_TEXTURE_3D,
GL_TEXTURE_2D,
GL_TEXTURE_2D,
GL_TEXTURE_2D
, GL_TEXTURE_BUFFER
}

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