File tree 1 file changed +1
-7
lines changed
1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -1459,9 +1459,6 @@ void rlBegin(int mode)
1459
1459
// NOTE: In all three cases, vertex are accumulated over default internal vertex buffer
1460
1460
if (RLGL .currentBatch -> draws [RLGL .currentBatch -> drawCounter - 1 ].mode != mode )
1461
1461
{
1462
- // Get current binded texture to preserve it between draw modes change (QUADS <--> TRIANGLES)
1463
- int currentTexture = RLGL .currentBatch -> draws [RLGL .currentBatch -> drawCounter - 1 ].textureId ;
1464
-
1465
1462
if (RLGL .currentBatch -> draws [RLGL .currentBatch -> drawCounter - 1 ].vertexCount > 0 )
1466
1463
{
1467
1464
// Make sure current RLGL.currentBatch->draws[i].vertexCount is aligned a multiple of 4,
@@ -1484,16 +1481,13 @@ void rlBegin(int mode)
1484
1481
1485
1482
RLGL .currentBatch -> draws [RLGL .currentBatch -> drawCounter - 1 ].mode = mode ;
1486
1483
RLGL .currentBatch -> draws [RLGL .currentBatch -> drawCounter - 1 ].vertexCount = 0 ;
1487
- RLGL .currentBatch -> draws [RLGL .currentBatch -> drawCounter - 1 ].textureId = currentTexture ; // Preserve active texture
1484
+ RLGL .currentBatch -> draws [RLGL .currentBatch -> drawCounter - 1 ].textureId = RLGL . State . defaultTextureId ;
1488
1485
}
1489
1486
}
1490
1487
1491
1488
// Finish vertex providing
1492
1489
void rlEnd (void )
1493
1490
{
1494
- // Reset texture to default
1495
- rlSetTexture (RLGL .State .defaultTextureId );
1496
-
1497
1491
// NOTE: Depth increment is dependant on rlOrtho(): z-near and z-far values,
1498
1492
// as well as depth buffer bit-depth (16bit or 24bit or 32bit)
1499
1493
// Correct increment formula would be: depthInc = (zfar - znear)/pow(2, bits)
You can’t perform that action at this time.
0 commit comments