forked from 0ad/0ad
Allow texture format override, so that the 8-bit GL_ALPHA fonts can work
This was SVN commit r519.
This commit is contained in:
parent
d4423850ef
commit
358f43205a
@ -1027,11 +1027,13 @@ int tex_id(const Handle h)
|
||||
int tex_filter = GL_LINEAR;
|
||||
uint tex_bpp = 32; // 16 or 32
|
||||
|
||||
int tex_upload(const Handle ht, int filter, int int_fmt)
|
||||
int tex_upload(const Handle ht, int filter, int int_fmt, int fmt)
|
||||
{
|
||||
H_DEREF(ht, Tex, t);
|
||||
t->filter = filter;
|
||||
t->int_fmt = int_fmt;
|
||||
if (fmt)
|
||||
t->fmt = fmt;
|
||||
|
||||
const char* fn = h_filename(ht);
|
||||
if(!fn)
|
||||
|
@ -35,7 +35,7 @@ extern unsigned int tex_bpp; // 16 or 32; default: 32
|
||||
|
||||
// upload the specified texture to OpenGL. Texture filter and internal format
|
||||
// may be specified to override the global defaults.
|
||||
extern int tex_upload(Handle ht, int filter_override = 0, int internal_fmt_override = 0);
|
||||
extern int tex_upload(Handle ht, int filter_override = 0, int internal_fmt_override = 0, int format_override = 0);
|
||||
|
||||
extern int tex_free(Handle& ht);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user