- 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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user