mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-19 20:19:13 +12:00
[PICA] Proper texture wrapping
This commit is contained in:
parent
84db6052b3
commit
4632a62da2
4 changed files with 34 additions and 13 deletions
|
@ -29,6 +29,7 @@ struct Texture {
|
|||
};
|
||||
|
||||
u32 location;
|
||||
u32 config; // Magnification/minification filter, wrapping configs, etc
|
||||
Formats format;
|
||||
OpenGL::uvec2 size;
|
||||
bool valid;
|
||||
|
@ -40,8 +41,8 @@ struct Texture {
|
|||
|
||||
Texture() : valid(false) {}
|
||||
|
||||
Texture(u32 loc, Formats format, u32 x, u32 y, bool valid = true)
|
||||
: location(loc), format(format), size({x, y}), valid(valid) {
|
||||
Texture(u32 loc, Formats format, u32 x, u32 y, u32 config, bool valid = true)
|
||||
: location(loc), format(format), size({x, y}), config(config), valid(valid) {
|
||||
|
||||
u64 endLoc = (u64)loc + sizeInBytes();
|
||||
// Check if start and end are valid here
|
||||
|
@ -56,6 +57,7 @@ struct Texture {
|
|||
}
|
||||
|
||||
void allocate();
|
||||
void setNewConfig(u32 newConfig);
|
||||
void decodeTexture(const void* data);
|
||||
void free();
|
||||
u64 sizeInBytes();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue