Aardvark.Rendering is a high-performance, dependency-aware rendering engine. It is part of the open-source Aardvark Platform for visual computing, real-time graphics, and visualization.
Should creating a Query also invoke a Begin or should this be separate? Actually, I like the idea of reusing queries (even they need to be re-created in GL) so a separate Begin/Start seems convenient.
Should it be a Disposable or cleaned up by Runtime.DeleteQuery (like with textures)? -> It looks we chose this pattern for textures/buffers in order to allow resource management/counting. I would say we can go for a Disposable here.
Should there be a mechanism to detect conflicts of nested queries of the same type (not supported by OpenGL)?
A query should allow:
IRuntime.CreateQuery
Begin/Start
End/Stop
HasResult: check if there is a result
TryGetResult: get result if available
GetResult: waiting for the result with an optional timeout
Dispose
Restart
What about advanced features/interoperability with RenderCommands?
Feed PrimitiveGenerated to an indirect render command
Conditional rendering using AnySample
Already found in the GL backend:
GLTimer in Configfs.
OpenGlStopwatch in Config.fs
OpenGlStopwatch in Statistics.fs
OpenGlQuery in Statistics.fs: Already looks like a usable abstraction of a query, but missing e.g. TryGetResult, silently ignores nested queries?
We need to abstract this functionally behind our rendering API in order to provide all functionality required for my application: https://www.khronos.org/opengl/wiki/Query_Object
The
IRuntime
should allow creating Queries:Using a
long
as result for all types is possible.Questions:
Disposable
or cleaned up by Runtime.DeleteQuery (like with textures)? -> It looks we chose this pattern for textures/buffers in order to allow resource management/counting. I would say we can go for a Disposable here.A query should allow:
What about advanced features/interoperability with RenderCommands?
Already found in the GL backend:
GLTimer
in Configfs.OpenGlStopwatch
in Config.fsOpenGlStopwatch
in Statistics.fsOpenGlQuery
in Statistics.fs: Already looks like a usable abstraction of a query, but missing e.g. TryGetResult, silently ignores nested queries?