public class JmeBatchRenderBackend
extends java.lang.Object
implements de.lessvoid.nifty.render.batch.spi.BatchRenderBackend
Constructor and Description |
---|
JmeBatchRenderBackend(NiftyJmeDisplay display) |
Modifier and Type | Method and Description |
---|---|
void |
addImageToAtlas(de.lessvoid.nifty.render.batch.spi.BatchRenderBackend.Image image,
int x,
int y,
int atlasTextureId) |
void |
addQuad(float x,
float y,
float width,
float height,
de.lessvoid.nifty.tools.Color color1,
de.lessvoid.nifty.tools.Color color2,
de.lessvoid.nifty.tools.Color color3,
de.lessvoid.nifty.tools.Color color4,
float textureX,
float textureY,
float textureWidth,
float textureHeight,
int textureId) |
void |
beginBatch(de.lessvoid.nifty.render.BlendMode blendMode,
int textureId) |
void |
beginFrame() |
void |
clear() |
void |
clearTextureAtlas(int atlasId) |
de.lessvoid.nifty.spi.render.MouseCursor |
createMouseCursor(java.lang.String filename,
int hotspotX,
int hotspotY) |
int |
createNonAtlasTexture(de.lessvoid.nifty.render.batch.spi.BatchRenderBackend.Image image) |
int |
createTextureAtlas(int width,
int height) |
void |
deleteNonAtlasTexture(int textureId) |
void |
disableMouseCursor() |
void |
enableMouseCursor(de.lessvoid.nifty.spi.render.MouseCursor mouseCursor) |
void |
endFrame() |
boolean |
existsNonAtlasTexture(int textureId) |
void |
fillRemovedImagesInAtlas(boolean shouldFill)
Whether or not to overwrite previously used atlas space with blank data.
|
int |
getHeight() |
int |
getWidth() |
de.lessvoid.nifty.render.batch.spi.BatchRenderBackend.Image |
loadImage(java.nio.ByteBuffer imageData,
int imageWidth,
int imageHeight) |
de.lessvoid.nifty.render.batch.spi.BatchRenderBackend.Image |
loadImage(java.lang.String filename) |
void |
removeImageFromAtlas(de.lessvoid.nifty.render.batch.spi.BatchRenderBackend.Image image,
int x,
int y,
int w,
int h,
int atlasTextureId) |
int |
render() |
void |
setRenderManager(RenderManager rm) |
void |
setResourceLoader(de.lessvoid.nifty.tools.resourceloader.NiftyResourceLoader resourceLoader) |
void |
useHighQualityTextures(boolean shouldUseHighQualityTextures)
Whether or not to render textures with high quality settings.
|
public JmeBatchRenderBackend(NiftyJmeDisplay display)
public void setRenderManager(RenderManager rm)
public void setResourceLoader(de.lessvoid.nifty.tools.resourceloader.NiftyResourceLoader resourceLoader)
setResourceLoader
in interface de.lessvoid.nifty.render.batch.spi.BatchRenderBackend
public int getWidth()
getWidth
in interface de.lessvoid.nifty.render.batch.spi.BatchRenderBackend
public int getHeight()
getHeight
in interface de.lessvoid.nifty.render.batch.spi.BatchRenderBackend
public void beginFrame()
beginFrame
in interface de.lessvoid.nifty.render.batch.spi.BatchRenderBackend
public void endFrame()
endFrame
in interface de.lessvoid.nifty.render.batch.spi.BatchRenderBackend
public void clear()
clear
in interface de.lessvoid.nifty.render.batch.spi.BatchRenderBackend
public de.lessvoid.nifty.spi.render.MouseCursor createMouseCursor(java.lang.String filename, int hotspotX, int hotspotY) throws java.io.IOException
createMouseCursor
in interface de.lessvoid.nifty.render.batch.spi.BatchRenderBackend
java.io.IOException
public void enableMouseCursor(de.lessvoid.nifty.spi.render.MouseCursor mouseCursor)
enableMouseCursor
in interface de.lessvoid.nifty.render.batch.spi.BatchRenderBackend
public void disableMouseCursor()
disableMouseCursor
in interface de.lessvoid.nifty.render.batch.spi.BatchRenderBackend
public int createTextureAtlas(int width, int height)
createTextureAtlas
in interface de.lessvoid.nifty.render.batch.spi.BatchRenderBackend
public void clearTextureAtlas(int atlasId)
clearTextureAtlas
in interface de.lessvoid.nifty.render.batch.spi.BatchRenderBackend
public de.lessvoid.nifty.render.batch.spi.BatchRenderBackend.Image loadImage(java.lang.String filename)
loadImage
in interface de.lessvoid.nifty.render.batch.spi.BatchRenderBackend
public de.lessvoid.nifty.render.batch.spi.BatchRenderBackend.Image loadImage(java.nio.ByteBuffer imageData, int imageWidth, int imageHeight)
loadImage
in interface de.lessvoid.nifty.render.batch.spi.BatchRenderBackend
public void addImageToAtlas(de.lessvoid.nifty.render.batch.spi.BatchRenderBackend.Image image, int x, int y, int atlasTextureId)
addImageToAtlas
in interface de.lessvoid.nifty.render.batch.spi.BatchRenderBackend
public int createNonAtlasTexture(de.lessvoid.nifty.render.batch.spi.BatchRenderBackend.Image image)
createNonAtlasTexture
in interface de.lessvoid.nifty.render.batch.spi.BatchRenderBackend
public void deleteNonAtlasTexture(int textureId)
deleteNonAtlasTexture
in interface de.lessvoid.nifty.render.batch.spi.BatchRenderBackend
public boolean existsNonAtlasTexture(int textureId)
existsNonAtlasTexture
in interface de.lessvoid.nifty.render.batch.spi.BatchRenderBackend
public void beginBatch(de.lessvoid.nifty.render.BlendMode blendMode, int textureId)
beginBatch
in interface de.lessvoid.nifty.render.batch.spi.BatchRenderBackend
public void addQuad(float x, float y, float width, float height, de.lessvoid.nifty.tools.Color color1, de.lessvoid.nifty.tools.Color color2, de.lessvoid.nifty.tools.Color color3, de.lessvoid.nifty.tools.Color color4, float textureX, float textureY, float textureWidth, float textureHeight, int textureId)
addQuad
in interface de.lessvoid.nifty.render.batch.spi.BatchRenderBackend
public int render()
render
in interface de.lessvoid.nifty.render.batch.spi.BatchRenderBackend
public void removeImageFromAtlas(de.lessvoid.nifty.render.batch.spi.BatchRenderBackend.Image image, int x, int y, int w, int h, int atlasTextureId)
removeImageFromAtlas
in interface de.lessvoid.nifty.render.batch.spi.BatchRenderBackend
public void useHighQualityTextures(boolean shouldUseHighQualityTextures)
BatchRenderBackend
implementationuseHighQualityTextures
in interface de.lessvoid.nifty.render.batch.spi.BatchRenderBackend
shouldUseHighQualityTextures
- public void fillRemovedImagesInAtlas(boolean shouldFill)
fillRemovedImagesInAtlas
in interface de.lessvoid.nifty.render.batch.spi.BatchRenderBackend
shouldFill
-