summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/python
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2008-07-18 10:11:29 +0900
committerJosé Fonseca <[email protected]>2008-07-18 10:42:44 +0900
commitbfee84df8665a474fa025150f57d896bf1aa6bae (patch)
treee4b07dd40f3e8e60c632030c0623c6200c7ad2f4 /src/gallium/state_trackers/python
parent1e5419fa3061386413a98b75d0908cb3e3c6894e (diff)
python: Add methods to get texture width, height, etc.
SWIG does a poor job with arrays inside structures.
Diffstat (limited to 'src/gallium/state_trackers/python')
-rw-r--r--src/gallium/state_trackers/python/gallium.i20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/python/gallium.i b/src/gallium/state_trackers/python/gallium.i
index d5b24b04ff8..c08ac87acae 100644
--- a/src/gallium/state_trackers/python/gallium.i
+++ b/src/gallium/state_trackers/python/gallium.i
@@ -401,6 +401,26 @@ error1:
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 */
struct pipe_surface *
get_surface(unsigned face=0, unsigned level=0, unsigned zslice=0, unsigned usage=0 )