You can draw to a separate BufferedImage for game/UI instead of the super.graphics calls when drawing and then just draw them both to the super.graphics once the drawing cycle ends.
|
Hey
So on resizable mode everything is drawn on 1 drawing area. But I want to create a new drawing area over it, but the problem is it will constantly flash, since both drawing areas are updated on the area..
Heres a little drawing to explain why I need the new drawing area: (the black box would be the borders of the new drawing area, and the red thing represents a model) - now when this is done with drawing areas it would cut-off the parts of the model which go over the area and without it it will just draw the model completely, which doesnt really look that great.
OR is there some other way to accomplish this?
You can draw to a separate BufferedImage for game/UI instead of the super.graphics calls when drawing and then just draw them both to the super.graphics once the drawing cycle ends.
All drawing in the client is eventually drawn to an image buffer, they're usually called like RSImageProducer(?). The draw cycle is like this
Init raster for image producer
Do drawing/rendering/whatever
Draw image producer to super.graphics
You just need to change the drawing of the image producers relevant to game (usually after the scenegraph.render call) from super.graphics to a gameBufferedImage.getGraphics(), then change the super.graphics call for all the UI drawing to uiBufferedImage.getGraphics() and then at the end of the cycle, draw the gameBufferedImage then the uiBufferedImage to super.graphics.
what revision is this, looks wack
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |