mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-06-15 07:15:22 +12:00
commit
fbcb7cee42
5 changed files with 44 additions and 61 deletions
src/core/renderer_gl
|
@ -450,7 +450,7 @@ OpenGL::Texture RendererGL::getTexture(Texture& tex) {
|
|||
if (buffer.has_value()) {
|
||||
return buffer.value().get().texture;
|
||||
} else {
|
||||
const void* textureData = gpu.getPointerPhys<void*>(tex.location); // Get pointer to the texture data in 3DS memory
|
||||
const auto textureData = std::span{gpu.getPointerPhys<u8>(tex.location), tex.sizeInBytes()}; // Get pointer to the texture data in 3DS memory
|
||||
Texture& newTex = textureCache.add(tex);
|
||||
newTex.decodeTexture(textureData);
|
||||
|
||||
|
@ -517,4 +517,4 @@ void RendererGL::screenshot(const std::string& name) {
|
|||
}
|
||||
|
||||
stbi_write_png(name.c_str(), width, height, 4, flippedPixels.data(), 0);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue