diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2006-09-06 22:54:06 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2006-09-06 22:54:06 +0400 |
commit | d444f25b2864b7d4a9ae39211c695e36ffd813a8 (patch) | |
tree | f05a328f142955753bc7f76cda8fe398ee7835e1 /source/blender/src/drawmesh.c | |
parent | c54e20a86a62e1d31ad5bc48c281e468732fbfea (diff) |
- Fix a display glitch with float image painting and undo.
- Fix a crash with float images texture mapped onto meshes, it didn't
always do conversion from float to byte before uploading to OpenGL.
Diffstat (limited to 'source/blender/src/drawmesh.c')
-rw-r--r-- | source/blender/src/drawmesh.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/src/drawmesh.c b/source/blender/src/drawmesh.c index d3556f82243..83ffa6f44d8 100644 --- a/source/blender/src/drawmesh.c +++ b/source/blender/src/drawmesh.c @@ -43,6 +43,7 @@ #include "BLI_arithb.h" #include "BLI_edgehash.h" +#include "IMB_imbuf.h" #include "IMB_imbuf_types.h" #include "DNA_image_types.h" @@ -303,9 +304,11 @@ int set_tpage(TFace *tface) glDisable(GL_TEXTURE_2D); return 0; } - } + if ((ima->ibuf->rect==NULL) && ima->ibuf->rect_float) + IMB_rect_from_float(ima->ibuf); + if(ima->tpageflag & IMA_TWINANIM) fCurtile= ima->lastframe; else fCurtile= tface->tile; @@ -443,6 +446,9 @@ void update_realtime_image(Image *ima, int x, int y, int w, int h) int skip_pixels = glaGetOneInteger(GL_UNPACK_SKIP_PIXELS); int skip_rows = glaGetOneInteger(GL_UNPACK_SKIP_ROWS); + if ((ima->ibuf->rect==NULL) && ima->ibuf->rect_float) + IMB_rect_from_float(ima->ibuf); + glBindTexture(GL_TEXTURE_2D, ima->bindcode); glPixelStorei(GL_UNPACK_ROW_LENGTH, ima->ibuf->x); |