src/glrenderer.cpp

changeset 1178
3a88e7a60b63
parent 1177
8661b9237ed5
child 1186
eae8b3bce545
child 1235
b2e44b23b42a
child 1254
73097a86e8dc
equal deleted inserted replaced
1177:8661b9237ed5 1178:3a88e7a60b63
379 glMatrixMode (GL_PROJECTION); 379 glMatrixMode (GL_PROJECTION);
380 glPushMatrix(); 380 glPushMatrix();
381 381
382 glLoadIdentity(); 382 glLoadIdentity();
383 const QSizeF& virtualSize = currentCamera().virtualSize(); 383 const QSizeF& virtualSize = currentCamera().virtualSize();
384 glOrtho(-virtualSize.width(), virtualSize.width(), -virtualSize.height(), virtualSize.height(), -100.0f, 100.0f); 384 glOrtho(-virtualSize.width(), virtualSize.width(), -virtualSize.height(), virtualSize.height(), -1000.0f, 1000.0f);
385 glTranslatef(panning (X), panning (Y), 0.0f); 385 glTranslatef(panning (X), panning (Y), 0.0f);
386 glMultMatrixf(currentCamera().transformationMatrix()); 386 glMultMatrixf(currentCamera().transformationMatrix());
387 glMultMatrixf(ldrawToGLAdapterMatrix); 387 glMultMatrixf(ldrawToGLAdapterMatrix);
388 drawFixedCameraBackdrop();
388 } 389 }
389 else 390 else
390 { 391 {
391 glMatrixMode(GL_MODELVIEW); 392 glMatrixMode(GL_MODELVIEW);
392 glPushMatrix(); 393 glPushMatrix();
1026 1027
1027 const Model* GLRenderer::model() const 1028 const Model* GLRenderer::model() const
1028 { 1029 {
1029 return m_model; 1030 return m_model;
1030 } 1031 }
1032
1033 /*
1034 * This virtual function lets derivative classes render something to the fixed camera
1035 * before the main brick is rendered.
1036 */
1037 void GLRenderer::drawFixedCameraBackdrop() {}

mercurial