I have a code that's somewhat like this:
Code:
class _ extends BasicGame{
...
public void render(GameContainer gc, Graphics g) throws SlickException{
myObj.myRender();
}
}
class myObj{
Image image;
...
public void myRender() throws SlickException{
image.getGraphics().setDrawMode(Graphics.MODE_ADD);
image.draw(x, y);
image.getGraphics().setDrawMode(Graphics.MODE_NORMAL);
}
}
When I run the program, nothing gets drawn (and it freezes)... so I'm assuming this code is wrong.
Is there a way to set the draw mode for one image?
I want to avoid changing myRender() to myRender(Graphics g) if possible, because all of my other myRender() methods (the ones that don't change the blend mode) work fine.