MCPcopy Create free account
hub / github.com/OGRECave/ogre / getProjectionMatrix

Method getProjectionMatrix

OgreMain/src/OgreAutoParamDataSource.cpp:424–452  ·  view source on GitHub ↗

-----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

422 }
423 //-----------------------------------------------------------------------------
424 Matrix4 AutoParamDataSource::getProjectionMatrix(const Camera* cam) const
425 {
426 Matrix4 proj;
427
428 // NB use API-independent projection matrix since GPU programs
429 // bypass the API-specific handedness and use right-handed coords
430 if (mCurrentRenderable && mCurrentRenderable->getUseIdentityProjection())
431 {
432 // Use identity projection matrix, still need to take RS depth into account.
433 RenderSystem* rs = Root::getSingleton().getRenderSystem();
434 rs->_convertProjectionMatrix(Matrix4::IDENTITY, proj, true);
435 }
436 else
437 {
438 proj = cam->getProjectionMatrixWithRSDepth();
439 }
440
441 if (mCurrentRenderTarget && mCurrentRenderTarget->requiresTextureFlipping())
442 {
443 // Because we're not using setProjectionMatrix, this needs to be done here
444 // Invert transformed y
445 proj[1][0] = -proj[1][0];
446 proj[1][1] = -proj[1][1];
447 proj[1][2] = -proj[1][2];
448 proj[1][3] = -proj[1][3];
449 }
450
451 return proj;
452 }
453 const Matrix4& AutoParamDataSource::getProjectionMatrix(void) const
454 {
455 if (mProjMatrixDirty)

Callers 15

sceneToScreenMethod · 0.80
setupContentMethod · 0.80
TEST_FFunction · 0.80
getValueImplMethod · 0.80
getShadowCameraMethod · 0.80
_updateAutoParamsMethod · 0.80
getShadowCameraMethod · 0.80
getValueImplMethod · 0.80
getShadowCameraMethod · 0.80

Calls 3

getRenderSystemMethod · 0.80

Tested by 1

setupContentMethod · 0.64