Qt3D Renderer Submission: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
 
(Remove non-functioning "toc" command)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=Qt3D Renderer Submission=
{{Cleanup | reason=Auto-imported from ExpressionEngine.}}


==OpenGL Rendering==
[[Category:Developing_with_Qt::Qt3D]]


The actual OpenGL Rendering takes place in the RenderThread context.<br /> The thread is woken up when a RenderQueue is completed.
= Qt3D Renderer Submission =
 
== OpenGL Rendering ==
 
The actual OpenGL Rendering takes place in the RenderThread context.
The thread is woken up when a RenderQueue is completed.


The rendering goes as follow :
The rendering goes as follow :
Line 12: Line 17:
** Clear the scene
** Clear the scene
** For each RenderCommand in the RenderView
** For each RenderCommand in the RenderView
*** Create and bind the RenderCommand’s <span class="caps">VAO</span> if it doesn’t already exists for a given MeshData
*** Create and bind the RenderCommand's VAO if it doesn't already exists for a given MeshData
*** Bind the OpenGLProgram to use for the given Material/RenderPass/Technique
*** Bind the OpenGLProgram to use for the given Material/RenderPass/Technique
*** Set the attributes
*** Set the attributes
*** Release the <span class="caps">VAO</span>
*** Release the VAO
*** Set the DrawState to be used for the current Material/RenderPass/Technique
*** Set the DrawState to be used for the current Material/RenderPass/Technique
*** Set the Mesh matrix
*** Set the Mesh matrix
*** Set the Mesh Material
*** Set the Mesh Material
*** Set the uniforms for the given Material
*** Set the uniforms for the given Material
*** Bind the <span class="caps">VAO</span>
*** Bind the VAO
*** OpenGL draw call
*** OpenGL draw call
*** Release and Destroy <span class="caps">VAO</span>
*** Release and Destroy VAO
 
There is room for quite a few improvements here. That includes, sorting RenderCommands by Shader, OpenGL states and Uniform bindings. Later on we will also focus on OpenGL 4 features such as Indirect drawing commands.This will be done in the course of the following weeks and documented.
 
===Categories:===
 
* [[:Category:Developing with Qt|Developing_with_Qt]]
** [[:Category:Developing with Qt::Qt3D|Qt3D]]

Latest revision as of 12:33, 17 April 2015

This article may require cleanup to meet the Qt Wiki's quality standards. Reason: Auto-imported from ExpressionEngine.
Please improve this article if you can. Remove the {{cleanup}} tag and add this page to Updated pages list after it's clean.

Qt3D Renderer Submission

OpenGL Rendering

The actual OpenGL Rendering takes place in the RenderThread context. The thread is woken up when a RenderQueue is completed.

The rendering goes as follow :

  • For each RenderView in the Frame queue
    • Set the Viewport
    • Set the Camera
    • Clear the scene
    • For each RenderCommand in the RenderView
      • Create and bind the RenderCommand's VAO if it doesn't already exists for a given MeshData
      • Bind the OpenGLProgram to use for the given Material/RenderPass/Technique
      • Set the attributes
      • Release the VAO
      • Set the DrawState to be used for the current Material/RenderPass/Technique
      • Set the Mesh matrix
      • Set the Mesh Material
      • Set the uniforms for the given Material
      • Bind the VAO
      • OpenGL draw call
      • Release and Destroy VAO