added resetgl command to restart renderer in-game
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1642 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
+12
-5
@@ -78,10 +78,6 @@ void gl_init(int w, int h, int bpp, int depth, int fsaa)
|
||||
camera1 = player1;
|
||||
}
|
||||
|
||||
void cleangl()
|
||||
{
|
||||
}
|
||||
|
||||
void line(int x1, int y1, float z1, int x2, int y2, float z2)
|
||||
{
|
||||
glBegin(GL_POLYGON);
|
||||
@@ -528,7 +524,7 @@ void drawminimap(int w, int h)
|
||||
|
||||
int size = 1<<minimapres, sizelimit = min(hwtexsize, min(w, h));
|
||||
while(size > sizelimit) size /= 2;
|
||||
if(size!=minimaplastsize)
|
||||
if(size!=minimaplastsize && minimaptex)
|
||||
{
|
||||
glDeleteTextures(1, &minimaptex);
|
||||
minimaptex = 0;
|
||||
@@ -597,6 +593,17 @@ void drawminimap(int w, int h)
|
||||
glClearDepth(1.0);
|
||||
}
|
||||
|
||||
void cleanupgl()
|
||||
{
|
||||
if(reflecttex) glDeleteTextures(1, &reflecttex);
|
||||
if(refracttex) glDeleteTextures(1, &refracttex);
|
||||
if(minimaptex) glDeleteTextures(1, &minimaptex);
|
||||
reflecttex = refracttex = minimaptex = 0;
|
||||
minimapdirty = true;
|
||||
|
||||
if(glIsEnabled(GL_MULTISAMPLE)) glDisable(GL_MULTISAMPLE);
|
||||
}
|
||||
|
||||
int xtraverts;
|
||||
|
||||
VARP(hudgun, 0, 1, 1);
|
||||
|
||||
Reference in New Issue
Block a user