Texture1D

Represents an OpenGL 1D texture. The constructor must be used to avoid segmentation faults.

Constructors

this
this(GLenum unit)

Generates the OpenGL texture and initializes the struct.

Alias This

texture

Alias this to texture.

Members

Functions

get_unit
GLuint get_unit()
Undocumented in source. Be warned that the author may not have intended to support it.
set_data
void set_data(T data, GLint internal_format, int width, GLenum format, GLenum type)

Sets the texture data.

Mixins

__anonymous
mixin CommonTextureMethods

Static variables

target
GLenum target;
Undocumented in source.

Variables

format
GLenum format;

Holds the format of the pixel data.

internal_format
GLint internal_format;

Holds the internal format passed to the constructor.

texture
GLuint texture;

The OpenGL texture name.

type
GLenum type;

Holds the OpenGL data type of the pixel data.

unit
GLuint unit;

Holds the texture unit.

Mixed In Members

From mixin CommonTextureMethods

~this
~this()
Undocumented in source.
remove
void remove()

Deletes the texture.

set_parameter
void set_parameter(GLuint name, T params)

Sets a texture parameter.

get_parameter
float[] get_parameter(GLuint name)

Queries a texture parameter from OpenGL.

generate_mipmaps
void generate_mipmaps()

Generates mipmaps for the textre (also binds it)

bind
void bind()

Binds the texture.

activate
void activate(GLuint unit)

Activates the texture to unit, passed to the function.

activate
void activate()

Activates the texture to unit, the struct member.

bind_and_activate
void bind_and_activate(GLuint unit)

Binds the texture and activates it to unit, passed to the function.

bind_and_activate
void bind_and_activate()

Binds the texture and activates it to unit, the struct member.

unbind
void unbind()

Unbinds the texture.

Inherited Members

From ITexture

get_unit
GLuint get_unit()
Undocumented in source.
remove
void remove()
Undocumented in source.
set_parameter
void set_parameter(GLuint name, T params)
Undocumented in source.
get_parameter
float[] get_parameter(GLuint name)
Undocumented in source.
set_data
void set_data(T data)
Undocumented in source.
generate_mipmaps
void generate_mipmaps()
Undocumented in source.
bind
void bind()
Undocumented in source.
activate
void activate(GLuint unit)
Undocumented in source.
activate
void activate()
Undocumented in source.
bind_and_activate
void bind_and_activate(GLuint unit)
Undocumented in source.
bind_and_activate
void bind_and_activate()
Undocumented in source.
unbind
void unbind()
Undocumented in source.

Meta