Eiffel Media API
Overview Cluster Class Classes Index      Previous Next      Top Features

em.video.opengl

Class GL_STATIC_TEXTURE


Direct ancestors

GL_TEXTURE

Known direct descendants

GL_STATIC_MIPMAP_TEXTURE

Creation

Features

Invariants

indexing

description

A static texture which doesn't change after creation.

date

$Date$

revision

$Revision$

class

GL_STATIC_TEXTURE

inherit

GL_TEXTURE

create

make_from_surface (a_surface: EM_SURFACE)

-- Initialise texture with a_surface.
-- The width and height of the texture will be the smallest
-- power of 2 which is greater than the dimensions of a_surface.

require
a_surface_not_void: a_surface /= Void
ensure
texture_created: id > 0

feature -- Access

id: INTEGER

-- OpenGL texture id

-- (From GL_TEXTURE)

feature -- Measurement

height: INTEGER

-- Height of texture in pixels

-- (From GL_TEXTURE)

width: INTEGER

-- Width of texture in pixels

-- (From GL_TEXTURE)

feature -- Status report

is_not_freeing_texture: BOOLEAN

-- Is Current not freeing texture on disposal?

-- (From GL_TEXTURE)

is_valid: BOOLEAN

-- Is texture valid?

-- (From GL_TEXTURE)

feature -- Status setting

do_not_free_texture

-- Tell Current not to free texture on disposal.
-- If you call this, you will be responsible for freeing
-- the OpenGL texture yourself using gl_delete_textures!

-- (From GL_TEXTURE)

feature -- Basic Operations

save

-- Save texture in global textures list.
-- A saved texture will not be freed, even when you loose
-- the reference to the texture object. To free it later use
-- the global storage GL_TEXTURES.
-- TODO: maybe a mechanism to add an id would be nice.

-- (From GL_TEXTURE)

invariant

-- From GL_TEXTURE
width_not_negative: width >= 0
height_not_negative: height >= 0

-- From ANY
reflexive_equality: standard_is_equal (Current)
reflexive_conformance: conforms_to (Current)

end