summaryrefslogtreecommitdiff
path: root/src/glitz_texture.c
diff options
context:
space:
mode:
authorDavid Reveman <davidr@novell.com>2004-09-20 04:59:34 +0000
committerDavid Reveman <davidr@novell.com>2004-09-20 04:59:34 +0000
commit05bb9825487f03d50877fa60d96847c5605174ec (patch)
treee7e1043bd904cf4d3b5cbc7e027095f084311ab6 /src/glitz_texture.c
parent73540d4888c46c0b04dab9420741ecf03f050478 (diff)
Improvements to AGL backend and better checking of successful fragment program loading
Diffstat (limited to 'src/glitz_texture.c')
-rw-r--r--src/glitz_texture.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/glitz_texture.c b/src/glitz_texture.c
index 466aea6..ebd0e81 100644
--- a/src/glitz_texture.c
+++ b/src/glitz_texture.c
@@ -42,23 +42,22 @@ glitz_texture_init (glitz_texture_t *texture,
texture->wrap = 0;
texture->format = texture_format;
texture->name = 0;
- texture->flags = GLITZ_TEXTURE_FLAG_REPEATABLE_MASK |
- GLITZ_TEXTURE_FLAG_PADABLE_MASK;
if (feature_mask & GLITZ_FEATURE_TEXTURE_BORDER_CLAMP_MASK) {
texture->box.x1 = texture->box.y1 = 0;
texture->box.x2 = texture->width = width;
texture->box.y2 = texture->height = height;
+ texture->flags = GLITZ_TEXTURE_FLAG_REPEATABLE_MASK |
+ GLITZ_TEXTURE_FLAG_PADABLE_MASK;
} else {
texture->box.x1 = texture->box.y1 = 1;
texture->box.x2 = width + 1;
texture->box.y2 = height + 1;
texture->width = width + 2;
texture->height = height + 2;
- texture->flags &= ~(GLITZ_TEXTURE_FLAG_REPEATABLE_MASK |
- GLITZ_TEXTURE_FLAG_PADABLE_MASK);
+ texture->flags = 0;
}
-
+
if ((feature_mask & GLITZ_FEATURE_TEXTURE_NON_POWER_OF_TWO_MASK) ||
(POWER_OF_TWO (texture->width) && POWER_OF_TWO (texture->height))) {
texture->target = GLITZ_GL_TEXTURE_2D;