Class GlDevice
java.lang.Object
com.mojang.renderpearl.backend.opengl.GlDevice
- All Implemented Interfaces:
GpuDeviceBackend
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BufferStorageprivate longprivate final GlDebugLabelprivate final DeviceInfoprivate final DirectStateAccessprivate final GlCommandEncoderprivate final FrameBufferCacheprivate final longprivate final GlHeuristicsprivate final longprivate static final org.slf4j.Loggerprivate final GlPipelineRecompilerprivate booleanprotected static booleanprotected static booleanprotected static booleanprotected static booleanprotected static booleanprotected static booleanprotected static booleanprotected static booleanprotected static booleanprotected static booleanprivate final BiFunction<GlProgram, BackendRenderPipeline.CreateInfo, VertexArray> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()compilePipeline(BackendRenderPipeline.CreateInfo createInfo) 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, BooleanSupplier isIconified) createTexture(@Nullable String label, int usage, GpuFormat format, int width, int height, int depthOrLayers, int mipLevels) createTextureView(GpuTexture texture, int baseMipLevel, int mipLevels) createTimestampQueryPool(int size) longboolean(package private) voidmakeCurrent(long windowHandle) (package private) voidprivate 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 -
initialWindowHandle
private final long initialWindowHandle -
glContext
private final long glContext -
heuristics
-
encoder
-
debugLog
-
debugLabels
-
directStateAccess
-
frameBufferCache
-
vertexArraySource
private final BiFunction<GlProgram, BackendRenderPipeline.CreateInfo, VertexArray> vertexArraySource -
bufferStorage
-
deviceInfo
-
recompiler
-
shaderCompilerRequiresSacrifice
private boolean shaderCompilerRequiresSacrifice -
currentWindow
private long currentWindow
-
-
Constructor Details
-
GlDevice
- Throws:
BackendCreationException
-
-
Method Details
-
heuristics
-
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 String label, int usage, GpuFormat format, int width, int height, int depthOrLayers, int mipLevels) - Specified by:
createTexturein 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
-
sacrificeShaderToOpenGlAndAmd
private void sacrificeShaderToOpenGlAndAmd() -
markAmdShaderCompilerAngry
void markAmdShaderCompilerAngry() -
close
public void close()- Specified by:
closein interfaceGpuDeviceBackend
-
directStateAccess
-
compilePipeline
- Specified by:
compilePipelinein interfaceGpuDeviceBackend
-
getBufferStorage
-
frameBufferCache
-
createTimestampQueryPool
- Specified by:
createTimestampQueryPoolin interfaceGpuDeviceBackend
-
getTimestampCalibrationOffset
public long getTimestampCalibrationOffset()- Specified by:
getTimestampCalibrationOffsetin interfaceGpuDeviceBackend
-
getDeviceInfo
- Specified by:
getDeviceInfoin interfaceGpuDeviceBackend
-
makeCurrent
void makeCurrent(long windowHandle)
-