Spark graphics change and disable lensing for non-fancy displays

This commit is contained in:
Simon Robertshaw 2011-10-25 09:17:11 +01:00
parent 506ab6ea0e
commit f01056ee02
2 changed files with 32 additions and 22 deletions

View File

@ -178,11 +178,13 @@ int update_SPRK(UPDATE_FUNC_ARGS) {
int graphics_SPRK(GRAPHICS_FUNC_ARGS) int graphics_SPRK(GRAPHICS_FUNC_ARGS)
{ {
*firea = 10; //*firea = 80;
*firer = *colr*0.5; //*firer = *colr*0.5;
*fireg = *colg; //*fireg = *colg;
*fireb = *colb*2; //*fireb = *colb*2;
*pixel_mode |= FIRE_ADD; *colr *= 0.5;
*pixel_mode |= PMODE_BLUR; *colb *= 2;
//*pixel_mode |= FIRE_ADD;
*pixel_mode |= PMODE_GLOW;
return 1; return 1;
} }

View File

@ -2351,6 +2351,8 @@ void render_parts(pixel *vid)
//Drawing the FBO onto the screen sounds like a cool idea now //Drawing the FBO onto the screen sounds like a cool idea now
glEnable( GL_TEXTURE_2D ); glEnable( GL_TEXTURE_2D );
if(cmode==CM_FANCY)
{
glUseProgram(lensProg); glUseProgram(lensProg);
glActiveTexture(GL_TEXTURE0); glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, partsFboTex); glBindTexture(GL_TEXTURE_2D, partsFboTex);
@ -2366,6 +2368,11 @@ void render_parts(pixel *vid)
glActiveTexture(GL_TEXTURE0); glActiveTexture(GL_TEXTURE0);
//glUniform1f(glGetUniformLocation(lensProg, "xres"), (float)XRES); //glUniform1f(glGetUniformLocation(lensProg, "xres"), (float)XRES);
//glUniform1f(glGetUniformLocation(lensProg, "yres"), (float)YRES); //glUniform1f(glGetUniformLocation(lensProg, "yres"), (float)YRES);
}
else
{
glBindTexture(GL_TEXTURE_2D, partsFboTex);
}
glColor4f(1.0f, 1.0f, 1.0f, 1.0f); glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
glBegin(GL_QUADS); glBegin(GL_QUADS);
@ -2379,6 +2386,7 @@ void render_parts(pixel *vid)
glVertex3f(XRES*sdl_scale, 0, 1.0); glVertex3f(XRES*sdl_scale, 0, 1.0);
glEnd(); glEnd();
if(cmode==CM_FANCY)
glUseProgram(0); glUseProgram(0);
glDisable( GL_TEXTURE_2D ); glDisable( GL_TEXTURE_2D );