mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-05-09 13:44:49 +12:00
[PICA] More textoor
This commit is contained in:
parent
ce72368f01
commit
51130b295a
6 changed files with 53 additions and 2 deletions
include/renderer_gl
|
@ -45,6 +45,7 @@ class Renderer {
|
|||
const std::array<u32, regNum>& regs;
|
||||
|
||||
OpenGL::Framebuffer getColourFBO();
|
||||
OpenGL::Texture getTexture(Texture& tex);
|
||||
|
||||
MAKE_LOG_FUNCTION(log, rendererLogger)
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ public:
|
|||
}
|
||||
|
||||
// Adds a surface object to the cache and returns it
|
||||
SurfaceType add(SurfaceType& surface) {
|
||||
SurfaceType add(const SurfaceType& surface) {
|
||||
if (size >= capacity) {
|
||||
Helpers::panic("Surface cache full! Add emptying!");
|
||||
}
|
||||
|
|
|
@ -55,9 +55,12 @@ struct Texture {
|
|||
}
|
||||
|
||||
void allocate();
|
||||
void decodeTexture(void* data);
|
||||
void free();
|
||||
u64 sizeInBytes();
|
||||
|
||||
u32 decodeTexel(u32 u, u32 v, Formats fmt, void* data);
|
||||
|
||||
// Get the morton interleave offset of a texel based on its U and V values
|
||||
static u32 mortonInterleave(u32 u, u32 v);
|
||||
// Get the byte offset of texel (u, v) in the texture
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue