Opengl glaDrawPixels removal: editors/render
This commit is contained in:
parent
44ea6fb857
commit
6628446bdf
|
@ -1537,11 +1537,10 @@ void render_view3d_draw(RenderEngine *engine, const bContext *C)
|
|||
if (force_fallback == false) {
|
||||
if (IMB_colormanagement_setup_glsl_draw(&scene->view_settings, &scene->display_settings, dither, true)) {
|
||||
glEnable(GL_BLEND);
|
||||
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
glPixelZoom(scale_x, scale_y);
|
||||
glaDrawPixelsTex(xof, yof, rres.rectx, rres.recty,
|
||||
GL_RGBA, GL_FLOAT, GL_NEAREST, rres.rectf);
|
||||
glPixelZoom(1.0f, 1.0f);
|
||||
glUseProgram(0); /* immDrawPixelsTex use it's own shader */
|
||||
immDrawPixelsTex(xof, yof, rres.rectx, rres.recty,
|
||||
GL_RGBA, GL_FLOAT, GL_NEAREST, rres.rectf,
|
||||
scale_x, scale_y, NULL);;
|
||||
glDisable(GL_BLEND);
|
||||
|
||||
IMB_colormanagement_finish_glsl_draw();
|
||||
|
@ -1558,12 +1557,11 @@ void render_view3d_draw(RenderEngine *engine, const bContext *C)
|
|||
4, dither, &scene->view_settings, &scene->display_settings);
|
||||
|
||||
glEnable(GL_BLEND);
|
||||
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
glPixelZoom(scale_x, scale_y);
|
||||
glaDrawPixelsAuto(xof, yof, rres.rectx, rres.recty,
|
||||
GL_RGBA, GL_UNSIGNED_BYTE,
|
||||
GL_NEAREST, display_buffer);
|
||||
glPixelZoom(1.0f, 1.0f);
|
||||
glUseProgram(0); /* immDrawPixelsTex use it's own shader */
|
||||
immDrawPixelsTex(xof, yof, rres.rectx, rres.recty,
|
||||
GL_RGBA, GL_UNSIGNED_BYTE,
|
||||
GL_NEAREST, display_buffer,
|
||||
scale_x, scale_y, NULL);
|
||||
glDisable(GL_BLEND);
|
||||
|
||||
MEM_freeN(display_buffer);
|
||||
|
|
|
@ -599,7 +599,8 @@ static bool ed_preview_draw_rect(ScrArea *sa, int split, int first, rcti *rect,
|
|||
if (re)
|
||||
RE_AcquiredResultGet32(re, &rres, (unsigned int *)rect_byte, 0);
|
||||
|
||||
glaDrawPixelsSafe(fx, fy, rres.rectx, rres.recty, rres.rectx, GL_RGBA, GL_UNSIGNED_BYTE, rect_byte);
|
||||
immDrawPixelsTex(fx, fy, rres.rectx, rres.recty, GL_RGBA, GL_UNSIGNED_BYTE, GL_NEAREST, rect_byte,
|
||||
1.0f, 1.0f, NULL);
|
||||
|
||||
MEM_freeN(rect_byte);
|
||||
|
||||
|
|
Loading…
Reference in New Issue