mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 19:20:46 +00:00
Clean up a couple of other getrendermode() related bits that the previous commit missed
git-svn-id: https://svn.eduke32.com/eduke32@3347 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
79e45c23d5
commit
cbf9d2cff3
2 changed files with 18 additions and 10 deletions
|
@ -16,7 +16,7 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
enum {
|
enum rendmode_t {
|
||||||
REND_CLASSIC,
|
REND_CLASSIC,
|
||||||
REND_POLYMOST = 3,
|
REND_POLYMOST = 3,
|
||||||
REND_POLYMER
|
REND_POLYMER
|
||||||
|
@ -579,7 +579,7 @@ EXTERN int32_t editorzrange[2];
|
||||||
static inline int32_t getrendermode(void)
|
static inline int32_t getrendermode(void)
|
||||||
{
|
{
|
||||||
#ifndef USE_OPENGL
|
#ifndef USE_OPENGL
|
||||||
return 0;
|
return REND_CLASSIC;
|
||||||
#else
|
#else
|
||||||
return rendmode;
|
return rendmode;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -215,19 +215,27 @@ static int32_t osdfunc_setrendermode(const osdfuncparm_t *parm)
|
||||||
int32_t m;
|
int32_t m;
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
const char *modestrs[] =
|
|
||||||
{
|
|
||||||
"classic software", "",
|
|
||||||
"", "polygonal OpenGL", "great justice (Polymer)"
|
|
||||||
};
|
|
||||||
|
|
||||||
if (parm->numparms != 1) return OSDCMD_SHOWHELP;
|
if (parm->numparms != 1) return OSDCMD_SHOWHELP;
|
||||||
m = Bstrtol(parm->parms[0], &p, 10);
|
m = Bstrtol(parm->parms[0], &p, 10);
|
||||||
|
|
||||||
if (m < 0 || m > 4) return OSDCMD_SHOWHELP;
|
if (m < REND_CLASSIC || m > REND_POLYMER) return OSDCMD_SHOWHELP;
|
||||||
|
|
||||||
setrendermode(m);
|
setrendermode(m);
|
||||||
OSD_Printf("Rendering method changed to %s\n", modestrs[ getrendermode()]);
|
|
||||||
|
switch(getrendermode())
|
||||||
|
{
|
||||||
|
case REND_CLASSIC:
|
||||||
|
p = "classic software";
|
||||||
|
break;
|
||||||
|
case REND_POLYMOST:
|
||||||
|
p = "polygonal OpenGL";
|
||||||
|
break;
|
||||||
|
case REND_POLYMER:
|
||||||
|
p = "great justice (Polymer)";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
OSD_Printf("Rendering method changed to %s\n", p);
|
||||||
|
|
||||||
return OSDCMD_OK;
|
return OSDCMD_OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue