File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Expand file tree Collapse file tree 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)
14591459 // NOTE: In all three cases, vertex are accumulated over default internal vertex buffer
14601460 if (RLGL .currentBatch -> draws [RLGL .currentBatch -> drawCounter - 1 ].mode != mode )
14611461 {
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-
14651462 if (RLGL .currentBatch -> draws [RLGL .currentBatch -> drawCounter - 1 ].vertexCount > 0 )
14661463 {
14671464 // Make sure current RLGL.currentBatch->draws[i].vertexCount is aligned a multiple of 4,
@@ -1484,16 +1481,13 @@ void rlBegin(int mode)
14841481
14851482 RLGL .currentBatch -> draws [RLGL .currentBatch -> drawCounter - 1 ].mode = mode ;
14861483 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 ;
14881485 }
14891486}
14901487
14911488// Finish vertex providing
14921489void rlEnd (void )
14931490{
1494- // Reset texture to default
1495- rlSetTexture (RLGL .State .defaultTextureId );
1496-
14971491 // NOTE: Depth increment is dependant on rlOrtho(): z-near and z-far values,
14981492 // as well as depth buffer bit-depth (16bit or 24bit or 32bit)
14991493 // Correct increment formula would be: depthInc = (zfar - znear)/pow(2, bits)
You can’t perform that action at this time.
0 commit comments