glamour



class  ShaderException: object.Exception;




alias  Sampler = RealSampler;




class  RealSampler: glamour.sampler.ISampler;

Represents an OpenGL Sampler.


GLuint  sampler;

The OpenGL  sampler name.


this();

Creates the OpenGL sampler.


void  set_parameter(T)(GLenum name, T params);

Sets a sampler parameter.


float[]  get_parameter(GLenum name);

Queries a texture parameter from OpenGL.


void  bind(GLuint unit);
void  bind(ITexture tex);

Binds the sampler.


void  unbind(GLuint unit);
void  unbind(ITexture tex);

Unbinds the sampler.


void  remove();

Deletes the sampler.


class  EmulatedSampler: glamour.sampler.ISampler;

This emulates an OpenGL Sampler on platforms where no glGenSamplers is available (like OSX). This only works with Texture1D, Texture2D and Texture3D so far.


void  set_parameter(T)(GLenum name, T params);

Sets a sampler parameter (and stores it internally).


float[]  get_parameter(GLenum name);

Returns the stored parameter or [float.nan] if not internally stored.


void  bind(GLuint unit);

Stub, throws always ShaderException.


void  bind(ITexture tex);

Applies the parameters to the passed texture, must be one of Texture1D, Texture2D or Texture3D, or throws ShaderException


void  unbind(GLuint unit);

Stub.


void  unbind(ITexture tex);

Stub.


void  remove();

Stub.