mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-20 04:29:13 +12:00
Moar
This commit is contained in:
parent
cf9ed3d460
commit
364443d66f
4 changed files with 19 additions and 6 deletions
|
@ -33,16 +33,25 @@ void GPU::reset() {
|
|||
renderer.reset();
|
||||
}
|
||||
|
||||
// Call the correct version of drawArrays based on whether this is an indexed draw (first template parameter)
|
||||
// And whether we are going to use the shader JIT (second template parameter)
|
||||
void GPU::drawArrays(bool indexed) {
|
||||
if (indexed)
|
||||
drawArrays<true>();
|
||||
else
|
||||
drawArrays<false>();
|
||||
if (indexed) {
|
||||
if constexpr (ShaderJIT::isAvailable())
|
||||
drawArrays<true, true>();
|
||||
else
|
||||
drawArrays<true, false>();
|
||||
} else {
|
||||
if constexpr (ShaderJIT::isAvailable())
|
||||
drawArrays<false, true>();
|
||||
else
|
||||
drawArrays<false, false>();
|
||||
}
|
||||
}
|
||||
|
||||
Vertex* vertices = new Vertex[Renderer::vertexBufferSize];
|
||||
|
||||
template <bool indexed>
|
||||
template <bool indexed, bool useShaderJIT>
|
||||
void GPU::drawArrays() {
|
||||
// Base address for vertex attributes
|
||||
// The vertex base is always on a quadword boundary because the PICA does weird alignment shit any time possible
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue