MCPcopy Create free account
hub / github.com/Tencent/tgfx / GetRTAdjustArray

Function GetRTAdjustArray

src/gpu/ProgramInfo.cpp:83–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81}
82
83static std::array<float, 4> GetRTAdjustArray(const RenderTarget* renderTarget) {
84 std::array<float, 4> result = {};
85 result[0] = 2.f / static_cast<float>(renderTarget->width());
86 result[2] = 2.f / static_cast<float>(renderTarget->height());
87 result[1] = -1.f;
88 result[3] = -1.f;
89 if (renderTarget->origin() == ImageOrigin::BottomLeft) {
90 result[2] = -result[2];
91 result[3] = -result[3];
92 }
93 return result;
94}
95
96int ProgramInfo::getProcessorIndex(const Processor* processor) const {
97 auto result = processorIndices.find(processor);

Callers 1

Calls 3

widthMethod · 0.45
heightMethod · 0.45
originMethod · 0.45

Tested by

no test coverage detected