3 #ifndef SCENEVIEW_DRAW_CONTEXT_HPP__
4 #define SCENEVIEW_DRAW_CONTEXT_HPP__
10 #include <sceneview/drawable.hpp>
11 #include <sceneview/resource_manager.hpp>
12 #include <sceneview/scene.hpp>
14 class QOpenGLShaderProgram;
28 const Scene::Ptr& scene);
30 void Draw(
int viewport_width,
32 std::vector<Renderer*>* prenderers);
34 void SetClearColor(
const QColor& color);
36 void SetDrawGroups(
const std::vector<DrawGroup*>& groups);
39 void PrepareFixedFunctionPipeline();
45 void ActivateMaterial();
51 ResourceManager::Ptr resources_;
58 int viewport_width_ = 0;
59 int viewport_height_ = 0;
62 MaterialResource::Ptr material_;
63 GeometryResource::Ptr geometry_;
64 ShaderResource::Ptr shader_;
65 QOpenGLShaderProgram* program_;
66 QMatrix4x4 model_mat_;
68 std::vector<DrawGroup*> draw_groups_;
72 GLenum gl_depth_func_;
83 bool draw_bounding_boxes_;
88 #endif // SCENEVIEW_DRAW_CONTEXT_HPP__
An axis-aligned box typically used for bounding box and intersection calculations.
Definition: axis_aligned_box.hpp:17
Scene node that contains a list of drawable objects.
Definition: draw_node.hpp:26
Camera.
Definition: camera_node.hpp:25
Definition: draw_group.hpp:22
Definition: draw_context.hpp:25