本文整理汇总了C++中Renderable::render方法的典型用法代码示例。如果您正苦于以下问题:C++ Renderable::render方法的具体用法?C++ Renderable::render怎么用?C++ Renderable::render使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Renderable
的用法示例。
在下文中一共展示了Renderable::render方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: draw
void GLSceneNode::draw()
{
QListIterator<Renderable*> it(this->objects);
while(it.hasNext()) {
Renderable *r = it.next();
r->render();
}
}
示例2: displayHandler
void displayHandler() {
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
drawAxes();
drawSpiral();
drawTangents();
glPushMatrix();
glTranslated(moveV.x, moveV.y, moveV.z);
glRotated(angleDeg, os.x, os.y, os.z);
r.render();
glPopMatrix();
glutSwapBuffers();
}
示例3: render
void CRenderList::render()
{
m_target->bind();
for (std::vector<SNodeList>::const_iterator iter = m_draw.begin(); iter < m_draw.end(); ++iter)
{
Renderable* item = (*iter)._draw;
if (!item)
{
continue;
}
ASSERT(item->getRenderJob(), "Invalid Render job");
item->getRenderJob()->setRenderTarget((*iter)._targetIndex);
item->render();
}
m_target->unbind();
}
示例4: render
void Engine::render() {
int width, height;
glfwGetWindowSize(window, &width, &height);
float aspect_ratio = width / (float) height;
camera.set_aspect_ratio(aspect_ratio); // TODO check if changed?
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
glClearDepth(1.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glm::mat4 view = camera.view_matrix();
glm::mat4 proj = camera.projection_matrix();
for(std::vector<Renderable*>::iterator it = renderables.begin();
it != renderables.end(); ++it) {
Renderable* torender = *it;
torender->render(proj, view);
}
glfwSwapBuffers(window);
}