OpenGL immediate mode: transform_generics.c
Differential Revision: https://developer.blender.org/D2482 Part of T49043
This commit is contained in:
@@ -62,8 +62,7 @@
|
|||||||
|
|
||||||
#include "RNA_access.h"
|
#include "RNA_access.h"
|
||||||
|
|
||||||
#include "BIF_gl.h"
|
#include "GPU_immediate.h"
|
||||||
#include "BIF_glutil.h"
|
|
||||||
|
|
||||||
#include "BIK_api.h"
|
#include "BIK_api.h"
|
||||||
|
|
||||||
@@ -1050,14 +1049,19 @@ void drawLine(TransInfo *t, const float center[3], const float dir[3], char axis
|
|||||||
UI_GetThemeColor3ubv(TH_GRID, col);
|
UI_GetThemeColor3ubv(TH_GRID, col);
|
||||||
}
|
}
|
||||||
UI_make_axis_color(col, col2, axis);
|
UI_make_axis_color(col, col2, axis);
|
||||||
glColor3ubv(col2);
|
|
||||||
|
unsigned pos = add_attrib(immVertexFormat(), "pos", GL_FLOAT, 3, KEEP_FLOAT);
|
||||||
setlinestyle(0);
|
|
||||||
glBegin(GL_LINES);
|
immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR);
|
||||||
glVertex3fv(v1);
|
immUniformColor3ubv(col2);
|
||||||
glVertex3fv(v2);
|
|
||||||
glEnd();
|
immBegin(GL_LINES, 2);
|
||||||
|
immVertex3fv(pos, v1);
|
||||||
|
immVertex3fv(pos, v2);
|
||||||
|
immEnd();
|
||||||
|
|
||||||
|
immUnbindProgram();
|
||||||
|
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user