Pārlūkot izejas kodu

RLGL: restore draw batch state after limit check (#2018)

pull/2021/head
mausimus pirms 3 gadiem
committed by GitHub
vecāks
revīzija
dfbb134bfe
Šim parakstam datu bāzē netika atrasta zināma atslēga GPG atslēgas ID: 4AEE18F83AFDEB23
1 mainītis faili ar 7 papildinājumiem un 0 dzēšanām
  1. +7
    -0
      src/rlgl.h

+ 7
- 0
src/rlgl.h Parādīt failu

@ -2548,8 +2548,15 @@ bool rlCheckRenderBatchLimit(int vCount)
if ((RLGL.currentBatch->vertexBuffer[RLGL.currentBatch->currentBuffer].vCounter + vCount) >=
(RLGL.currentBatch->vertexBuffer[RLGL.currentBatch->currentBuffer].elementCount*4))
{
int currentMode = RLGL.currentBatch->draws[RLGL.currentBatch->drawCounter - 1].mode;
int currentTexture = RLGL.currentBatch->draws[RLGL.currentBatch->drawCounter - 1].textureId;
overflow = true;
rlDrawRenderBatch(RLGL.currentBatch); // NOTE: Stereo rendering is checked inside
// restore state of last batch so we can continue adding vertices
RLGL.currentBatch->draws[RLGL.currentBatch->drawCounter - 1].mode = currentMode;
RLGL.currentBatch->draws[RLGL.currentBatch->drawCounter - 1].textureId = currentTexture;
}
#endif

Notiek ielāde…
Atcelt
Saglabāt