OpenGL: convert to new matrix API (part 1 of x)
Part of T49450 For this batch I focused on usage of (now-obsolete) macros in BIF_gl.h
This commit is contained in:
parent
06f7fba6aa
commit
938613f720
|
@ -47,7 +47,6 @@
|
|||
|
||||
#include "RNA_access.h"
|
||||
|
||||
#include "BIF_gl.h"
|
||||
#include "BIF_glutil.h"
|
||||
|
||||
#include "BLF_api.h"
|
||||
|
@ -234,9 +233,9 @@ void ui_draw_anti_roundbox(int mode, float minx, float miny, float maxx, float m
|
|||
draw_color[3] *= 0.125f;
|
||||
|
||||
for (j = 0; j < WIDGET_AA_JITTER; j++) {
|
||||
glTranslate2fv(jit[j]);
|
||||
gpuTranslate2fv(jit[j]);
|
||||
UI_draw_roundbox_gl_mode(mode, minx, miny, maxx, maxy, rad, draw_color);
|
||||
glTranslatef(-jit[j][0], -jit[j][1], 0.0f);
|
||||
gpuTranslate2f(-jit[j][0], -jit[j][1]);
|
||||
}
|
||||
|
||||
glDisable(GL_BLEND);
|
||||
|
|
|
@ -53,7 +53,6 @@
|
|||
|
||||
#include "WM_api.h"
|
||||
|
||||
#include "BIF_gl.h"
|
||||
#include "BIF_glutil.h"
|
||||
|
||||
#include "IMB_imbuf_types.h"
|
||||
|
@ -61,6 +60,7 @@
|
|||
#include "ED_view3d.h"
|
||||
|
||||
#include "GPU_immediate.h"
|
||||
#include "GPU_matrix.h"
|
||||
#include "GPU_basic_shader.h"
|
||||
|
||||
#include "UI_resources.h"
|
||||
|
@ -606,21 +606,20 @@ static void paint_draw_tex_overlay(UnifiedPaintSettings *ups, Brush *brush,
|
|||
glDepthFunc(GL_ALWAYS);
|
||||
|
||||
glMatrixMode(GL_TEXTURE);
|
||||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
gpuPushMatrix();
|
||||
gpuLoadIdentity();
|
||||
|
||||
if (mtex->brush_map_mode == MTEX_MAP_MODE_VIEW) {
|
||||
/* brush rotation */
|
||||
glTranslatef(0.5, 0.5, 0);
|
||||
glRotatef((double)RAD2DEGF((primary) ? ups->brush_rotation : ups->brush_rotation_sec),
|
||||
0.0, 0.0, 1.0);
|
||||
glTranslatef(-0.5f, -0.5f, 0);
|
||||
gpuTranslate2f(0.5, 0.5);
|
||||
gpuRotate2D(RAD2DEGF(primary ? ups->brush_rotation : ups->brush_rotation_sec));
|
||||
gpuTranslate2f(-0.5f, -0.5f);
|
||||
|
||||
/* scale based on tablet pressure */
|
||||
if (primary && ups->stroke_active && BKE_brush_use_size_pressure(vc->scene, brush)) {
|
||||
glTranslatef(0.5f, 0.5f, 0);
|
||||
glScalef(1.0f / ups->size_pressure_value, 1.0f / ups->size_pressure_value, 1);
|
||||
glTranslatef(-0.5f, -0.5f, 0);
|
||||
gpuTranslate2f(0.5f, 0.5f);
|
||||
gpuScaleUniform(1.0f / ups->size_pressure_value);
|
||||
gpuTranslate2f(-0.5f, -0.5f);
|
||||
}
|
||||
|
||||
if (ups->draw_anchored) {
|
||||
|
@ -659,12 +658,12 @@ static void paint_draw_tex_overlay(UnifiedPaintSettings *ups, Brush *brush,
|
|||
quad.ymax = brush->mask_stencil_dimension[1];
|
||||
}
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glPushMatrix();
|
||||
gpuPushMatrix();
|
||||
if (primary)
|
||||
glTranslate2fv(brush->stencil_pos);
|
||||
gpuTranslate2fv(brush->stencil_pos);
|
||||
else
|
||||
glTranslate2fv(brush->mask_stencil_pos);
|
||||
glRotatef(RAD2DEGF(mtex->rot), 0, 0, 1);
|
||||
gpuTranslate2fv(brush->mask_stencil_pos);
|
||||
gpuRotate2D(RAD2DEGF(mtex->rot));
|
||||
glMatrixMode(GL_TEXTURE);
|
||||
}
|
||||
|
||||
|
@ -688,11 +687,11 @@ static void paint_draw_tex_overlay(UnifiedPaintSettings *ups, Brush *brush,
|
|||
glVertex2f(quad.xmin, quad.ymax);
|
||||
glEnd();
|
||||
|
||||
glPopMatrix();
|
||||
gpuPopMatrix();
|
||||
|
||||
if (mtex->brush_map_mode == MTEX_MAP_MODE_STENCIL) {
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glPopMatrix();
|
||||
gpuPopMatrix();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -740,11 +739,11 @@ static void paint_draw_cursor_overlay(UnifiedPaintSettings *ups, Brush *brush,
|
|||
/* scale based on tablet pressure */
|
||||
if (ups->stroke_active && BKE_brush_use_size_pressure(vc->scene, brush)) {
|
||||
do_pop = true;
|
||||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
glTranslate2fv(center);
|
||||
glScalef(ups->size_pressure_value, ups->size_pressure_value, 1);
|
||||
glTranslatef(-center[0], -center[1], 0);
|
||||
gpuPushMatrix();
|
||||
gpuLoadIdentity();
|
||||
gpuTranslate2fv(center);
|
||||
gpuScaleUniform(ups->size_pressure_value);
|
||||
gpuTranslate2f(-center[0], -center[1]);
|
||||
}
|
||||
|
||||
glColor4f(U.sculpt_paint_overlay_col[0],
|
||||
|
@ -765,7 +764,7 @@ static void paint_draw_cursor_overlay(UnifiedPaintSettings *ups, Brush *brush,
|
|||
glEnd();
|
||||
|
||||
if (do_pop)
|
||||
glPopMatrix();
|
||||
gpuPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -55,7 +55,6 @@
|
|||
#include "ED_mask.h"
|
||||
#include "ED_gpencil.h"
|
||||
|
||||
#include "BIF_gl.h"
|
||||
#include "BIF_glutil.h"
|
||||
|
||||
#include "GPU_immediate.h"
|
||||
|
@ -353,11 +352,11 @@ static void draw_stabilization_border(SpaceClip *sc, ARegion *ar, int width, int
|
|||
glEnable(GL_COLOR_LOGIC_OP);
|
||||
glLogicOp(GL_NOR);
|
||||
|
||||
glPushMatrix();
|
||||
glTranslatef(x, y, 0.0f);
|
||||
gpuPushMatrix();
|
||||
gpuTranslate2f(x, y);
|
||||
|
||||
glScalef(zoomx, zoomy, 1.0f);
|
||||
glMultMatrixf(sc->stabmat);
|
||||
gpuScale2f(zoomx, zoomy);
|
||||
gpuMultMatrix3D(sc->stabmat); /* XXX can we make stabmat a 2D matrix? --merwin */
|
||||
|
||||
unsigned int pos = add_attrib(immVertexFormat(), "pos", GL_FLOAT, 2, KEEP_FLOAT);
|
||||
|
||||
|
@ -368,7 +367,7 @@ static void draw_stabilization_border(SpaceClip *sc, ARegion *ar, int width, int
|
|||
|
||||
immUnbindProgram();
|
||||
|
||||
glPopMatrix();
|
||||
gpuPopMatrix();
|
||||
|
||||
glDisable(GL_COLOR_LOGIC_OP);
|
||||
|
||||
|
@ -582,9 +581,9 @@ static void draw_marker_outline(SpaceClip *sc, MovieTrackingTrack *track, MovieT
|
|||
}
|
||||
|
||||
/* pattern and search outline */
|
||||
glPushMatrix();
|
||||
glTranslate2fv(marker_pos);
|
||||
gpuMatrixUpdate_legacy();
|
||||
gpuPushMatrix();
|
||||
gpuTranslate2fv(marker_pos);
|
||||
gpuMatrixUpdate_legacy(); /* remove */
|
||||
|
||||
if (sc->flag & SC_SHOW_MARKER_PATTERN) {
|
||||
immBegin(GL_LINE_LOOP, 4);
|
||||
|
@ -605,8 +604,8 @@ static void draw_marker_outline(SpaceClip *sc, MovieTrackingTrack *track, MovieT
|
|||
marker->search_max[1]);
|
||||
}
|
||||
|
||||
glPopMatrix();
|
||||
gpuMatrixUpdate_legacy();
|
||||
gpuPopMatrix();
|
||||
gpuMatrixUpdate_legacy(); /* remove */
|
||||
}
|
||||
|
||||
static void track_colors(MovieTrackingTrack *track, int act, float col[3], float scol[3])
|
||||
|
@ -711,9 +710,9 @@ static void draw_marker_areas(SpaceClip *sc, MovieTrackingTrack *track, MovieTra
|
|||
}
|
||||
|
||||
/* pattern */
|
||||
glPushMatrix();
|
||||
glTranslate2fv(marker_pos);
|
||||
gpuMatrixUpdate_legacy();
|
||||
gpuPushMatrix();
|
||||
gpuTranslate2fv(marker_pos);
|
||||
gpuMatrixUpdate_legacy(); /* remove */
|
||||
|
||||
if (tiny) {
|
||||
setlinestyle(3);
|
||||
|
@ -769,8 +768,8 @@ static void draw_marker_areas(SpaceClip *sc, MovieTrackingTrack *track, MovieTra
|
|||
setlinestyle(0);
|
||||
}
|
||||
|
||||
glPopMatrix();
|
||||
gpuMatrixUpdate_legacy();
|
||||
gpuPopMatrix();
|
||||
gpuMatrixUpdate_legacy(); /* remove */
|
||||
}
|
||||
|
||||
static float get_shortest_pattern_side(MovieTrackingMarker *marker)
|
||||
|
@ -845,9 +844,9 @@ static void draw_marker_slide_zones(SpaceClip *sc, MovieTrackingTrack *track, Mo
|
|||
immUniformThemeColor(TH_MARKER_OUTLINE);
|
||||
}
|
||||
|
||||
glPushMatrix();
|
||||
glTranslate2fv(marker_pos);
|
||||
gpuMatrixUpdate_legacy();
|
||||
gpuPushMatrix();
|
||||
gpuTranslate2fv(marker_pos);
|
||||
gpuMatrixUpdate_legacy(); /* remove */
|
||||
|
||||
dx = 6.0f / width / sc->zoom;
|
||||
dy = 6.0f / height / sc->zoom;
|
||||
|
@ -906,8 +905,8 @@ static void draw_marker_slide_zones(SpaceClip *sc, MovieTrackingTrack *track, Mo
|
|||
draw_marker_slide_square(tilt_ctrl[0], tilt_ctrl[1], patdx, patdy, outline, px, pos);
|
||||
}
|
||||
|
||||
glPopMatrix();
|
||||
gpuMatrixUpdate_legacy();
|
||||
gpuPopMatrix();
|
||||
gpuMatrixUpdate_legacy(); /* remove */
|
||||
}
|
||||
|
||||
static void draw_marker_texts(SpaceClip *sc, MovieTrackingTrack *track, MovieTrackingMarker *marker,
|
||||
|
@ -1085,7 +1084,7 @@ static void draw_plane_marker_image(Scene *scene,
|
|||
plane_marker->corners,
|
||||
perspective_matrix);
|
||||
|
||||
homogeneous_2d_to_gl_matrix(perspective_matrix, gl_matrix);
|
||||
homogeneous_2d_to_gl_matrix(perspective_matrix, gl_matrix); /* XXX update for new 2D matrix API --merwin */
|
||||
|
||||
if (plane_track->image_opacity != 1.0f || ibuf->planes == 32) {
|
||||
transparent = true;
|
||||
|
@ -1103,8 +1102,8 @@ static void draw_plane_marker_image(Scene *scene,
|
|||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, ibuf->x, ibuf->y, 0, GL_RGBA,
|
||||
GL_UNSIGNED_BYTE, display_buffer);
|
||||
|
||||
glPushMatrix();
|
||||
glMultMatrixf(gl_matrix);
|
||||
gpuPushMatrix();
|
||||
gpuMultMatrix3D(gl_matrix); /* XXX update for new 2D matrix API --merwin */
|
||||
|
||||
VertexFormat *imm_format = immVertexFormat();
|
||||
unsigned int pos = add_attrib(imm_format, "pos", GL_FLOAT, 2, KEEP_FLOAT);
|
||||
|
@ -1132,7 +1131,7 @@ static void draw_plane_marker_image(Scene *scene,
|
|||
|
||||
immUnbindProgram();
|
||||
|
||||
glPopMatrix();
|
||||
gpuPopMatrix();
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, 0);
|
||||
|
||||
|
@ -1297,13 +1296,13 @@ static void draw_tracking_tracks(SpaceClip *sc, Scene *scene, ARegion *ar, Movie
|
|||
|
||||
UI_view2d_view_to_region_fl(&ar->v2d, 0.0f, 0.0f, &x, &y);
|
||||
|
||||
glPushMatrix();
|
||||
glTranslatef(x, y, 0);
|
||||
gpuPushMatrix();
|
||||
gpuTranslate2f(x, y);
|
||||
|
||||
glPushMatrix();
|
||||
glScalef(zoomx, zoomy, 0);
|
||||
glMultMatrixf(sc->stabmat);
|
||||
glScalef(width, height, 0);
|
||||
gpuPushMatrix();
|
||||
gpuScale2f(zoomx, zoomy);
|
||||
gpuMultMatrix3D(sc->stabmat); /* XXX would like 2D stabmat --merwin */
|
||||
gpuScale2f(width, height);
|
||||
|
||||
act_track = BKE_tracking_track_get_active(tracking);
|
||||
|
||||
|
@ -1494,7 +1493,7 @@ static void draw_tracking_tracks(SpaceClip *sc, Scene *scene, ARegion *ar, Movie
|
|||
|
||||
immUnbindProgram();
|
||||
|
||||
glPopMatrix();
|
||||
gpuPopMatrix();
|
||||
|
||||
if (sc->flag & SC_SHOW_NAMES) {
|
||||
/* scaling should be cleared before drawing texts, otherwise font would also be scaled */
|
||||
|
@ -1520,7 +1519,7 @@ static void draw_tracking_tracks(SpaceClip *sc, Scene *scene, ARegion *ar, Movie
|
|||
}
|
||||
}
|
||||
|
||||
glPopMatrix();
|
||||
gpuPopMatrix();
|
||||
|
||||
if (marker_pos)
|
||||
MEM_freeN(marker_pos);
|
||||
|
@ -1547,11 +1546,11 @@ static void draw_distortion(SpaceClip *sc, ARegion *ar, MovieClip *clip,
|
|||
|
||||
UI_view2d_view_to_region_fl(&ar->v2d, 0.0f, 0.0f, &x, &y);
|
||||
|
||||
glPushMatrix();
|
||||
glTranslatef(x, y, 0);
|
||||
glScalef(zoomx, zoomy, 0);
|
||||
glMultMatrixf(sc->stabmat);
|
||||
glScalef(width, height, 0);
|
||||
gpuPushMatrix();
|
||||
gpuTranslate2f(x, y);
|
||||
gpuScale2f(zoomx, zoomy);
|
||||
gpuMultMatrix3D(sc->stabmat); /* XXX make 2D */
|
||||
gpuScale2f(width, height);
|
||||
|
||||
unsigned int position = add_attrib(immVertexFormat(), "pos", GL_FLOAT, 2, KEEP_FLOAT);
|
||||
|
||||
|
@ -1729,7 +1728,7 @@ static void draw_distortion(SpaceClip *sc, ARegion *ar, MovieClip *clip,
|
|||
|
||||
immUnbindProgram();
|
||||
|
||||
glPopMatrix();
|
||||
gpuPopMatrix();
|
||||
}
|
||||
|
||||
void clip_draw_main(const bContext *C, SpaceClip *sc, ARegion *ar)
|
||||
|
@ -1826,8 +1825,8 @@ void clip_draw_grease_pencil(bContext *C, int onlyv2d)
|
|||
* associated with the clip is already drawn in draw_distortion
|
||||
*/
|
||||
if ((sc->flag & SC_MANUAL_CALIBRATION) == 0 || is_track_source) {
|
||||
glPushMatrix();
|
||||
glMultMatrixf(sc->unistabmat);
|
||||
gpuPushMatrix();
|
||||
gpuMultMatrix3D(sc->unistabmat); /* XXX make 2D */
|
||||
|
||||
if (is_track_source) {
|
||||
MovieTrackingTrack *track = BKE_tracking_track_get_active(&sc->clip->tracking);
|
||||
|
@ -1836,13 +1835,13 @@ void clip_draw_grease_pencil(bContext *C, int onlyv2d)
|
|||
int framenr = ED_space_clip_get_clip_frame_number(sc);
|
||||
MovieTrackingMarker *marker = BKE_tracking_marker_get(track, framenr);
|
||||
|
||||
glTranslate2fv(marker->pos);
|
||||
gpuTranslate2fv(marker->pos);
|
||||
}
|
||||
}
|
||||
|
||||
ED_gpencil_draw_2dimage(C);
|
||||
|
||||
glPopMatrix();
|
||||
gpuPopMatrix();
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -935,11 +935,11 @@ void view3d_cached_text_draw_end(View3D *v3d, ARegion *ar, bool depth_write, flo
|
|||
}
|
||||
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glPushMatrix();
|
||||
gpuPushMatrix();
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glPushMatrix();
|
||||
gpuPushMatrix();
|
||||
wmOrtho2_region_pixelspace(ar);
|
||||
glLoadIdentity();
|
||||
gpuLoadIdentity();
|
||||
|
||||
if (depth_write) {
|
||||
if (v3d->zbuf) glDisable(GL_DEPTH_TEST);
|
||||
|
@ -974,9 +974,9 @@ void view3d_cached_text_draw_end(View3D *v3d, ARegion *ar, bool depth_write, flo
|
|||
}
|
||||
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glPopMatrix();
|
||||
gpuPopMatrix();
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glPopMatrix();
|
||||
gpuPopMatrix();
|
||||
|
||||
if (rv3d->rflag & RV3D_CLIPPING) {
|
||||
ED_view3d_clipping_enable();
|
||||
|
@ -1679,7 +1679,7 @@ static void draw_viewport_object_reconstruction(
|
|||
if ((tracking_object->flag & TRACKING_OBJECT_CAMERA) == 0)
|
||||
mul_v3_fl(camera_size, tracking_object->scale);
|
||||
|
||||
glPushMatrix();
|
||||
gpuPushMatrix();
|
||||
|
||||
if (tracking_object->flag & TRACKING_OBJECT_CAMERA) {
|
||||
/* current ogl matrix is translated in camera space, bundles should
|
||||
|
@ -1687,8 +1687,8 @@ static void draw_viewport_object_reconstruction(
|
|||
* from current ogl matrix */
|
||||
invert_m4_m4(imat, base->object->obmat);
|
||||
|
||||
glMultMatrixf(imat);
|
||||
glMultMatrixf(mat);
|
||||
gpuMultMatrix3D(imat);
|
||||
gpuMultMatrix3D(mat);
|
||||
}
|
||||
else {
|
||||
float obmat[4][4];
|
||||
|
@ -1697,7 +1697,7 @@ static void draw_viewport_object_reconstruction(
|
|||
BKE_tracking_camera_get_reconstructed_interpolate(tracking, tracking_object, framenr, obmat);
|
||||
|
||||
invert_m4_m4(imat, obmat);
|
||||
glMultMatrixf(imat);
|
||||
gpuMultMatrix3D(imat);
|
||||
}
|
||||
|
||||
for (track = tracksbase->first; track; track = track->next) {
|
||||
|
@ -1712,11 +1712,11 @@ static void draw_viewport_object_reconstruction(
|
|||
if (dflag & DRAW_PICKING)
|
||||
GPU_select_load_id(base->selcol + (tracknr << 16));
|
||||
|
||||
glPushMatrix();
|
||||
glTranslate3fv(track->bundle_pos);
|
||||
glScalef(v3d->bundle_size / 0.05f / camera_size[0],
|
||||
v3d->bundle_size / 0.05f / camera_size[1],
|
||||
v3d->bundle_size / 0.05f / camera_size[2]);
|
||||
gpuPushMatrix();
|
||||
gpuTranslate3fv(track->bundle_pos);
|
||||
gpuScale3f(v3d->bundle_size / 0.05f / camera_size[0],
|
||||
v3d->bundle_size / 0.05f / camera_size[1],
|
||||
v3d->bundle_size / 0.05f / camera_size[2]);
|
||||
|
||||
const int v3d_drawtype = view3d_effective_drawtype(v3d);
|
||||
if (v3d_drawtype == OB_WIRE) {
|
||||
|
@ -1738,7 +1738,7 @@ static void draw_viewport_object_reconstruction(
|
|||
if (v3d->bundle_drawtype == OB_EMPTY_SPHERE) {
|
||||
Batch *batch;
|
||||
|
||||
glScalef(0.05f, 0.05f, 0.05f);
|
||||
gpuScaleUniform(0.05f);
|
||||
|
||||
/* selection outline */
|
||||
if (selected) {
|
||||
|
@ -1796,7 +1796,7 @@ static void draw_viewport_object_reconstruction(
|
|||
}
|
||||
}
|
||||
|
||||
glPopMatrix();
|
||||
gpuPopMatrix();
|
||||
|
||||
if ((dflag & DRAW_PICKING) == 0 && (v3d->flag2 & V3D_SHOW_BUNDLENAME)) {
|
||||
float pos[3];
|
||||
|
@ -1836,7 +1836,7 @@ static void draw_viewport_object_reconstruction(
|
|||
}
|
||||
}
|
||||
|
||||
glPopMatrix();
|
||||
gpuPopMatrix();
|
||||
|
||||
*global_track_index = tracknr;
|
||||
}
|
||||
|
@ -5946,7 +5946,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
|
|||
if ((ob->flag & OB_FROMGROUP) != 0) {
|
||||
float mat[4][4];
|
||||
mul_m4_m4m4(mat, ob->obmat, psys->imat);
|
||||
glMultMatrixf(mat);
|
||||
gpuMultMatrix3D(mat);
|
||||
}
|
||||
|
||||
/* needed for text display */
|
||||
|
@ -6536,7 +6536,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
|
|||
}
|
||||
|
||||
if ((ob->flag & OB_FROMGROUP) != 0) {
|
||||
glLoadMatrixf(rv3d->viewmat);
|
||||
gpuLoadMatrix3D(rv3d->viewmat);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8856,12 +8856,12 @@ afterdraw:
|
|||
if ((sb = ob->soft)) {
|
||||
if (sb->solverflags & SBSO_ESTIMATEIPO) {
|
||||
|
||||
glLoadMatrixf(rv3d->viewmat);
|
||||
gpuLoadMatrix3D(rv3d->viewmat);
|
||||
copy_m3_m3(msc, sb->lscale);
|
||||
copy_m3_m3(mrt, sb->lrot);
|
||||
mul_m3_m3m3(mtr, mrt, msc);
|
||||
ob_draw_RE_motion(sb->lcom, mtr, tipw, tiph, drawsize);
|
||||
glMultMatrixf(ob->obmat);
|
||||
gpuMultMatrix3D(ob->obmat);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8886,7 +8886,7 @@ afterdraw:
|
|||
}
|
||||
//glDepthMask(GL_FALSE);
|
||||
|
||||
glLoadMatrixf(rv3d->viewmat);
|
||||
gpuLoadMatrix3D(rv3d->viewmat);
|
||||
|
||||
view3d_cached_text_draw_begin();
|
||||
|
||||
|
@ -8903,7 +8903,7 @@ afterdraw:
|
|||
invert_m4_m4(ob->imat, ob->obmat);
|
||||
view3d_cached_text_draw_end(v3d, ar, 0, NULL);
|
||||
|
||||
glMultMatrixf(ob->obmat);
|
||||
gpuMultMatrix3D(ob->obmat);
|
||||
|
||||
//glDepthMask(GL_TRUE);
|
||||
if (col) cpack(col);
|
||||
|
@ -8917,10 +8917,10 @@ afterdraw:
|
|||
if (ob->mode & OB_MODE_PARTICLE_EDIT && is_obact) {
|
||||
PTCacheEdit *edit = PE_create_current(scene, ob);
|
||||
if (edit) {
|
||||
glLoadMatrixf(rv3d->viewmat);
|
||||
gpuLoadMatrix3D(rv3d->viewmat);
|
||||
draw_update_ptcache_edit(scene, sl, ob, edit);
|
||||
draw_ptcache_edit(scene, v3d, edit);
|
||||
glMultMatrixf(ob->obmat);
|
||||
gpuMultMatrix3D(ob->obmat);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8931,8 +8931,8 @@ afterdraw:
|
|||
const bool show_smoke = (CFRA >= sds->point_cache[0]->startframe);
|
||||
float viewnormal[3];
|
||||
|
||||
glLoadMatrixf(rv3d->viewmat);
|
||||
glMultMatrixf(ob->obmat);
|
||||
gpuLoadMatrix3D(rv3d->viewmat);
|
||||
gpuMultMatrix3D(ob->obmat);
|
||||
|
||||
if (!render_override) {
|
||||
BoundBox bb;
|
||||
|
@ -9099,7 +9099,7 @@ afterdraw:
|
|||
/* return warning, clear temp flag */
|
||||
v3d->flag2 &= ~V3D_SHOW_SOLID_MATCAP;
|
||||
|
||||
glLoadMatrixf(rv3d->viewmat);
|
||||
gpuLoadMatrix3D(rv3d->viewmat);
|
||||
|
||||
if (zbufoff) {
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
|
@ -9554,7 +9554,7 @@ void draw_object_backbufsel(Scene *scene, View3D *v3d, RegionView3D *rv3d, Objec
|
|||
{
|
||||
ToolSettings *ts = scene->toolsettings;
|
||||
|
||||
glMultMatrixf(ob->obmat);
|
||||
gpuMultMatrix3D(ob->obmat);
|
||||
|
||||
glClearDepth(1.0); glClear(GL_DEPTH_BUFFER_BIT);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
|
@ -9614,7 +9614,7 @@ void draw_object_backbufsel(Scene *scene, View3D *v3d, RegionView3D *rv3d, Objec
|
|||
break;
|
||||
}
|
||||
|
||||
glLoadMatrixf(rv3d->viewmat);
|
||||
gpuLoadMatrix3D(rv3d->viewmat);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -52,10 +52,10 @@
|
|||
|
||||
#include "BKE_scene.h"
|
||||
|
||||
#include "BIF_gl.h"
|
||||
#include "BIF_glutil.h"
|
||||
|
||||
#include "GPU_immediate.h"
|
||||
#include "GPU_matrix.h"
|
||||
|
||||
#include "ED_image.h"
|
||||
#include "ED_mesh.h"
|
||||
|
@ -79,7 +79,7 @@ void ED_image_draw_cursor(ARegion *ar, const float cursor[2])
|
|||
x_fac = zoom[0];
|
||||
y_fac = zoom[1];
|
||||
|
||||
glTranslate2fv(cursor);
|
||||
gpuTranslate2fv(cursor);
|
||||
|
||||
unsigned int pos = add_attrib(immVertexFormat(), "pos", GL_FLOAT, 2, KEEP_FLOAT);
|
||||
|
||||
|
@ -140,7 +140,7 @@ void ED_image_draw_cursor(ARegion *ar, const float cursor[2])
|
|||
|
||||
immUnbindProgram();
|
||||
|
||||
glTranslatef(-cursor[0], -cursor[1], 0.0);
|
||||
gpuTranslate2f(-cursor[0], -cursor[1]);
|
||||
setlinestyle(0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue