Class TextureRenderer
java.lang.Object
org.collebol.client.gui.graphics.renderer.Renderer
org.collebol.client.gui.graphics.renderer.TextureRenderer
This class contains everything you need to render Textures on a Panel.
- Since:
- 1.0-dev
- Author:
- ColleBol - contact@collebol.org
-
Constructor Summary
ConstructorsConstructorDescriptionTextureRenderer(String name, float width, float height) TextureRenderer(String name, EJGEngine e) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyLight(int id, Light light, float scale, float[] ambientColor) getName()getTexture(int id) voidregisterTexture(Texture texture) voidRender a texture from a registered id.voidrenderBatch(Batch batch, boolean lighting) Renders a batch of items using a specified texture.
-
Constructor Details
-
TextureRenderer
-
TextureRenderer
-
-
Method Details
-
renderBatch
Renders a batch of items using a specified texture. This method iterates through each item in the batch, applies transformations (translation, rotation, scaling), and renders the item as a textured quad.- Parameters:
batch- the batch of items to be renderedlighting- whether to enable lighting during rendering
-
applyLight
-
registerTexture
-
getTexture
-
getName