Class GorgonQuery<T>
A query used to retrieve information about rendering.
Inheritance
Inherited Members
Namespace: Gorgon.Graphics.Core
Assembly: Gorgon.Graphics.Core.dll
Syntax
public abstract class GorgonQuery<T> : IGorgonGraphicsObject, IDisposable where T : unmanaged
Type Parameters
Name | Description |
---|---|
T |
Constructors
| Edit this page View SourceGorgonQuery(GorgonGraphics, string)
Initializes a new instance of the GorgonQuery<T> class.
Declaration
protected GorgonQuery(GorgonGraphics graphics, string name)
Parameters
Type | Name | Description |
---|---|---|
GorgonGraphics | graphics | The graphics interface used to build the query. |
string | name | [Optional] The name for the query. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when the |
Properties
| Edit this page View SourceGraphics
Property to return the graphics interface that built this object.
Declaration
public GorgonGraphics Graphics { get; }
Property Value
Type | Description |
---|---|
GorgonGraphics |
HasData
Property to return whether the data from the query is ready for consumption or not.
Declaration
public bool HasData { get; }
Property Value
Type | Description |
---|---|
bool |
Name
Property to return the name of this object.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
string |
QueryType
Property to return the type of query to execute.
Declaration
public abstract QueryType QueryType { get; }
Property Value
Type | Description |
---|---|
QueryType |
Methods
| Edit this page View SourceBegin()
Function to start the query.
Declaration
public void Begin()
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
End()
Function to end the query.
Declaration
public void End()
GetData(out T)
Function to retrieve the result data for the query.
Declaration
public bool GetData(out T result)
Parameters
Type | Name | Description |
---|---|---|
T | result | The result of the query. |
Returns
Type | Description |
---|---|
bool | true if the query results are ready to be consumed, or false if not. |
OnGetData(out T)
Function to retrieve the result data for the query.
Declaration
protected abstract bool OnGetData(out T result)
Parameters
Type | Name | Description |
---|---|---|
T | result | The result of the query. |
Returns
Type | Description |
---|---|
bool | true if the query results are ready to be consumed, or false if not. |