lib.res.graphics
Enum OglTexQualityFlags
in ogl_tex.h
Quality flags for texture uploads.
Specify any of them to override certain aspects of the default.
Field Summary |
OGL_TEX_FULL_QUALITY = 0x20
emphatically require full quality for this texture. |
OGL_TEX_HALF_BPP = 0x10
store the texture at half the normal bit depth
(4 bits per pixel component, as opposed to 8). |
OGL_TEX_HALF_RES = 0x01
store the texture at half its original resolution. |
OGL_TEX_FULL_QUALITY
public OGL_TEX_FULL_QUALITY = 0x20
- emphatically require full quality for this texture.
(q_flags are invalid if this is set together with any other bit)
rationale: the value 0 is used to indicate "use default flags" in
ogl_tex_upload and ogl_tex_set_defaults, so this is the only
way we can say "disregard default and do not reduce anything".
OGL_TEX_HALF_BPP
public OGL_TEX_HALF_BPP = 0x10
- store the texture at half the normal bit depth
(4 bits per pixel component, as opposed to 8).
this increases performance on older graphics cards due to
decreased size in vmem. it has no effect on
compressed textures because they have a fixed internal format.
OGL_TEX_HALF_RES
public OGL_TEX_HALF_RES = 0x01
- store the texture at half its original resolution.
this increases performance on older graphics cards due to
decreased size in vmem.
this is useful for also reducing quality of compressed textures,
which are not affected by OGL_TEX_HALF_BPP.
currently only implemented for images that contain mipmaps
(otherwise, we'd have to resample, which is slow).
note: scaling down to 1/4, 1/8, .. is easily possible without
extra work, so we leave some bits free for that.