Class GraphicsDevice
Namespace: ValveResourceFormat.Renderer
Assembly: Renderer.dll
Creates the GPU objects that one or more record against.
public sealed class GraphicsDeviceInheritance
Methods
Create()
Creates a device. Called once per set of GPU objects that can be used with each other.
public static GraphicsDevice Create()Returns
The new device, with no contexts yet.
CreateBuffer(string)
Creates a buffer object.
public static int CreateBuffer(string name)Parameters
name string
Returns
CreateBuffer<T>(string, ReadOnlySpan<T>, BufferUsage)
Creates a buffer object holding a copy of the given data.
public static int CreateBuffer<T>(string name, ReadOnlySpan<T> data, BufferUsage usage) where T : unmanagedParameters
name string
Debug label, visible in graphics debuggers.
data ReadOnlySpan<T>
Contents to upload.
usage BufferUsage
Who writes the buffer and who reads it.
Returns
The buffer handle.
Type Parameters
T
Element type of the data.
CreateContext(IGraphicsSurface)
Creates a context that records against this device's objects.
public GraphicsContext CreateContext(IGraphicsSurface surface)Parameters
surface IGraphicsSurface
The window side of the context, opened along with it.
Returns
The new context, not yet current on any thread.
CreateContext()
Creates a context for a surface whose currency the caller owns, such as a window made current once and never released.
public GraphicsContext CreateContext()Returns
The new context, not yet current on any thread.
CreateFramebuffer(string)
Creates a framebuffer object without attachments.
public static int CreateFramebuffer(string name)Parameters
name string
Returns
CreateProgram(string)
Creates an empty program object.
public static int CreateProgram(string name)Parameters
name string
Returns
CreateQuery(QueryTarget, string)
Creates a query object of the given target.
public static int CreateQuery(QueryTarget target, string name)Parameters
target QueryTarget
name string
Returns
CreateSampler(string)
Creates a sampler object with default state.
public static int CreateSampler(string name)Parameters
name string
Returns
CreateShader(ShaderProgramType, string)
Creates an empty shader object for one stage.
public static int CreateShader(ShaderProgramType stage, string name)Parameters
stage ShaderProgramType
name string
Returns
CreateTexture(TextureTarget, string)
Creates a texture object of the given target, without storage.
public static int CreateTexture(TextureTarget target, string name)Parameters
target TextureTarget
name string
Returns
CreateTextureView(int, TextureTarget, ImageFormat, int, int, int, int, string)
Creates a texture view over a subrange of another texture's storage.
public static int CreateTextureView(int texture, TextureTarget target, ImageFormat format, int minLevel, int numLevels, int minLayer, int numLayers, string name)Parameters
texture int
target TextureTarget
format ImageFormat
minLevel int
numLevels int
minLayer int
numLayers int
name string
Returns
CreateVertexArray(string)
Creates a vertex array object without attributes.
public static int CreateVertexArray(string name)Parameters
name string

