indexing description: "[ A static texture which doesn't change after creation. ]" date: "$Date$" revision: "$Revision$" class GL_STATIC_TEXTURE inherit GL_TEXTURE MEMORY export {NONE} all redefine dispose end create make_from_surface feature {NONE} -- Initialisation make_from_surface (a_surface: EM_SURFACE) is -- 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 local surface_texture: GL_SURFACE_TEXTURE do create surface_texture.make_from_surface (a_surface) surface_texture.do_not_free_texture id := surface_texture.id width := surface_texture.width height := surface_texture.height ensure texture_created: id > 0 end feature -- Access id: INTEGER -- OpenGL texture id feature {NONE} -- Implementation dispose is -- Free OpenGL texture. do if id > 0 and not is_not_freeing_texture then gl_delete_textures_external (1, $id) id := 0 end Precursor end end