Package com.mojang.blaze3d.platform
Class GlStateManager
java.lang.Object
com.mojang.blaze3d.platform.GlStateManager
@Environment(CLIENT) public class GlStateManager extends Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classGlStateManager.AlphaTestStateDeprecated.(package private) static classGlStateManager.BlendFuncState(package private) static classGlStateManager.CapabilityTracker(package private) static classGlStateManager.class_5518(package private) static classGlStateManager.Color4Deprecated.(package private) static classGlStateManager.ColorMask(package private) static classGlStateManager.ColorMaterialStateDeprecated.(package private) static classGlStateManager.CullFaceState(package private) static classGlStateManager.DepthTestStatestatic classGlStateManager.DstFactorstatic classGlStateManager.FBOBlitModestatic classGlStateManager.FBOModestatic classGlStateManager.FogModeDeprecated.(package private) static classGlStateManager.FogStateDeprecated.static classGlStateManager.LogicOp(package private) static classGlStateManager.LogicOpState(package private) static classGlStateManager.PolygonOffsetStatestatic classGlStateManager.SrcFactor(package private) static classGlStateManager.StencilState(package private) static classGlStateManager.StencilSubStatestatic classGlStateManager.TexCoordDeprecated.(package private) static classGlStateManager.TexGenCoordStateDeprecated.(package private) static classGlStateManager.TexGenStateDeprecated.(package private) static classGlStateManager.Texture2DStatestatic classGlStateManager.Viewport -
Field Summary
-
Constructor Summary
Constructors Constructor Description GlStateManager() -
Method Summary
Modifier and Type Method Description static voidactiveTexture(int texture)static voidactiveTextureUntracked(int texture)static voidalphaFunc(int func, float ref)Deprecated.static voidattachShader(int program, int shader)static voidbindBuffers(int target, int buffer)static voidbindFramebuffer(int target, int framebuffer)static voidbindTexture(int texture)static voidblendColor(float red, float green, float blue, float alpha)static voidblendEquation(int mode)static voidblendFunc(int srcFactor, int dstFactor)static voidblendFuncSeparate(int srcFactorRGB, int dstFactorRGB, int srcFactorAlpha, int dstFactorAlpha)static voidblendFuncSeparateUntracked(int srcFactorRGB, int dstFactorRGB, int srcFactorAlpha, int dstFactorAlpha)static voidblitFramebuffer(int int2, int int3, int int4, int int5, int int6, int int7, int int8, int int9, int int10, int int11)static voidbufferData(int target, ByteBuffer data, int usage)static intcheckFramebufferStatus(int target)static voidclear(int mask, boolean getError)static voidclearColor(float red, float green, float blue, float alpha)static voidclearCurrentColor()Deprecated.static voidclearDepth(double depth)static voidclearStencil(int stencil)static voidclearTexGen()static voidclientActiveTexture(int texture)Deprecated.static voidcolor4f(float red, float green, float blue, float alpha)Deprecated.static voidcolorMask(boolean red, boolean green, boolean blue, boolean alpha)static voidcolorMaterial(int face, int mode)Deprecated.static voidcolorPointer(int size, int type, int stride, long pointer)Deprecated.private static voidcombineAlpha(int combineAlpha, int source0Alpha)private static voidcombineColor(int combineColor, int source0Color)private static voidcombineColor(int combineColor, int source0Color, int source1Color, int source2Color)static voidcompileShader(int shader)static voidcopyTexSubImage2d(int int2, int int3, int int4, int int5, int int6, int int7, int int8, int int9)static intcreateProgram()static intcreateShader(int type)static voiddeleteBuffers(int buffer)static voiddeleteFramebuffers(int framebuffers)static voiddeleteProgram(int program)static voiddeleteShader(int shader)static voiddeleteTexture(int texture)static voiddepthFunc(int func)static voiddepthMask(boolean mask)static voiddisableAlphaTest()Deprecated.static voiddisableBlend()static voiddisableClientState(int cap)Deprecated.static voiddisableColorLogicOp()static voiddisableColorMaterial()Deprecated.static voiddisableCull()static voiddisableDepthTest()static voiddisableFog()Deprecated.static voiddisableLighting()Deprecated.static voiddisableLineOffset()static voiddisablePolygonOffset()static voiddisableRescaleNormal()Deprecated.static voiddisableTexGen(GlStateManager.TexCoord coord)Deprecated.static voiddisableTexture()static voiddrawArrays(int mode, int first, int count, long long2)static voidenableAlphaTest()Deprecated.static voidenableBlend()static voidenableClientState(int cap)Deprecated.static voidenableColorLogicOp()static voidenableColorMaterial()Deprecated.static voidenableCull()static voidenableDepthTest()static voidenableFog()Deprecated.static voidenableLight(int light)Deprecated.static voidenableLighting()Deprecated.static voidenableLineOffset()static voidenablePolygonOffset()static voidenableRescaleNormal()Deprecated.static voidenableTexGen(GlStateManager.TexCoord coord)Deprecated.static voidenableTexture()static voidenableVertexAttribArray(int index)static voidfog(int pname, float[] params)Deprecated.static voidfogDensity(float density)Deprecated.static voidfogEnd(float end)Deprecated.static voidfogi(int pname, int param)Deprecated.static voidfogMode(int mode)Deprecated.static voidfogStart(float start)Deprecated.static voidframebufferTexture2D(int target, int attachment, int textureTarget, int texture, int level)static intgenBuffers()static intgenFramebuffers()static intgenTextures()static intgetActiveBoundTexture()Deprecated.static intgetAttribLocation(int program, CharSequence name)private static FloatBuffergetBuffer(float a, float b, float c, float d)static intgetError()static voidgetFloat(int pname, FloatBuffer params)Deprecated.static intgetFramebufferDepthAttachment()private static GlStateManager.TexGenCoordStategetGenCoordState(GlStateManager.TexCoord coord)Deprecated.static intgetInteger(int pname)static intgetProgram(int program, int pname)static StringgetProgramInfoLog(int program, int maxLength)static intgetShader(int shader, int pname)static StringgetShaderInfoLog(int shader, int maxLength)static StringgetString(int name)static voidgetTexImage(int target, int level, int format, int type, long pixels)static intgetTexLevelParameter(int target, int level, int pname)static intgetUniformLocation(int program, CharSequence name)static StringinitFramebufferSupport(GLCapabilities capabilities)Configures the frame buffer and populatesFramebufferInfowith the appropriate constants for the current GLCapabilities.static voidlight(int light, int pname, FloatBuffer params)Deprecated.static voidlightModel(int pname, FloatBuffer params)Deprecated.static voidlineWidth(float width)static voidlinkProgram(int program)static voidloadIdentity()Deprecated.static voidlogicOp(int op)static voidmatrixMode(int mode)Deprecated.static voidmethod_22607(int index)static voidmethod_30498(int[] int2)static voidmethod_30499(int[] int2)static voidmethod_31317(int int2, int int3, int int4, int int5)static voidmethod_31318()static voidmethod_31319()static voidmethod_31945(int int2, long long2, int int3)static ByteBuffermethod_31946(int int2, int int3)static voidmethod_31947(int int2)static voidmulTextureByProjModelView()static voidmultiTexCoords2f(int texture, float s, float t)Deprecated.static voidmultMatrix(FloatBuffer matrix)Deprecated.static voidmultMatrix(Matrix4f matrix)Deprecated.static voidnormal3f(float nx, float ny, float nz)Deprecated.static voidnormalPointer(int type, int stride, long pointer)Deprecated.static voidortho(double l, double r, double b, double t, double n, double f)Deprecated.static voidpixelStore(int pname, int param)static voidpixelTransfer(int pname, float param)static voidpolygonMode(int face, int mode)static voidpolygonOffset(float factor, float units)static voidpopAttributes()Deprecated.static voidpopMatrix()Deprecated.static voidpushLightingAttributes()Deprecated.static voidpushMatrix()Deprecated.static voidpushTextureAttributes()Deprecated.static voidreadPixels(int x, int y, int width, int height, int format, int type, ByteBuffer pixels)static voidrotatef(float angle, float x, float y, float z)Deprecated.static voidscaled(double x, double y, double z)Deprecated.static voidscalef(float x, float y, float z)Deprecated.static voidsetupEndPortalTexGen()static voidsetupGui3dDiffuseLighting(Vec3f vec3f, Vec3f vec3f2)static voidsetupGuiFlatDiffuseLighting(Vec3f vec3f, Vec3f vec3f2)static voidsetupLevelDiffuseLighting(Vec3f vec3f, Vec3f vec3f2, Matrix4f matrix4f)static voidsetupOutline()static voidsetupOverlayColor(int texture, int size)static voidshadeModel(int mode)Deprecated.static voidshaderSource(int shader, CharSequence source)static voidstencilFunc(int func, int ref, int mask)static voidstencilMask(int mask)static voidstencilOp(int sfail, int dpfail, int dppass)static booleansupportsGl30()static voidteardownOutline()static voidteardownOverlayColor()static voidtexCoordPointer(int size, int type, int stride, long pointer)Deprecated.static voidtexEnv(int target, int pname, int param)Deprecated.static voidtexGenMode(GlStateManager.TexCoord coord, int mode)Deprecated.static voidtexGenParam(GlStateManager.TexCoord coord, int pname, FloatBuffer params)Deprecated.static voidtexImage2D(int target, int level, int internalFormat, int width, int height, int border, int format, int type, IntBuffer pixels)static voidtexParameter(int target, int pname, float param)static voidtexParameter(int target, int pname, int param)static voidtexSubImage2D(int target, int level, int offsetX, int offsetY, int width, int height, int format, int type, long pixels)static voidtranslated(double x, double y, double z)Deprecated.static voidtranslatef(float x, float y, float z)Deprecated.static voiduniform1(int location, int value)static voiduniform1(int location, FloatBuffer value)static voiduniform1(int location, IntBuffer value)static voiduniform2(int location, FloatBuffer value)static voiduniform2(int location, IntBuffer value)static voiduniform3(int location, FloatBuffer value)static voiduniform3(int location, IntBuffer value)static voiduniform4(int location, FloatBuffer value)static voiduniform4(int location, IntBuffer value)static voiduniformMatrix2(int location, boolean transpose, FloatBuffer value)static voiduniformMatrix3(int location, boolean transpose, FloatBuffer value)static voiduniformMatrix4(int location, boolean transpose, FloatBuffer value)static voiduseProgram(int program)static voidvertexAttribPointer(int index, int size, int type, boolean normalized, int stride, long pointer)static voidvertexPointer(int size, int type, int stride, long pointer)Deprecated.static voidviewport(int x, int y, int width, int height)
-
Field Details
-
MATRIX_BUFFER
-
ALPHA_TEST
-
LIGHTING
-
LIGHT_ENABLE
-
COLOR_MATERIAL
-
BLEND
-
DEPTH
-
FOG
-
CULL
-
POLY_OFFSET
-
COLOR_LOGIC
-
TEX_GEN
-
STENCIL
-
field_26839
-
colorBuffer
-
activeTexture
private static int activeTexture -
TEXTURES
-
modelShadeMode
private static int modelShadeMode -
RESCALE_NORMAL
-
COLOR_MASK
-
COLOR
-
fboMode
-
fboBlitMode
-
-
Constructor Details
-
GlStateManager
public GlStateManager()
-
-
Method Details
-
pushLightingAttributes
Deprecated. -
pushTextureAttributes
Deprecated. -
popAttributes
Deprecated. -
disableAlphaTest
Deprecated. -
enableAlphaTest
Deprecated. -
alphaFunc
Deprecated. -
enableLighting
Deprecated. -
disableLighting
Deprecated. -
enableLight
Deprecated. -
enableColorMaterial
Deprecated. -
disableColorMaterial
Deprecated. -
colorMaterial
Deprecated. -
light
Deprecated. -
lightModel
Deprecated. -
normal3f
Deprecated. -
method_31318
public static void method_31318() -
method_31319
public static void method_31319() -
method_31317
public static void method_31317(int int2, int int3, int int4, int int5) -
disableDepthTest
public static void disableDepthTest() -
enableDepthTest
public static void enableDepthTest() -
depthFunc
public static void depthFunc(int func) -
depthMask
public static void depthMask(boolean mask) -
disableBlend
public static void disableBlend() -
enableBlend
public static void enableBlend() -
blendFunc
public static void blendFunc(int srcFactor, int dstFactor) -
blendFuncSeparate
public static void blendFuncSeparate(int srcFactorRGB, int dstFactorRGB, int srcFactorAlpha, int dstFactorAlpha) -
blendColor
public static void blendColor(float red, float green, float blue, float alpha) -
blendEquation
public static void blendEquation(int mode) -
initFramebufferSupport
Configures the frame buffer and populatesFramebufferInfowith the appropriate constants for the current GLCapabilities.- Returns:
- human-readable string representing the selected frame buffer technology
- Throws:
IllegalStateException- if no known frame buffer technology is supported
-
getProgram
public static int getProgram(int program, int pname) -
attachShader
public static void attachShader(int program, int shader) -
deleteShader
public static void deleteShader(int shader) -
createShader
public static int createShader(int type) -
shaderSource
-
compileShader
public static void compileShader(int shader) -
getShader
public static int getShader(int shader, int pname) -
useProgram
public static void useProgram(int program) -
createProgram
public static int createProgram() -
deleteProgram
public static void deleteProgram(int program) -
linkProgram
public static void linkProgram(int program) -
getUniformLocation
-
uniform1
-
uniform1
public static void uniform1(int location, int value) -
uniform1
-
uniform2
-
uniform2
-
uniform3
-
uniform3
-
uniform4
-
uniform4
-
uniformMatrix2
-
uniformMatrix3
-
uniformMatrix4
-
getAttribLocation
-
genBuffers
public static int genBuffers() -
bindBuffers
public static void bindBuffers(int target, int buffer) -
bufferData
-
method_31945
public static void method_31945(int int2, long long2, int int3) -
method_31946
-
method_31947
public static void method_31947(int int2) -
deleteBuffers
public static void deleteBuffers(int buffer) -
copyTexSubImage2d
public static void copyTexSubImage2d(int int2, int int3, int int4, int int5, int int6, int int7, int int8, int int9) -
bindFramebuffer
public static void bindFramebuffer(int target, int framebuffer) -
getFramebufferDepthAttachment
public static int getFramebufferDepthAttachment() -
blitFramebuffer
public static void blitFramebuffer(int int2, int int3, int int4, int int5, int int6, int int7, int int8, int int9, int int10, int int11) -
deleteFramebuffers
public static void deleteFramebuffers(int framebuffers) -
genFramebuffers
public static int genFramebuffers() -
checkFramebufferStatus
public static int checkFramebufferStatus(int target) -
framebufferTexture2D
public static void framebufferTexture2D(int target, int attachment, int textureTarget, int texture, int level) -
getActiveBoundTexture
Deprecated. -
activeTextureUntracked
public static void activeTextureUntracked(int texture) -
clientActiveTexture
Deprecated. -
multiTexCoords2f
Deprecated. -
blendFuncSeparateUntracked
public static void blendFuncSeparateUntracked(int srcFactorRGB, int dstFactorRGB, int srcFactorAlpha, int dstFactorAlpha) -
getShaderInfoLog
-
getProgramInfoLog
-
setupOutline
public static void setupOutline() -
teardownOutline
public static void teardownOutline() -
setupOverlayColor
public static void setupOverlayColor(int texture, int size) -
teardownOverlayColor
public static void teardownOverlayColor() -
combineColor
private static void combineColor(int combineColor, int source0Color) -
combineColor
private static void combineColor(int combineColor, int source0Color, int source1Color, int source2Color) -
combineAlpha
private static void combineAlpha(int combineAlpha, int source0Alpha) -
setupLevelDiffuseLighting
-
setupGuiFlatDiffuseLighting
-
setupGui3dDiffuseLighting
-
getBuffer
-
setupEndPortalTexGen
public static void setupEndPortalTexGen() -
clearTexGen
public static void clearTexGen() -
mulTextureByProjModelView
public static void mulTextureByProjModelView() -
enableFog
Deprecated. -
disableFog
Deprecated. -
fogMode
Deprecated. -
fogDensity
Deprecated. -
fogStart
Deprecated. -
fogEnd
Deprecated. -
fog
Deprecated. -
fogi
Deprecated. -
enableCull
public static void enableCull() -
disableCull
public static void disableCull() -
polygonMode
public static void polygonMode(int face, int mode) -
enablePolygonOffset
public static void enablePolygonOffset() -
disablePolygonOffset
public static void disablePolygonOffset() -
enableLineOffset
public static void enableLineOffset() -
disableLineOffset
public static void disableLineOffset() -
polygonOffset
public static void polygonOffset(float factor, float units) -
enableColorLogicOp
public static void enableColorLogicOp() -
disableColorLogicOp
public static void disableColorLogicOp() -
logicOp
public static void logicOp(int op) -
enableTexGen
Deprecated. -
disableTexGen
Deprecated. -
texGenMode
Deprecated. -
texGenParam
@Deprecated public static void texGenParam(GlStateManager.TexCoord coord, int pname, FloatBuffer params)Deprecated. -
getGenCoordState
@Deprecated private static GlStateManager.TexGenCoordState getGenCoordState(GlStateManager.TexCoord coord)Deprecated. -
activeTexture
public static void activeTexture(int texture) -
enableTexture
public static void enableTexture() -
disableTexture
public static void disableTexture() -
texEnv
Deprecated. -
texParameter
public static void texParameter(int target, int pname, float param) -
texParameter
public static void texParameter(int target, int pname, int param) -
getTexLevelParameter
public static int getTexLevelParameter(int target, int level, int pname) -
genTextures
public static int genTextures() -
method_30498
public static void method_30498(int[] int2) -
deleteTexture
public static void deleteTexture(int texture) -
method_30499
public static void method_30499(int[] int2) -
bindTexture
public static void bindTexture(int texture) -
texImage2D
-
texSubImage2D
public static void texSubImage2D(int target, int level, int offsetX, int offsetY, int width, int height, int format, int type, long pixels) -
getTexImage
public static void getTexImage(int target, int level, int format, int type, long pixels) -
shadeModel
Deprecated. -
enableRescaleNormal
Deprecated. -
disableRescaleNormal
Deprecated. -
viewport
public static void viewport(int x, int y, int width, int height) -
colorMask
public static void colorMask(boolean red, boolean green, boolean blue, boolean alpha) -
stencilFunc
public static void stencilFunc(int func, int ref, int mask) -
stencilMask
public static void stencilMask(int mask) -
stencilOp
public static void stencilOp(int sfail, int dpfail, int dppass) -
clearDepth
public static void clearDepth(double depth) -
clearColor
public static void clearColor(float red, float green, float blue, float alpha) -
clearStencil
public static void clearStencil(int stencil) -
clear
public static void clear(int mask, boolean getError) -
matrixMode
Deprecated. -
loadIdentity
Deprecated. -
pushMatrix
Deprecated. -
popMatrix
Deprecated. -
getFloat
Deprecated. -
ortho
Deprecated. -
rotatef
Deprecated. -
scalef
Deprecated. -
scaled
Deprecated. -
translatef
Deprecated. -
translated
Deprecated. -
multMatrix
Deprecated. -
multMatrix
Deprecated. -
color4f
Deprecated. -
clearCurrentColor
Deprecated. -
normalPointer
Deprecated. -
texCoordPointer
Deprecated. -
vertexPointer
Deprecated. -
colorPointer
Deprecated. -
vertexAttribPointer
public static void vertexAttribPointer(int index, int size, int type, boolean normalized, int stride, long pointer) -
enableClientState
Deprecated. -
disableClientState
Deprecated. -
enableVertexAttribArray
public static void enableVertexAttribArray(int index) -
method_22607
public static void method_22607(int index) -
drawArrays
public static void drawArrays(int mode, int first, int count, long long2) -
lineWidth
public static void lineWidth(float width) -
pixelStore
public static void pixelStore(int pname, int param) -
pixelTransfer
public static void pixelTransfer(int pname, float param) -
readPixels
public static void readPixels(int x, int y, int width, int height, int format, int type, ByteBuffer pixels) -
getError
public static int getError() -
getString
-
getInteger
public static int getInteger(int pname) -
supportsGl30
public static boolean supportsGl30()
-