Type of a 2D texture
Module OgamlGraphics.Texture.Texture2D
Represents a simple 2D textureThis module provides an abstraction of OpenGL 2D textures that can be used for 2D rendering (with sprites) or 3D rendering when passed to a GLSL program.
Creates a texture from a source (a file or an image), or an empty texture. Generates all mipmaps by default.
Raises
See : OgamlGraphics.RenderTarget.T
See : OgamlMath.Vector2i
See : OgamlGraphics.Context
Raises
Texture_error
if the requested size exceeds the maximal texture size allowed by the context.See : OgamlGraphics.RenderTarget.T
See : OgamlMath.Vector2i
See : OgamlGraphics.Context
Returns the size of a texture
See : OgamlMath.Vector2i
See : OgamlMath.Vector2i
Sets the minifying filter of a texture. Defaults as LinearMipmapLinear.
Sets the magnifying filter of a texture. Defaults as Linear
Sets the wrapping function of a texture. Defaults as ClampEdge.
Returns the number of mipmap levels of a texture
Returns a mipmap level of a texture. Raises
Invalid_argument
if the requested level is out of bounds
System only function, binds a texture to a texture unit for drawing
Texture2D implements the interface ColorAttachable and can be attached to an FBO. Binds the mipmap level 0.