mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 13:28:06 +02:00
python: Add methods to get texture width, height, etc.
SWIG does a poor job with arrays inside structures.
This commit is contained in:
parent
1e5419fa30
commit
bfee84df86
1 changed files with 20 additions and 0 deletions
|
|
@ -401,6 +401,26 @@ error1:
|
||||||
pipe_texture_reference(&ptr, NULL);
|
pipe_texture_reference(&ptr, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsigned get_width(unsigned level=0) {
|
||||||
|
return $self->width[level];
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned get_height(unsigned level=0) {
|
||||||
|
return $self->height[level];
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned get_depth(unsigned level=0) {
|
||||||
|
return $self->depth[level];
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned get_nblocksx(unsigned level=0) {
|
||||||
|
return $self->nblocksx[level];
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned get_nblocksy(unsigned level=0) {
|
||||||
|
return $self->nblocksy[level];
|
||||||
|
}
|
||||||
|
|
||||||
/** Get a surface which is a "view" into a texture */
|
/** Get a surface which is a "view" into a texture */
|
||||||
struct pipe_surface *
|
struct pipe_surface *
|
||||||
get_surface(unsigned face=0, unsigned level=0, unsigned zslice=0, unsigned usage=0 )
|
get_surface(unsigned face=0, unsigned level=0, unsigned zslice=0, unsigned usage=0 )
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue