EntityRenderer
Inheritance: java.lang.Object
public class EntityRenderer
Subclass this to implement rendering for different kind of entities.
Constructors
Constructor | Description |
---|---|
EntityRenderer(String key, byte features) | Constructor of EntityRenderer |
EntityRenderer(String key) | Constructor of EntityRenderer |
Methods
Method | Description |
---|---|
dispose() | The entity renderer is being disposed, release shared resources. |
equals(Object arg0) | |
frameBegin(Renderer renderer, IRenderQueue renderQueue) | Begin rendering a frame |
frameEnd(Renderer renderer, IRenderQueue renderQueue) | Ends rendering a frame |
getClass() | |
hashCode() | |
initialize(Renderer renderer) | Initialize the entity renderer |
notify() | |
notifyAll() | |
prepareRenderQueue(Renderer renderer, IRenderQueue queue, Node node, Entity entity) | Prepare rendering commands for specified node/entity pair. |
renderEntity(Renderer renderer, ICommandList commandList, Node node, Object renderableResource, int subEntity) | Each render task pushed to the IRenderQueue will have a corresponding RenderEntity call to perform the concrete rendering job. |
resetSceneCache() | The scene has changed or removed, need to dispose scene-level render resources in this |
toString() | |
wait() | |
wait(long arg0) | |
wait(long arg0, int arg1) |
EntityRenderer(String key, byte features)
public EntityRenderer(String key, byte features)
Constructor of EntityRenderer
Parameters:
Parameter | Type | Description |
---|---|---|
key | java.lang.String | The key of the entity renderer |
features | byte | The extra features of the entity renderer |
EntityRenderer(String key)
public EntityRenderer(String key)
Constructor of EntityRenderer
Parameters:
Parameter | Type | Description |
---|---|---|
key | java.lang.String | The key of the entity renderer |
dispose()
public void dispose()
The entity renderer is being disposed, release shared resources.
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.lang.Object |
Returns: boolean
frameBegin(Renderer renderer, IRenderQueue renderQueue)
public void frameBegin(Renderer renderer, IRenderQueue renderQueue)
Begin rendering a frame
Parameters:
Parameter | Type | Description |
---|---|---|
renderer | Renderer | Current renderer |
renderQueue | IRenderQueue | Render queue |
frameEnd(Renderer renderer, IRenderQueue renderQueue)
public void frameEnd(Renderer renderer, IRenderQueue renderQueue)
Ends rendering a frame
Parameters:
Parameter | Type | Description |
---|---|---|
renderer | Renderer | Current renderer |
renderQueue | IRenderQueue | Render queue |
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
hashCode()
public native int hashCode()
Returns: int
initialize(Renderer renderer)
public void initialize(Renderer renderer)
Initialize the entity renderer
Parameters:
Parameter | Type | Description |
---|---|---|
renderer | Renderer |
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
prepareRenderQueue(Renderer renderer, IRenderQueue queue, Node node, Entity entity)
public void prepareRenderQueue(Renderer renderer, IRenderQueue queue, Node node, Entity entity)
Prepare rendering commands for specified node/entity pair.
Parameters:
Parameter | Type | Description |
---|---|---|
renderer | Renderer | The current renderer instance |
queue | IRenderQueue | The render queue used to manage render tasks |
node | Node | Current node |
entity | Entity | The entity that need to be rendered |
renderEntity(Renderer renderer, ICommandList commandList, Node node, Object renderableResource, int subEntity)
public void renderEntity(Renderer renderer, ICommandList commandList, Node node, Object renderableResource, int subEntity)
Each render task pushed to the IRenderQueue will have a corresponding RenderEntity call to perform the concrete rendering job.
Parameters:
Parameter | Type | Description |
---|---|---|
renderer | Renderer | The renderer |
commandList | ICommandList | The commandList used to record the rendering commands |
node | Node | The same node that passed to PrepareRenderQueue of the entity that will be rendered |
renderableResource | java.lang.Object | The custom object that passed to IRenderQueue during the PrepareRenderQueue |
subEntity | int | The index of the sub entity that passed to IRenderQueue |
resetSceneCache()
public void resetSceneCache()
The scene has changed or removed, need to dispose scene-level render resources in this
toString()
public String toString()
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final void wait(long arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |