class OpenGL::Texture

Defined in:

opengl/texture.cr

Constant Summary

DATA_TYPES = {UInt8 => LibGL::UNSIGNED_BYTE, Int8 => LibGL::BYTE, Uint16 => LibGL::UNSIGNED_SHORT, Int16 => LibGL::SHORT, UInt32 => LibGL::UNSIGNED_INT, Int32 => LibGL::INT, Float32 => LibGL::FLOAT}
PARAM_KEYS = {texture_min_filter: LibGL::TEXTURE_MIN_FILTER, texture_mag_filter: LibGL::TEXTURE_MAG_FILTER, texture_min_lod: LibGL::TEXTURE_MIN_LOD, texture_max_lod: LibGL::TEXTURE_MAX_LOD, texture_base_level: LibGL::TEXTURE_BASE_LEVEL, texture_max_level: LibGL::TEXTURE_MAX_LEVEL, texture_wrap_s: LibGL::TEXTURE_WRAP_S, texture_wrap_t: LibGL::TEXTURE_WRAP_T, texture_wrap_r: LibGL::TEXTURE_WRAP_R, texture_border_color: LibGL::TEXTURE_BORDER_COLOR, texture_priority: LibGL::TEXTURE_PRIORITY, texture_compare_mode: LibGL::TEXTURE_COMPARE_MODE, texture_compare_func: LibGL::TEXTURE_COMPARE_FUNC, depth_texture_mode: LibGL::DEPTH_TEXTURE_MODE, generate_mipmap: LibGL::GENERATE_MIPMAP}
PARAM_VALUES = {texture_min_filter: {nearest: LibGL::NEAREST, linear: LibGL::LINEAR, nearest_mipmap_nearest: LibGL::NEAREST_MIPMAP_NEAREST, linear_mipmap_nearest: LibGL::LINEAR_MIPMAP_NEAREST, nearest_mipmap_linear: LibGL::NEAREST_MIPMAP_LINEAR, linear_mipmap_linear: LibGL::LINEAR_MIPMAP_LINEAR}, texture_mag_filter: {nearest: LibGL::NEAREST, linear: LibGL::LINEAR}, texture_wrap_s: WRAP_VALUES, texture_wrap_t: WRAP_VALUES, texture_wrap_r: WRAP_VALUES, texture_compare_mode: {compare_r_to_texture: LibGL::COMPARE_R_TO_TEXTURE, none: LibGL::NONE}, texture_compare_func: {lequal: LibGL::LEQUAL, gequal: LibGL::GEQUAL, less: LibGL::LESS, greater: LibGL::GREATER, equal: LibGL::EQUAL, notequal: LibGL::NOTEQUAL, always: LibGL::ALWAYS, never: LibGL::NEVER}, depth_texture_mode: {luminance: LibGL::LUMINANCE, intensity: LibGL::INTENSITY, alpha: LibGL::ALPHA}}
TARGETS = {texture1D: LibGL::TEXTURE_1D, texture2D: LibGL::TEXTURE_2D, texture3D: LibGL::TEXTURE_3D, texture1D_array: LibGL::TEXTURE_1D_ARRAY, texture2D_array: LibGL::TEXTURE_2D_ARRAY, texture_rectangle: LibGL::TEXTURE_RECTANGLE, texture_cube_map: LibGL::TEXTURE_CUBE_MAP, texture_cube_map_array: LibGL::TEXTURE_CUBE_MAP_ARRAY, texture_buffer: LibGL::TEXTURE_BUFFER, texture2D_multisample: LibGL::TEXTURE_2D_MULTISAMPLE, texture2D_multisample_array: LibGL::TEXTURE_2D_MULTISAMPLE_ARRAY}
WRAP_VALUES = {clamp: LibGL::CLAMP, clamp_to_border: LibGL::CLAMP_TO_BORDER, clamp_to_edge: LibGL::CLAMP_TO_EDGE, mirrored_repeat: LibGL::MIRRORED_REPEAT, repeat: LibGL::REPEAT}

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(target, params = {} of Symbol => ParamValueType) #

[View source]

Class Method Detail

def self.active_slot=(index) #

[View source]

Instance Method Detail

def bind(&) #

[View source]
def bind! #

[View source]
def bind_to_slot(index, &) #

[View source]
def bind_to_slot!(index) #

[View source]
def set_data(width, height, data, internal_format, format, type) #

[View source]
def set_data(width, height, data, internal_format, format) #

[View source]
def set_param(key : Symbol, value : ParamValueType) #

[View source]
def set_params(params = {} of LibGL::Enum => ParamValueType) #

[View source]