MCPcopy Create free account
hub / github.com/LukasBanana/LLGL / PerspectiveProjection

Method PerspectiveProjection

examples/Cpp/ExampleBase/ExampleBase.cpp:1041–1046  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1039}
1040
1041Gs::Matrix4f ExampleBase::PerspectiveProjection(float aspectRatio, float near, float far, float fov) const
1042{
1043 const bool isClipRangeUnitCube = (renderer->GetRenderingCaps().clippingRange == LLGL::ClippingRange::MinusOneToOne);
1044 int flags = (isClipRangeUnitCube ? Gs::ProjectionFlags::UnitCube : 0);
1045 return Gs::ProjectionMatrix4f::Perspective(aspectRatio, near, far, fov, flags).ToMatrix4();
1046}
1047
1048Gs::Matrix4f ExampleBase::OrthogonalProjection(float width, float height, float near, float far) const
1049{

Callers 1

OnResizeMethod · 0.80

Calls 1

GetRenderingCapsMethod · 0.65

Tested by

no test coverage detected