mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
gl_rmisc.c (R_Envmap_f): the envmap command can only be run when there's something
to render, ie. when connected to a server. besides, the refdef must be restored when it is completed. git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@68 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
a3bae85fe6
commit
8e0638e867
1 changed files with 8 additions and 0 deletions
|
@ -120,7 +120,12 @@ Grab six views for environment mapping tests
|
|||
void R_Envmap_f (void)
|
||||
{
|
||||
byte buffer[256*256*4];
|
||||
refdef_t save_refdef;
|
||||
|
||||
if (cls.state != ca_connected)
|
||||
return;
|
||||
|
||||
memcpy (&save_refdef, &r_refdef, sizeof(refdef_t));
|
||||
glDrawBuffer (GL_FRONT);
|
||||
glReadBuffer (GL_FRONT);
|
||||
envmap = true;
|
||||
|
@ -174,6 +179,9 @@ void R_Envmap_f (void)
|
|||
glDrawBuffer (GL_BACK);
|
||||
glReadBuffer (GL_BACK);
|
||||
GL_EndRendering ();
|
||||
|
||||
memcpy (&r_refdef, &save_refdef, sizeof(refdef_t));
|
||||
vid.recalc_refdef = 1;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue