module Texture: sig
.. end
Texture pure virtual base class that encapsulates OpenGl texture
functionality common to the various types of OSG textures.
type
t
val to_state_attribute : t -> Osg.State_attribute.t
type
wrap_parameter =
| |
WRAP_S |
| |
WRAP_T |
| |
WRAP_R |
type
wrap_mode =
| |
CLAMP |
| |
CLAMP_TO_EDGE |
| |
CLAMP_TO_BORDER |
| |
REPEAT |
| |
MIRROR |
val set_wrap : t -> wrap_parameter -> wrap_mode -> unit
Sets the texture wrap mode.
type
filter_parameter =
| |
MIN_FILTER |
| |
MAG_FILTER |
type
filter_mode =
| |
LINEAR |
| |
LINEAR_MIPMAP_LINEAR |
| |
LINEAR_MIPMAP_NEAREST |
| |
NEAREST |
| |
NEAREST_MIPMAP_LINEAR |
| |
NEAREST_MIPMAP_NEAREST |
val set_filter : t ->
filter_parameter -> filter_mode -> unit
Sets the texture filter mode.
type
internal_format_mode =
| |
USE_IMAGE_DATA_FORMAT |
| |
USE_USER_DEFINED_FORMAT |
| |
USE_ARB_COMPRESSION |
| |
USE_S3TC_DXT1_COMPRESSION |
| |
USE_S3TC_DXT3_COMPRESSION |
| |
USE_S3TC_DXT5_COMPRESSION |
type
internal_format =
| |
ONE_COMPONENT |
| |
TWO_COMPONENTS |
| |
THREE_COMPONENTS |
| |
FOUR_COMPONENTS |
| |
GL_ALPHA |
| |
GL_ALPHA4 |
| |
GL_ALPHA8 |
| |
GL_ALPHA12 |
| |
GL_ALPHA16 |
| |
GL_LUMINANCE |
| |
GL_LUMINANCE4 |
| |
GL_LUMINANCE8 |
| |
GL_LUMINANCE12 |
| |
GL_LUMINANCE16 |
| |
GL_LUMINANCE_ALPHA |
| |
GL_LUMINANCE4_ALPHA4 |
| |
GL_LUMINANCE6_ALPHA2 |
| |
GL_LUMINANCE8_ALPHA8 |
| |
GL_LUMINANCE12_ALPHA4 |
| |
GL_LUMINANCE12_ALPHA12 |
| |
GL_LUMINANCE16_ALPHA16 |
| |
GL_INTENSITY |
| |
GL_INTENSITY4 |
| |
GL_INTENSITY8 |
| |
GL_INTENSITY12 |
| |
GL_INTENSITY16 |
| |
GL_R3_G3_B2 |
| |
GL_RGB |
| |
GL_RGB4 |
| |
GL_RGB5 |
| |
GL_RGB8 |
| |
GL_RGB10 |
| |
GL_RGB12 |
| |
GL_RGB16 |
| |
GL_RGBA |
| |
GL_RGBA2 |
| |
GL_RGBA4 |
| |
GL_RGB5_A1 |
| |
GL_RGBA8 |
| |
GL_RGB10_A2 |
| |
GL_RGBA12 |
| |
GL_RGBA16 |
| |
GL_DEPTH_COMPONENT |
| |
GL_DEPTH_COMPONENT16_ARB |
| |
GL_DEPTH_COMPONENT24_ARB |
| |
GL_DEPTH_COMPONENT32_ARB |
texture internal format
val set_internal_format : t -> internal_format -> unit
Sets the internal texture format.
Implicitly sets the internalFormatMode to USE_USER_DEFINED_FORMAT.
val set_source_format : t -> internal_format -> unit
Sets the external source image format, used as a fallback when no
Osg.Image
is attached to provide the source image format.
type
shadow_compare_func =
type
shadow_texture_mode =
| |
LUMINANCE |
| |
INTENSITY |
| |
ALPHA |
val set_shadow_comparison : t -> bool -> unit
Sets GL_TEXTURE_COMPARE_MODE_ARB to GL_COMPARE_R_TO_TEXTURE_ARB
See http://oss.sgi.com/projects/ogl-sample/registry/ARB/shadow.txt.
val set_shadow_compare_func : t -> shadow_compare_func -> unit
Sets shadow texture comparison function.
val set_shadow_texture_mode : t -> shadow_texture_mode -> unit
Sets shadow texture mode after comparison.
val set_shadow_ambient : t -> float -> unit
Sets the TEXTURE_COMPARE_FAIL_VALUE_ARB texture parameter.
See http://oss.sgi.com/projects/ogl-sample/registry/ARB/shadow_ambient.txt
val set_image : t -> int -> Osg.Image.t -> unit
Sets the texture image for the specified face.
val set_and_transform : t ->
(t -> 'a) ->
?wrap:(wrap_parameter * wrap_mode) list ->
?filter:(filter_parameter * filter_mode) list ->
?internal_format:internal_format ->
?source_format:internal_format ->
?shadow_comparison:bool ->
?shadow_compare_func:shadow_compare_func ->
?shadow_texture_mode:shadow_texture_mode ->
?shadow_ambient:float -> ?images:(int * Osg.Image.t) list -> unit -> 'a