Class RendererContext
Namespace: ValveResourceFormat.Renderer
Assembly: Renderer.dll
Shared context containing loaders and caches used by the renderer.
public class RendererContext : IDisposableInheritance
object ← RendererContext
Implements
Constructors
RendererContext(GameFileLoader, ILogger)
Initializes a new renderer context.
public RendererContext(GameFileLoader fileLoader, ILogger logger)Parameters
fileLoader GameFileLoader
Game file loader for resource access.
logger ILogger
Logger for diagnostic output.
Properties
CancellationToken
Cancels loading on this context.
public CancellationToken CancellationToken { get; }Property Value
Device
Owns the GPU objects created for this renderer. Creation goes through the static methods on GraphicsDevice rather than through this property.
public GraphicsDevice Device { get; }Property Value
FieldOfView
Main camera field of view, in horizontal degrees at a 4:3 aspect ratio. See Camera.FieldOfView.
public float FieldOfView { get; set; }Property Value
float
FileLoader
Game file loader for loading resources from packages.
public GameFileLoader FileLoader { get; }Property Value
GlobalRenderAttributes
Gets the global render attributes.
public RenderAttributes GlobalRenderAttributes { get; }Property Value
Logger
Logger for diagnostic messages.
public ILogger Logger { get; }Property Value
MaterialLoader
Material and texture loader and cache.
public MaterialLoader MaterialLoader { get; }Property Value
MaxTextureSize
Maximum texture mip size to load in RendererContext.MaterialLoader.
public int MaxTextureSize { get; set; }Property Value
int
MeshBufferCache
GPU mesh buffer and vertex array object cache.
public GPUMeshBufferCache MeshBufferCache { get; }Property Value
MorphAtlas
Holds the morph composites of every mesh loaded through this context.
public MorphCompositeAtlas MorphAtlas { get; }Property Value
ParallelSimulation
Whether scene nodes simulate across the thread pool, published by the renderer each frame.
public bool ParallelSimulation { get; set; }Property Value
bool
ShaderDataProvider
Information lookup from compiled shaders (.vcs).
public ShaderDataProvider ShaderDataProvider { get; }Property Value
ShaderLoader
Shader compiler and cache.
public ShaderLoader ShaderLoader { get; }Property Value
TextureStreaming
Background loader for textures.
public TextureStreamingHelper TextureStreaming { get; }Property Value
Uptime
Gets or sets the seconds the renderer has been running.
public float Uptime { get; set; }Property Value
float
ViewmodelFieldOfView
First-person viewmodel field of view, in horizontal degrees at a 4:3 aspect ratio.
public float ViewmodelFieldOfView { get; set; }Property Value
float
Methods
BeginLoading()
Marks loading in progress until the returned scope is disposed.
public IDisposable BeginLoading()Returns
CancelLoading()
Stops loading for good, waiting only for texture streaming reads already writing to GPU mapped memory.
public void CancelLoading()Dispose()
Releases the context. Call it, or RendererContext.CancelLoading(), before the GL context goes away.
public void Dispose()Dispose(bool)
Releases resources owned by the context.
protected virtual void Dispose(bool disposing)Parameters
disposing bool
True to release managed resources.
WaitForLoadingToStop()
Waits for everything reading resources to stop, returning whether it did.
public bool WaitForLoadingToStop()Returns
bool

