Add ComputeParticlesTest

Renderer: Add a way to execute commands on the device
This commit is contained in:
SirLynix
2023-01-04 17:57:26 +01:00
committed by Jérôme Leclercq
parent 9e7b98a017
commit e34ba8c05d
13 changed files with 736 additions and 4 deletions

View File

@@ -32,6 +32,8 @@ namespace Nz
std::shared_ptr<GL::Context> CreateContext(GL::ContextParams params) const;
std::shared_ptr<GL::Context> CreateContext(GL::ContextParams params, WindowHandle handle) const;
void Execute(const FunctionRef<void(CommandBufferBuilder& builder)>& callback, QueueType queueType) override;
const RenderDeviceInfo& GetDeviceInfo() const override;
const RenderDeviceFeatures& GetEnabledFeatures() const override;
inline const GL::Context& GetReferenceContext() const;
@@ -57,6 +59,8 @@ namespace Nz
inline void NotifySamplerDestruction(GLuint sampler) const;
inline void NotifyTextureDestruction(GLuint texture) const;
void WaitForIdle() override;
OpenGLDevice& operator=(const OpenGLDevice&) = delete;
OpenGLDevice& operator=(OpenGLDevice&&) = delete; ///TODO?

View File

@@ -99,6 +99,7 @@ typedef void (GL_APIENTRYP PFNGLSPECIALIZESHADERPROC) (GLuint shader, const GLch
cb(glEnable, PFNGLENABLEPROC) \
cb(glEnableVertexAttribArray, PFNGLENABLEVERTEXATTRIBARRAYPROC) \
cb(glEndQuery, PFNGLENDQUERYPROC) \
cb(glFinish, PFNGLFINISHPROC) \
cb(glFlush, PFNGLFLUSHPROC) \
cb(glFramebufferRenderbuffer, PFNGLFRAMEBUFFERRENDERBUFFERPROC) \
cb(glFramebufferTexture2D, PFNGLFRAMEBUFFERTEXTURE2DPROC) \