24 using namespace mondschein;
25 using namespace renderer;
49 if (context.get()==
nullptr)
51 std::string err(
"Mondschein Engine ERROR: No context available or context not set. Exception raised in function\n\t");
52 err+=
"void mondschein::renderer::Renderer::toggle_feature(const std::string &_feature,bool _state) const";
57 std::string err(
"Mondschein Engine ERROR: The context must be current for the renderer to take action.");
58 err+=
" Exception raised in function\n\t";
59 err+=
"void mondschein::renderer::Renderer::toggle_feature(const std::string &_feature,bool _state) const";
67 if (context.get() ==
nullptr)
69 std::string err(
"Mondschein Engine ERROR: No context available or context not set. Exception raised in function\n\t");
70 err+=
"bool mondschein::renderer::Renderer::query_extension(const std::string &_ext)";
75 std::string err(
"Mondschein Engine ERROR: Context is not current. Exception raised in function\n\t");
76 err+=
"bool mondschein::renderer::Renderer::query_extension(const std::string &_ext)";
79 const char *c=
reinterpret_cast<const char *
>(glGetString(GL_EXTENSIONS));
81 if (str.find(_ext)!=std::string::npos)
return true;
87 if (context.get()==
nullptr)
89 std::string err(
"Mondschein Engine ERROR: No context available or context not set. Exception raised in function\n\t");
90 err+=
"void mondschein::renderer::Renderer::set_clear_color(const Eigen::Vector4d& _c)";
95 std::string err(
"Mondschein Engine ERROR: Context is not current. Exception raised in function\n\t");
96 err+=
"void mondschein::renderer::Renderer::set_clear_color(const Eigen::Vector4d& _c)";
104 if (context.get()==
nullptr)
106 std::string err(
"Mondschein Engine ERROR: No context available or context not set. Exception raised in function\n\t");
107 err+=
"void mondschein::renderer::Renderer::clear_color_buffer()";
112 std::string err(
"Mondschein Engine ERROR: Context is not current. Exception raised in function\n\t");
113 err+=
"void mondschein::renderer::Renderer::clear_color_buffer()";
121 if (context.get()==
nullptr)
123 std::string err(
"Mondschein Engine ERROR: No context available or context not set. Exception raised in function\n\t");
124 err+=
"void mondschein::renderer::Renderer::clear_depth_buffer()";
129 std::string err(
"Mondschein Engine ERROR: Context is not current. Exception raised in function\n\t");
130 err+=
"void mondschein::renderer::Renderer::clear_depth_buffer()";
138 if (context.get()==
nullptr)
140 std::string err(
"Mondschein Engine ERROR: No context available or context not set. Exception raised in function\n\t");
141 err+=
"void mondschein::renderer::Renderer::make_renderable(scene::Scenenode_c _sn)";
146 std::string err(
"Mondschein Engine ERROR: Context is not current. Exception raised in function\n\t");
147 err+=
"void mondschein::renderer::Renderer::make_renderable(scene::Scenenode_c _sn)";
155 if (context.get()==
nullptr)
157 std::string err(
"Mondschein Engine ERROR: No context available or context not set. Exception raised in function\n\t");
158 err+=
"void mondschein::renderer::Renderer::render(scene::Scenegraph_c _sg,const uint32 _start)";
163 std::string err(
"Mondschein Engine ERROR: Context is not current. Exception raised in function\n\t");
164 err+=
"void mondschein::renderer::Renderer::render(scene::Scenegraph_c _sg,const uint32 _start)";