mirror of
https://github.com/love2d/love.git
synced 2026-08-14 10:13:46 +02:00
vulkan: fix canvas rendering
Sometimes canvas commands wouldn't get executed. This was because when the window gets resized, the command buffers would get recreated, and would thus lose the recorded commands.
This commit is contained in:
@@ -63,10 +63,10 @@ namespace love {
|
||||
std::vector<uint8> defaultPixels;
|
||||
defaultPixels.reserve(width * height * 4);
|
||||
for (size_t i = 0; i < width * height; i++) {
|
||||
// transparent white
|
||||
defaultPixels.push_back(255);
|
||||
defaultPixels.push_back(255);
|
||||
defaultPixels.push_back(255);
|
||||
// transparent black
|
||||
defaultPixels.push_back(0);
|
||||
defaultPixels.push_back(0);
|
||||
defaultPixels.push_back(0);
|
||||
defaultPixels.push_back(255);
|
||||
}
|
||||
Rect rect = { 0, 0, width, height };
|
||||
|
||||
Reference in New Issue
Block a user