Class WorldRenderer
- java.lang.Object
-
- net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer
-
public class WorldRenderer extends java.lang.ObjectCopyright (c) 2022-2023 LAX1DUDE. All Rights Reserved. WITH THE EXCEPTION OF PATCH FILES, MINIFIED JAVASCRIPT, AND ALL FILES NORMALLY FOUND IN AN UNMODIFIED MINECRAFT RESOURCE PACK, YOU ARE NOT ALLOWED TO SHARE, DISTRIBUTE, OR REPURPOSE ANY FILE USED BY OR PRODUCED BY THE SOFTWARE IN THIS REPOSITORY WITHOUT PRIOR PERMISSION FROM THE PROJECT AUTHOR. NOT FOR COMMERCIAL OR MALICIOUS USE (please read the 'LICENSE' file this repo's root directory for more info)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classWorldRenderer.State
-
Constructor Summary
Constructors Constructor Description WorldRenderer(int bufferSizeIn)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddVertexData(int[] vertexData)adds cached vertex data to the buffervoidbegin(int parInt1, VertexFormat parVertexFormat)WorldRenderercolor(float parFloat1, float parFloat2, float parFloat3, float parFloat4)sets color of current vertexWorldRenderercolor(int parInt1, int parInt2, int parInt3, int parInt4)sets color of current vertexvoidendVertex()increases the index of the current vertex by 1voidfinalize()voidfinishDrawing()voidfree()WorldRenderer.Statefunc_181672_a()SLOW AND STUPID UPLOAD QUEUE SYSTEM, MUST BE REPLACEDvoidfunc_181674_a(float parFloat1, float parFloat2, float parFloat3)MOST LIKELY USED TO SORT QUADS BACK TO FRONTByteBuffergetByteBuffer()intgetDrawMode()intgetVertexCount()VertexFormatgetVertexFormat()WorldRendererlightmap(int parInt1, int parInt2)voidmarkDirty()Marks the current renderer data as dirty (makes it skip certain calls)WorldRenderernormal(float parFloat1, float parFloat2, float parFloat3)set normal of current vertexWorldRendererpos(double parDouble1, double parDouble2, double parDouble3)sets position of current vertexvoidputBrightness4(int parInt1, int parInt2, int parInt3, int parInt4)update lightmap color of the last 4 verticies, used in AO calculationvoidputColor4(int argb)voidputColorMultiplier(float red, float green, float blue, int parInt1)multiplies the color of a vertex parInt1 indicies before the current vertex, skips if !this.needsUpdatevoidputColorRGB_F(float red, float green, float blue, int parInt1)sets color multiplier of a vertex parInt1 indicies before the current vertexvoidputColorRGB_F4(float red, float green, float blue)voidputNormal(float x, float y, float z)sets the normal of the previous 4 verticies in the buffervoidputPosition(double x, double y, double z)translates the last 4 verticies to the given position plus current offsetvoidreset()voidsetTranslation(double x, double y, double z)sets translation applied to all positions set by functionsvoidsetVertexState(WorldRenderer.State state)SLOW AND STUPID COMPANION FUNCTION TO 'func_181672_a'WorldRenderertex(double parDouble1, double parDouble2)
-
-
-
Method Detail
-
free
public void free()
-
finalize
public void finalize()
- Overrides:
finalizein classjava.lang.Object
-
func_181674_a
public void func_181674_a(float parFloat1, float parFloat2, float parFloat3)MOST LIKELY USED TO SORT QUADS BACK TO FRONT
-
func_181672_a
public WorldRenderer.State func_181672_a()
SLOW AND STUPID UPLOAD QUEUE SYSTEM, MUST BE REPLACED
-
setVertexState
public void setVertexState(WorldRenderer.State state)
SLOW AND STUPID COMPANION FUNCTION TO 'func_181672_a'
-
reset
public void reset()
-
begin
public void begin(int parInt1, VertexFormat parVertexFormat)
-
tex
public WorldRenderer tex(double parDouble1, double parDouble2)
-
lightmap
public WorldRenderer lightmap(int parInt1, int parInt2)
-
putBrightness4
public void putBrightness4(int parInt1, int parInt2, int parInt3, int parInt4)update lightmap color of the last 4 verticies, used in AO calculation
-
putPosition
public void putPosition(double x, double y, double z)translates the last 4 verticies to the given position plus current offset
-
putColorMultiplier
public void putColorMultiplier(float red, float green, float blue, int parInt1)multiplies the color of a vertex parInt1 indicies before the current vertex, skips if !this.needsUpdate
-
putColorRGB_F
public void putColorRGB_F(float red, float green, float blue, int parInt1)sets color multiplier of a vertex parInt1 indicies before the current vertex
-
markDirty
public void markDirty()
Marks the current renderer data as dirty (makes it skip certain calls)
-
color
public WorldRenderer color(float parFloat1, float parFloat2, float parFloat3, float parFloat4)
sets color of current vertex
-
color
public WorldRenderer color(int parInt1, int parInt2, int parInt3, int parInt4)
sets color of current vertex
-
addVertexData
public void addVertexData(int[] vertexData)
adds cached vertex data to the buffer
-
endVertex
public void endVertex()
increases the index of the current vertex by 1
-
pos
public WorldRenderer pos(double parDouble1, double parDouble2, double parDouble3)
sets position of current vertex
-
putNormal
public void putNormal(float x, float y, float z)sets the normal of the previous 4 verticies in the buffer
-
normal
public WorldRenderer normal(float parFloat1, float parFloat2, float parFloat3)
set normal of current vertex
-
setTranslation
public void setTranslation(double x, double y, double z)sets translation applied to all positions set by functions
-
finishDrawing
public void finishDrawing()
-
getByteBuffer
public ByteBuffer getByteBuffer()
-
getVertexFormat
public VertexFormat getVertexFormat()
-
getVertexCount
public int getVertexCount()
-
getDrawMode
public int getDrawMode()
-
putColor4
public void putColor4(int argb)
-
putColorRGB_F4
public void putColorRGB_F4(float red, float green, float blue)
-
-