Package icyllis.arc3d.engine
Class ContextOptions
java.lang.Object
icyllis.arc3d.engine.BaseContextOptions
icyllis.arc3d.engine.ContextOptions
Holds the options for creating a
ImmediateContext
, all fields should remain unchanged
after creating the context.
Boolean value represents a tristate:
Boolean.FALSE
: Forces an option to be disabled.Boolean.TRUE
: Forces an option to be enabled.null
: Uses default behavior, which may use runtime properties (e.g. driver version).
This class is part of public API.
-
Field Summary
Modifier and TypeFieldDescriptionCan the glyph atlas use multiple textures.long
The maximum size of cache textures used for Glyph cache.float
Above this threshold size in device space glyphs are drawn as individual paths.int
Specifies the number of samples Engine should use when performing internal draws with MSAA (hardware capabilities permitting).org.slf4j.Logger
If present, use this logger to send info/warning/error message that generated by Arc3D engine.int
Maximum number of GL programs or Vk pipelines to keep active in the runtime cache.int
Overrides: These options override feature detection using backend API queries.int
In vulkan backend a single Context submit equates to the submission of a single primary command buffer to the VkQueue.float
Below this threshold size in device space distance field fonts won't be used.boolean
Uses a reduced variety of shaders.boolean
If true, texture fetches from mip-mapped textures will be biased to read larger MIP levels.Controls whether we check for GL errors after functions that allocate resources (e.g.boolean
If true, then add 1 pixel padding to all glyph masks in the atlas to support bi-lerp rendering of all glyphs.boolean
OpenGL backend only.long
Fields inherited from class icyllis.arc3d.engine.BaseContextOptions
mMaxResourceBudget
-
Constructor Summary
-
Method Summary
-
Field Details
-
mSkipGLErrorChecks
Controls whether we check for GL errors after functions that allocate resources (e.g. glTexImage2D), for shader compilation success, and program link success. Ignored on backends other than GL. -
mMaxTextureSizeOverride
public int mMaxTextureSizeOverrideOverrides: These options override feature detection using backend API queries. These overrides can only reduce the feature set or limits, never increase them beyond the detected values. -
mSharpenMipmappedTextures
public boolean mSharpenMipmappedTexturesIf true, texture fetches from mip-mapped textures will be biased to read larger MIP levels. This has the effect of sharpening those textures, at the cost of some aliasing, and possible performance impact. -
mSupportBilerpFromGlyphAtlas
public boolean mSupportBilerpFromGlyphAtlasIf true, then add 1 pixel padding to all glyph masks in the atlas to support bi-lerp rendering of all glyphs. This must be set to true to use Slug. -
mReducedShaderVariations
public boolean mReducedShaderVariationsUses a reduced variety of shaders. May perform less optimally in steady state but can reduce jank due to shader compilations. -
mGlyphCacheTextureMaximumBytes
public long mGlyphCacheTextureMaximumBytesThe maximum size of cache textures used for Glyph cache. -
mAllowMultipleGlyphCacheTextures
Can the glyph atlas use multiple textures. If allowed, each texture's size is bound bymGlyphCacheTextureMaximumBytes
. -
mMinDistanceFieldFontSize
public float mMinDistanceFieldFontSizeBelow this threshold size in device space distance field fonts won't be used. Distance field fonts don't support hinting which is more important at smaller sizes. -
mGlyphsAsPathsFontSize
public float mGlyphsAsPathsFontSizeAbove this threshold size in device space glyphs are drawn as individual paths. -
mLogger
public org.slf4j.Logger mLoggerIf present, use this logger to send info/warning/error message that generated by Arc3D engine. -
mInternalMultisampleCount
public int mInternalMultisampleCountSpecifies the number of samples Engine should use when performing internal draws with MSAA (hardware capabilities permitting).If 0, Engine will disable internal code paths that use multisampling.
-
mMaxRuntimeProgramCacheSize
public int mMaxRuntimeProgramCacheSizeMaximum number of GL programs or Vk pipelines to keep active in the runtime cache. -
mMaxVkSecondaryCommandBufferCacheSize
public int mMaxVkSecondaryCommandBufferCacheSizeIn vulkan backend a single Context submit equates to the submission of a single primary command buffer to the VkQueue. This value specifies how many vulkan secondary command buffers we will cache for reuse on a given primary command buffer. A single submit may use more than this many secondary command buffers, but after the primary command buffer is finished on the GPU it will only hold on to this many secondary command buffers for reuse.A value of -1 means we will pick a limit value internally.
-
mVolatileContext
public boolean mVolatileContextOpenGL backend only. If context is volatile, then Arc3D is considered embedded in another program and shared with its OpenGL context. When making GL function calls that may alter the context's state (especially binding states) outside the command buffer execution, Arc3D will query the binding state and restore the state of the context after that. This is only used for non-DSA methods and may reduce performance. But this can prevent other programs from out-of-order due to assumptions about context's state, especially for mixed API usage between Arc3D and other programs. -
mVulkanVMALargeHeapBlockSize
public long mVulkanVMALargeHeapBlockSize -
mDriverBugWorkarounds
-
-
Constructor Details
-
ContextOptions
public ContextOptions()
-