147 #ifndef INCLUDED_OGL_TEX
148 #define INCLUDED_OGL_TEX
487 #endif // #ifndef INCLUDED_OGL_TEX
Status ogl_tex_set_anisotropy(Handle ht, GLfloat anisotropy)
Override default maximum anisotropic filtering for this texture.
Handle ogl_tex_find(const VfsPath &pathname)
Find and return an existing texture object, if it has already been loaded and is still in memory...
void ogl_tex_override(OglTexOverrides what, OglTexAllow allow)
Override the default decision and force/disallow use of the given feature.
Status ogl_tex_transform(Handle ht, size_t transforms)
(partially) Transform pixel format of the texture.
Handle ogl_tex_wrap(Tex *t, const PIVFS &vfs, const VfsPath &pathname, size_t flags)
Make the Tex object ready for use as an OpenGL texture and return a handle to it. ...
Status ogl_tex_free(Handle &ht)
Release this texture reference.
Status ogl_tex_transform_to(Handle ht, size_t new_flags)
Transform pixel format of the texture.
Status ogl_tex_bind(Handle ht, size_t unit)
Bind texture to the specified unit in preparation for using it in rendering.
bool ogl_tex_has_s3tc()
Return whether native S3TC texture compression support is available.
Status ogl_tex_set_wrap(Handle ht, GLint wrap_s, GLint wrap_t)
Override default wrap mode (GL_REPEAT) for this texture.
emphatically require full quality for this texture.
i64 Status
Error handling system.
i64 Handle
`handle' representing a reference to a resource (sound, texture, etc.)
bool ogl_tex_has_anisotropy()
Return whether anisotropic filtering support is available.
stores all data describing an image.
Handle ogl_tex_load(const PIVFS &vfs, const VfsPath &pathname, size_t flags)
Load and return a handle to the texture.
store the texture at half its original resolution.
store the texture at half the normal bit depth (4 bits per pixel component, as opposed to 8)...
Status ogl_tex_get_texture_id(Handle ht, GLuint *id)
Return the GL handle of the loaded texture in *id, or 0 on failure.
Status ogl_tex_set_filter(Handle ht, GLint filter)
Override default filter (see ogl_tex_set_defaults) for this texture.
Status ogl_tex_get_data(Handle ht, u8 **p)
Retrieve pixel data of the texture.
Status ogl_tex_get_format(Handle ht, size_t *flags, GLenum *fmt)
Retrieve pixel format of the texture.
OglTexQualityFlags
Quality flags for texture uploads.
void ogl_tex_set_defaults(int q_flags, GLint filter)
Change default settings - these affect performance vs.
Status ogl_tex_get_average_colour(Handle ht, u32 *p)
Retrieve ARGB value of 1x1 mipmap level of the texture, i.e.
Status ogl_tex_upload(const Handle ht, GLenum fmt_ovr, int q_flags_ovr, GLint int_fmt_ovr)
Upload texture to OpenGL.
Status ogl_tex_get_size(Handle ht, size_t *w, size_t *h, size_t *bpp)
Retrieve dimensions and bit depth of the texture.