147 #ifndef INCLUDED_OGL_TEX 148 #define INCLUDED_OGL_TEX 497 #endif // #ifndef INCLUDED_OGL_TEX Handle ogl_tex_wrap(Tex *t, const PIVFS &vfs, const VfsPath &pathname, size_t flags=0)
Make the Tex object ready for use as an OpenGL texture and return a handle to it. ...
Definition: ogl_tex.cpp:573
Definition: ogl_tex.h:327
bool ogl_tex_has_s3tc()
Return whether native S3TC texture compression support is available.
Definition: ogl_tex.cpp:1129
Status ogl_tex_get_average_color(Handle ht, u32 *p)
Retrieve ARGB value of 1x1 mipmap level of the texture, i.e.
Definition: ogl_tex.cpp:1043
Handle ogl_tex_load(const PIVFS &vfs, const VfsPath &pathname, size_t flags=0)
Load and return a handle to the texture.
Definition: ogl_tex.cpp:545
Definition: ogl_tex.h:321
Status ogl_tex_get_format(Handle ht, size_t *flags, GLenum *fmt)
Retrieve pixel format of the texture.
Definition: ogl_tex.cpp:1004
Status ogl_tex_bind(Handle ht, size_t unit=0)
Bind texture to the specified unit in preparation for using it in rendering.
Definition: ogl_tex.cpp:1067
shared_ptr< IVFS > PIVFS
Definition: vfs.h:226
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...
Definition: ogl_tex.cpp:554
uint8_t u8
Definition: types.h:37
uint32_t u32
Definition: types.h:39
Definition: ogl_tex.h:320
Status ogl_tex_transform_to(Handle ht, size_t new_flags)
Transform pixel format of the texture.
Definition: ogl_tex.cpp:1120
Status ogl_tex_set_wrap(Handle ht, GLint wrap_s, GLint wrap_t)
Override default wrap mode (GL_REPEAT) for this texture.
Definition: ogl_tex.cpp:660
Status ogl_tex_set_anisotropy(Handle ht, GLfloat anisotropy)
Override default maximum anisotropic filtering for this texture.
Definition: ogl_tex.cpp:682
Status ogl_tex_get_texture_id(Handle ht, GLuint *id)
Return the GL handle of the loaded texture in *id, or 0 on failure.
Definition: ogl_tex.cpp:1100
emphatically require full quality for this texture.
Definition: ogl_tex.h:173
i64 Status
Error handling system.
Definition: status.h:171
i64 Handle
`handle' representing a reference to a resource (sound, texture, etc.)
Definition: handle.h:41
stores all data describing an image.
Definition: tex.h:209
Status ogl_tex_upload(const Handle ht, GLenum fmt_ovr=0, int q_flags_ovr=0, GLint int_fmt_ovr=0)
Upload texture to OpenGL.
Definition: ogl_tex.cpp:918
Definition: ogl_tex.h:319
store the texture at half its original resolution.
Definition: ogl_tex.h:195
OglTexOverrides
Definition: ogl_tex.h:317
OglTexAllow
Definition: ogl_tex.h:324
Status ogl_tex_free(Handle &ht)
Release this texture reference.
Definition: ogl_tex.cpp:589
void ogl_tex_override(OglTexOverrides what, OglTexAllow allow)
Override the default decision and force/disallow use of the given feature.
Definition: ogl_tex.cpp:714
store the texture at half the normal bit depth (4 bits per pixel component, as opposed to 8)...
Definition: ogl_tex.h:182
bool ogl_tex_has_anisotropy()
Return whether anisotropic filtering support is available.
Definition: ogl_tex.cpp:1138
void ogl_tex_set_defaults(int q_flags, GLint filter)
Change default settings - these affect performance vs.
Definition: ogl_tex.cpp:206
OglTexQualityFlags
Quality flags for texture uploads.
Definition: ogl_tex.h:164
Definition: ogl_tex.h:326
Status ogl_tex_transform(Handle ht, size_t flags)
(partially) Transform pixel format of the texture.
Definition: ogl_tex.cpp:1110
Definition: vfs_util.cpp:39
Status ogl_tex_get_size(Handle ht, size_t *w, size_t *h, size_t *bpp)
Retrieve dimensions and bit depth of the texture.
Definition: ogl_tex.cpp:987
Status ogl_tex_get_data(Handle ht, u8 **p)
Retrieve pixel data of the texture.
Definition: ogl_tex.cpp:1026
Status ogl_tex_set_filter(Handle ht, GLint filter)
Override default filter (see ogl_tex_set_defaults) for this texture.
Definition: ogl_tex.cpp:641
Status ogl_tex_get_uploaded_size(Handle ht, size_t *size)
Retrieve number of bytes uploaded for the texture, including mipmaps.
Definition: ogl_tex.cpp:1034