本文整理汇总了C++中Render::start方法的典型用法代码示例。如果您正苦于以下问题:C++ Render::start方法的具体用法?C++ Render::start怎么用?C++ Render::start使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Render
的用法示例。
在下文中一共展示了Render::start方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: tmp
RenderPanel::RenderPanel(CommandQueue *c, MainWindow *mw)
{
cmdq = c;
fundolb = new QLabel(this);
screenW = 750;
screenH = 550;
Render *r = new Render(screenW, screenH, c);
connect(r, SIGNAL(renderizado(const QImage &)), this, SLOT(update(const QImage &)), Qt::QueuedConnection);
connect(r, SIGNAL(feedBackBondary(bool)),this, SLOT(feedBackBondary(bool)));
connect(this, SIGNAL(atualizaTamanho(int, int)), r, SLOT(updateScreen(int, int)), Qt::QueuedConnection);
connect(this, SIGNAL(enviaArquivo(const QString &)), r, SLOT(recebeArquivo(const QString &)), Qt::QueuedConnection);
QImage tmp(screenW, screenH,QImage::Format_ARGB32_Premultiplied);
QPainter p;
p.begin(&tmp);
p.fillRect(tmp.rect(), Qt::white);
p.end();
fundolb->setPixmap(QPixmap::fromImage(tmp));
fundolb->show();
m_mw = mw;
repaint();
r->start();
}
示例2: main
int main()
{
GOOGLE_PROTOBUF_VERIFY_VERSION;
shiny::RenderRequest renreq;
Render render;
nextStage();
render.eye = Vector3(0, 1, 0);
render.target = Vector3(0, 1, -1);
render.scene.addSphere(-3, 1, -8, 3);
render.scene.addSphere(3, 1.5, -7, 2);
render.scene.spheres[1].material.emission = Vector3(0.5, 0.5, 0);
render.start();
cout << "Serializing..." << endl;
auto script = stages;
/*
[
[
["add", "vector", {
"n": 1, // Number of vectors
"data": [[1, 1, 1], [1, 2, 3]], // Array of alternating start and end points,
"line": true, // Whether to draw vector lines
"arrow": true, // Whether to draw arrowheads
"size": 0.07, // Size of the arrowhead relative to the stage
}],
]
]
*/
ujson::value jsonScript{ script };
ujson::value jsonScene = to_json(render.scene);
ofstream dataFile;
dataFile.open (OUTPUT_FILE);
dataFile << "window.mathboxScript = " << jsonScript << ";" << endl;
dataFile << "window.mathboxScene = " << jsonScene << ";" << endl;
dataFile.close();
/*
Server server;
server.start();
while (!server.exit) {
shSleep(1);
}
server.stop();
//*/
google::protobuf::ShutdownProtobufLibrary();
cout << "Done!" << endl;
/*
thrust::host_vector<Vector3f> h_rpos(n);
thrust::host_vector<Vector3f> h_rdir(n);
thrust::host_vector<Vector3i> h_pos(n);
thrust::host_vector<Vector3i> h_step(n);
thrust::host_vector<Vector3f> h_tmax(n);
thrust::host_vector<Vector3f> h_tdelta(n);
thrust::host_vector<CubeSide> h_side(n);
for (int i = 0; i < n; i++) {
Vector3f *p;
p = &h_rpos[i];
p->set(0.5f, 0.5f, 0.5f);
p = &h_rdir[i];
p->set(0.01f, 1.f, -0.01f);
}
initTrace(n, h_rpos, h_rdir, h_pos, h_step, h_tmax, h_tdelta, h_side);
printElement(0, h_rpos, h_rdir, h_pos, h_step, h_tmax, h_tdelta, h_side);
step(n, h_pos, h_step, h_tmax, h_tdelta, h_side);
printElement(0, h_rpos, h_rdir, h_pos, h_step, h_tmax, h_tdelta, h_side);
*/
return 0;
}
示例3: main
int main(int argc, char** argv)
{
gEngine.init(&argc, argv, "display OBJ model", "off/model.off");
gEngine.start();
return 0;
}