Formatted code of RenderDeviceJme before comming changes

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9231 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
rem..om 2012-03-04 13:39:58 +00:00
parent e275cfb7ee
commit 6087a930df

@ -29,7 +29,6 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package com.jme3.niftygui;
import com.jme3.font.BitmapText;
@ -64,22 +63,17 @@ public class RenderDeviceJme implements RenderDevice {
private NiftyJmeDisplay display;
private RenderManager rm;
private Renderer r;
private HashMap<String, BitmapText> textCacheLastFrame = new HashMap<String, BitmapText>();
private HashMap<String, BitmapText> textCacheCurrentFrame = new HashMap<String, BitmapText>();
private final Quad quad = new Quad(1, -1, true);
private final Geometry quadGeom = new Geometry("nifty-quad", quad);
private final Material niftyMat;
private final Material niftyQuadMat;
private boolean clipWasSet = false;
private BlendMode blendMode = null;
private VertexBuffer quadDefaultTC = quad.getBuffer(Type.TexCoord);
private VertexBuffer quadModTC = quadDefaultTC.clone();
private VertexBuffer quadColor;
private Matrix4f tempMat = new Matrix4f();
private ColorRGBA tempColor = new ColorRGBA();
@ -111,6 +105,7 @@ public class RenderDeviceJme implements RenderDevice {
// TODO: Cursor support
public MouseCursor createMouseCursor(String str, int x, int y) {
return new MouseCursor() {
public void dispose() {
}
};
@ -160,15 +155,16 @@ public class RenderDeviceJme implements RenderDevice {
}
private RenderState.BlendMode convertBlend() {
if (blendMode == null)
if (blendMode == null) {
return RenderState.BlendMode.Off;
else if (blendMode == BlendMode.BLEND)
} else if (blendMode == BlendMode.BLEND) {
return RenderState.BlendMode.Alpha;
else if (blendMode == BlendMode.MULIPLY)
} else if (blendMode == BlendMode.MULIPLY) {
return RenderState.BlendMode.Modulate;
else
} else {
throw new UnsupportedOperationException();
}
}
private int convertColor(Color color) {
int color2 = 0;
@ -214,11 +210,13 @@ public class RenderDeviceJme implements RenderDevice {
@Override
public void renderFont(RenderFont font, String str, int x, int y, Color color, float sizeX, float sizeY) {
if (str.length() == 0)
if (str.length() == 0) {
return;
}
if (font instanceof RenderFontNull)
if (font instanceof RenderFontNull) {
return;
}
RenderFontJme jmeFont = (RenderFontJme) font;
@ -376,7 +374,4 @@ public class RenderDeviceJme implements RenderDevice {
clipWasSet = false;
}
}
}