Fixes to EMP and speed/zoom for FBO texture

This commit is contained in:
Simon Robertshaw 2011-10-25 12:13:32 +01:00
parent ef3bab249a
commit cb537351e7
2 changed files with 16 additions and 13 deletions

View File

@ -109,10 +109,12 @@ int update_EMP(UPDATE_FUNC_ARGS) {
return 0; return 0;
} }
int graphics_EMP(GRAPHICS_FUNC_ARGS) int graphics_EMP(GRAPHICS_FUNC_ARGS)
{
if(cpart->life)
{ {
*colr = cpart->life*1.5; *colr = cpart->life*1.5;
*colg = cpart->life*1.5; *colg = cpart->life*1.5;
*colb = 200-cpart->life; *colb = 200-(cpart->life);
if (*colr>255) if (*colr>255)
*colr = 255; *colr = 255;
if (*colg>255) if (*colg>255)
@ -121,5 +123,6 @@ int graphics_EMP(GRAPHICS_FUNC_ARGS)
*colb = 255; *colb = 255;
if (*colb<=0) if (*colb<=0)
*colb = 0; *colb = 0;
}
return 0; return 0;
} }

View File

@ -3621,8 +3621,8 @@ int sdl_open(void)
glGenTextures(1, &partsFboTex); glGenTextures(1, &partsFboTex);
glBindTexture(GL_TEXTURE_2D, partsFboTex); glBindTexture(GL_TEXTURE_2D, partsFboTex);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, XRES, YRES, 0, GL_RGBA, GL_FLOAT, NULL); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, XRES, YRES, 0, GL_RGBA, GL_FLOAT, NULL);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST);
//FBO //FBO
glGenFramebuffers(1, &partsFbo); glGenFramebuffers(1, &partsFbo);