| 436 | void EngineGL33::Restore() {} |
| 437 | |
| 438 | void EngineGL33::PreReset(bool hard) |
| 439 | { |
| 440 | FreeAllQueues(_queueNo); |
| 441 | |
| 442 | // Detach engine textures from units 0/1 by re-binding the 1x1 white |
| 443 | // sentinel. Binding GL name 0 here would leave the units pointing at |
| 444 | // a texture object with no defined base level, which the driver flags |
| 445 | // as a KHR_debug LOW warning the moment any draw happens between the |
| 446 | // soft Reset and the next SetTexture (id 131204). The sentinel |
| 447 | // survives a soft reset and is recreated by InitGL on a hard reset |
| 448 | // (PreReset(true) is followed by DestroySurfaces + InitGL). |
| 449 | GLuint placeholder = _fallbackWhiteTex ? _fallbackWhiteTex : 0; |
| 450 | for (int i = 0; i < 2; i++) |
| 451 | { |
| 452 | GL33Bind::Tex2D(i, placeholder); |
| 453 | } |
| 454 | glFlush(); |
| 455 | |
| 456 | if (hard) |
| 457 | { |
| 458 | _textBank->ReleaseAllTextures(); |
| 459 | DeinitPixelShaders(); |
| 460 | DeinitVertexShaders(); |
| 461 | } |
| 462 | |
| 463 | DestroyVB(); |
| 464 | DestroyVBTL(); |
| 465 | _lastQueueSource = nullptr; |
| 466 | } |
| 467 | |
| 468 | void EngineGL33::PostReset() |
| 469 | { |
nothing calls this directly
no test coverage detected