MCPcopy Create free account
hub / github.com/davideberly/GeometricTools / UseDynamicUpdates

Method UseDynamicUpdates

GTE/Graphics/CubeMapEffect.cpp:54–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54void CubeMapEffect::UseDynamicUpdates(float dmin, float dmax)
55{
56 // Create the camera used to draw each of the 6 faces of the cube.
57 mCamera = std::make_shared<Camera>(true, mDepthRangeIs01);
58 mCamera->SetFrustum(90.0f, 1.0f, dmin, dmax);
59
60 // Create a draw target for the faces.
61 mTarget = std::make_shared<DrawTarget>(1, mCubeTexture->GetFormat(),
62 mCubeTexture->GetLength(), mCubeTexture->GetLength(), true);
63 mTarget->AutogenerateRTMipmaps();
64 mTarget->GetRTTexture(0)->SetCopy(Resource::Copy::STAGING_TO_CPU);
65
66 mDynamicUpdates = true;
67}
68
69void CubeMapEffect::SetPVWMatrixConstant(std::shared_ptr<ConstantBuffer> const& buffer)
70{

Callers

nothing calls this directly

Calls 6

SetFrustumMethod · 0.80
AutogenerateRTMipmapsMethod · 0.80
SetCopyMethod · 0.80
GetFormatMethod · 0.45
GetLengthMethod · 0.45
GetRTTextureMethod · 0.45

Tested by

no test coverage detected