Well, the idea i had is to make a Rectangle grow and shrink around the player, but the effect i wanted to produce needs a cool blending.
I have something working, but i cant get semi-transparent colors. I can get fully tranparent color but not images with that stainted glass effect.
Info: >Im using Slick2D
>I dont have any previous experience with OpenGL so… go easy on me please
aMap = new Image("res/aMap.png");// I do this up. Outside the main render function
{// The function itself
if(!applyLightThing){
renderTilesAndObject();// Here i draw the image i want to blend
}else{
GL11.glEnable(GL11.GL_ALPHA_TEST);
GL11.glEnable(GL11.GL_BLEND_SRC);
GL11.glBlendFunc( GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA );
GL11.glAlphaFunc(GL11.GL_GREATER, 0.0f);
aMap.drawCentered(center.x-xOffset+10,center.y-yOffset);//Here i draw the alpha-map
g.setDrawMode(Graphics.MODE_ALPHA_BLEND);
renderTilesAndObject();// Here i draw the image i want to blend
GL11.glDisable(GL11.GL_BLEND_SRC);
GL11.glDisable(GL11.GL_ALPHA_TEST);
g.setDrawMode(Graphics.MODE_NORMAL);
}
}
What the image looks like without the alpha map thing