Class GlDevice
java.lang.Object
com.mojang.blaze3d.opengl.GlDevice
- All Implemented Interfaces:
GpuDeviceBackend
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BufferStorageprivate final GlDebugLabelprivate final ShaderSourceprivate final DeviceInfoprivate final DirectStateAccessprivate final GlCommandEncoderprivate final FrameBufferCacheprivate static final org.slf4j.Loggerprivate final Map<RenderPipeline, GlRenderPipeline> private final Map<GlDevice.ShaderCompilationKey, GlShaderModule> protected static booleanprotected static booleanprotected static booleanprotected static booleanprotected static booleanprotected static booleanprotected static booleanprotected static booleanprotected static booleanprotected static booleanprivate final VertexArrayCache -
Constructor Summary
ConstructorsConstructorDescriptionGlDevice(long windowHandle, ShaderSource defaultShaderSource, GpuDebugOptions debugOptions) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidclose()private GlRenderPipelinecompilePipeline(RenderPipeline pipeline, ShaderSource shaderSource) private GlProgramcompileProgram(RenderPipeline pipeline, ShaderSource shaderSource) private GlShaderModulecompileShader(GlDevice.ShaderCompilationKey key, ShaderSource shaderSource) createBuffer(@Nullable Supplier<String> label, int usage, long size) createBuffer(@Nullable Supplier<String> label, int usage, ByteBuffer data) createSampler(AddressMode addressModeU, AddressMode addressModeV, FilterMode minFilter, FilterMode magFilter, int maxAnisotropy, OptionalDouble maxLod) createSurface(long windowHandle) createTexture(@Nullable String label, int usage, GpuFormat format, int width, int height, int depthOrLayers, int mipLevels) createTexture(@Nullable Supplier<String> label, int usage, GpuFormat format, int width, int height, int depthOrLayers, int mipLevels) createTextureView(GpuTexture texture) createTextureView(GpuTexture texture, int baseMipLevel, int mipLevels) createTimestampQueryPool(int size) protected GlRenderPipelinegetOrCompilePipeline(RenderPipeline pipeline) protected GlShaderModulegetOrCompileShader(Identifier id, ShaderType type, ShaderDefines defines, ShaderSource shaderSource) longbooleanprecompilePipeline(RenderPipeline pipeline, @Nullable ShaderSource customShaderSource) private static void
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
USE_GL_ARB_vertex_attrib_binding
protected static boolean USE_GL_ARB_vertex_attrib_binding -
USE_GL_KHR_debug
protected static boolean USE_GL_KHR_debug -
USE_GL_EXT_debug_label
protected static boolean USE_GL_EXT_debug_label -
USE_GL_ARB_debug_output
protected static boolean USE_GL_ARB_debug_output -
USE_GL_ARB_direct_state_access
protected static boolean USE_GL_ARB_direct_state_access -
USE_GL_ARB_buffer_storage
protected static boolean USE_GL_ARB_buffer_storage -
USE_GL_ARB_base_instance
protected static boolean USE_GL_ARB_base_instance -
USE_GL_ARB_draw_indirect
protected static boolean USE_GL_ARB_draw_indirect -
USE_GL_ARB_multi_draw_indirect
protected static boolean USE_GL_ARB_multi_draw_indirect -
USE_GL_ARB_shader_draw_parameters
protected static boolean USE_GL_ARB_shader_draw_parameters -
encoder
-
debugLog
-
debugLabels
-
directStateAccess
-
defaultShaderSource
-
pipelineCache
-
shaderCache
-
frameBufferCache
-
vertexArrayCache
-
bufferStorage
-
deviceInfo
-
-
Constructor Details
-
GlDevice
-
-
Method Details
-
debugLabels
-
createSurface
- Specified by:
createSurfacein interfaceGpuDeviceBackend
-
createCommandEncoder
- Specified by:
createCommandEncoderin interfaceGpuDeviceBackend
-
createSampler
public GpuSampler createSampler(AddressMode addressModeU, AddressMode addressModeV, FilterMode minFilter, FilterMode magFilter, int maxAnisotropy, OptionalDouble maxLod) - Specified by:
createSamplerin interfaceGpuDeviceBackend
-
createTexture
public GpuTexture createTexture(@Nullable Supplier<String> label, int usage, GpuFormat format, int width, int height, int depthOrLayers, int mipLevels) - Specified by:
createTexturein interfaceGpuDeviceBackend
-
createTexture
public GpuTexture createTexture(@Nullable String label, int usage, GpuFormat format, int width, int height, int depthOrLayers, int mipLevels) - Specified by:
createTexturein interfaceGpuDeviceBackend
-
createTextureView
- Specified by:
createTextureViewin interfaceGpuDeviceBackend
-
createTextureView
- Specified by:
createTextureViewin interfaceGpuDeviceBackend
-
createBuffer
- Specified by:
createBufferin interfaceGpuDeviceBackend
-
createBuffer
- Specified by:
createBufferin interfaceGpuDeviceBackend
-
getLastDebugMessages
- Specified by:
getLastDebugMessagesin interfaceGpuDeviceBackend
-
isDebuggingEnabled
public boolean isDebuggingEnabled()- Specified by:
isDebuggingEnabledin interfaceGpuDeviceBackend
-
clearPipelineCache
public void clearPipelineCache()- Specified by:
clearPipelineCachein interfaceGpuDeviceBackend
-
sacrificeShaderToOpenGlAndAmd
private static void sacrificeShaderToOpenGlAndAmd() -
close
public void close()- Specified by:
closein interfaceGpuDeviceBackend
-
directStateAccess
-
getOrCompilePipeline
-
getOrCompileShader
protected GlShaderModule getOrCompileShader(Identifier id, ShaderType type, ShaderDefines defines, ShaderSource shaderSource) -
precompilePipeline
public GlRenderPipeline precompilePipeline(RenderPipeline pipeline, @Nullable ShaderSource customShaderSource) - Specified by:
precompilePipelinein interfaceGpuDeviceBackend
-
compileShader
-
compileProgram
-
compilePipeline
-
vertexArrayCache
-
getBufferStorage
-
frameBufferCache
-
createTimestampQueryPool
- Specified by:
createTimestampQueryPoolin interfaceGpuDeviceBackend
-
getTimestampNow
public long getTimestampNow()- Specified by:
getTimestampNowin interfaceGpuDeviceBackend
-
getDeviceInfo
- Specified by:
getDeviceInfoin interfaceGpuDeviceBackend
-