projects
/
xonotic
/
darkplaces.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
35d31da
)
fix a crash with non-power-of-two particle textures
author
havoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 26 Feb 2011 17:55:03 +0000
(17:55 +0000)
committer
havoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 26 Feb 2011 17:55:03 +0000
(17:55 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10866
d7cf8633
-e32d-0410-b094-
e92efae38249
gl_textures.c
patch
|
blob
|
history
diff --git
a/gl_textures.c
b/gl_textures.c
index
fc027b2
..
0f08b5f
100644
(file)
--- a/
gl_textures.c
+++ b/
gl_textures.c
@@
-1156,7
+1156,7
@@
static void R_UploadFullTexture(gltexture_t *glt, const unsigned char *data)
{
// multiply RGB channels by A channel before uploading
int alpha;
- for (i = 0;i <
width*height*
depth*4;i += 4)
+ for (i = 0;i <
glt->inputwidth*glt->inputheight*glt->input
depth*4;i += 4)
{
alpha = prevbuffer[i+3];
colorconvertbuffer[i] = (prevbuffer[i] * alpha) >> 8;