Remove cpack
Places where it's removed are already replaced by newer logic.
This commit is contained in:
parent
f3550242ed
commit
002b2066ac
|
@ -359,8 +359,10 @@ void xyz_to_rgb(float xc, float yc, float zc, float *r, float *g, float *b, int
|
|||
}
|
||||
}
|
||||
|
||||
/* we define a 'cpack' here as a (3 byte color code) number that can be expressed like 0xFFAA66 or so.
|
||||
* for that reason it is sensitive for endianness... with this function it works correctly
|
||||
/**
|
||||
* We define a 'cpack' here as a (3 byte color code) number that can be expressed like 0xFFAA66 or so.
|
||||
* for that reason it is sensitive for endianness... with this function it works correctly.
|
||||
* \see #imm_cpack
|
||||
*/
|
||||
|
||||
unsigned int hsv_to_cpack(float h, float s, float v)
|
||||
|
|
|
@ -36,18 +36,6 @@
|
|||
#include "GPU_glew.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
/*
|
||||
* these should be phased out. cpack should be replaced in
|
||||
* code with calls to glColor3ub. - zr
|
||||
*/
|
||||
/*
|
||||
*
|
||||
* This define converts a numerical value to the equivalent 24-bit
|
||||
* color, while not being endian-sensitive. On little-endians, this
|
||||
* is the same as doing a 'naive' indexing, on big-endian, it is not!
|
||||
* */
|
||||
void cpack(unsigned int x);
|
||||
|
||||
/* hacking pointsize and linewidth */
|
||||
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
|
||||
# define glPointSize(f) glPointSize(U.pixelsize * _Generic((f), double: (float)(f), default: (f)))
|
||||
|
|
|
@ -677,14 +677,6 @@ void glaDrawImBuf_glsl_ctx(const bContext *C, ImBuf *ibuf, float x, float y, int
|
|||
glaDrawImBuf_glsl_ctx_clipping(C, ibuf, x, y, zoomfilter, 0.0f, 0.0f, 0.0f, 0.0f, zoom_x, zoom_y);
|
||||
}
|
||||
|
||||
void cpack(unsigned int x)
|
||||
{
|
||||
/* DEPRECATED: use imm_cpack */
|
||||
glColor3ub(( (x) & 0xFF),
|
||||
(((x) >> 8) & 0xFF),
|
||||
(((x) >> 16) & 0xFF));
|
||||
}
|
||||
|
||||
/* don't move to GPU_immediate_util.h because this uses user-prefs
|
||||
* and isn't very low level */
|
||||
void immDrawBorderCorners(unsigned int pos, const rcti *border, float zoomx, float zoomy)
|
||||
|
|
|
@ -7441,7 +7441,7 @@ static void draw_editfont(Scene *scene, SceneLayer *sl, View3D *v3d, RegionView3
|
|||
draw_editfont_textcurs(rv3d, ef->textcurs);
|
||||
|
||||
if (cu->flag & CU_FAST) {
|
||||
cpack(0xFFFFFF);
|
||||
imm_cpack(0xFFFFFF);
|
||||
set_inverted_drawing(1);
|
||||
drawDispList(scene, sl, v3d, rv3d, base, OB_WIRE, dflag, ob_wire_col);
|
||||
set_inverted_drawing(0);
|
||||
|
@ -8524,7 +8524,6 @@ void draw_object(Scene *scene, SceneLayer *sl, ARegion *ar, View3D *v3d, Base *b
|
|||
Object *ob = base->object;
|
||||
Curve *cu;
|
||||
RegionView3D *rv3d = ar->regiondata;
|
||||
unsigned int col = 0;
|
||||
unsigned char _ob_wire_col[4]; /* dont initialize this */
|
||||
const unsigned char *ob_wire_col = NULL; /* dont initialize this, use NULL crashes as a way to find invalid use */
|
||||
bool zbufoff = false, is_paint = false, empty_object = false;
|
||||
|
@ -8890,12 +8889,6 @@ afterdraw:
|
|||
{
|
||||
ParticleSystem *psys;
|
||||
|
||||
if ((dflag & DRAW_CONSTCOLOR) == 0) {
|
||||
/* for visibility, also while wpaint */
|
||||
if (col || (base->flag & BASE_SELECTED)) {
|
||||
cpack(0xFFFFFF);
|
||||
}
|
||||
}
|
||||
//glDepthMask(GL_FALSE);
|
||||
|
||||
gpuLoadMatrix(rv3d->viewmat);
|
||||
|
@ -8918,7 +8911,6 @@ afterdraw:
|
|||
gpuMultMatrix(ob->obmat);
|
||||
|
||||
//glDepthMask(GL_TRUE);
|
||||
if (col) cpack(col);
|
||||
}
|
||||
|
||||
/* draw edit particles last so that they can draw over child particles */
|
||||
|
@ -9474,8 +9466,6 @@ static void bbs_mesh_solid__drawCenter(void *userData, int index, const float ce
|
|||
static void bbs_mesh_solid_EM(BMEditMesh *em, Scene *scene, View3D *v3d,
|
||||
Object *ob, DerivedMesh *dm, bool use_faceselect)
|
||||
{
|
||||
cpack(0);
|
||||
|
||||
if (use_faceselect) {
|
||||
dm->drawMappedFaces(dm, bbs_mesh_solid__setSolidDrawOptions, NULL, NULL, em->bm, DM_DRAW_SKIP_HIDDEN | DM_DRAW_SELECT_USE_EDITMODE);
|
||||
|
||||
|
|
|
@ -34,12 +34,16 @@
|
|||
#include "GPU_matrix.h"
|
||||
|
||||
/**
|
||||
* Pack color into 3 bytes
|
||||
*
|
||||
* \Note BGR format (i.e. 0xBBGGRR)...
|
||||
*
|
||||
* \param x color.
|
||||
*/
|
||||
* Pack color into 3 bytes
|
||||
*
|
||||
* This define converts a numerical value to the equivalent 24-bit
|
||||
* color, while not being endian-sensitive. On little-endians, this
|
||||
* is the same as doing a 'naive' indexing, on big-endian, it is not!
|
||||
*
|
||||
* \note BGR format (i.e. 0xBBGGRR)...
|
||||
*
|
||||
* \param x color.
|
||||
*/
|
||||
void imm_cpack(unsigned int x)
|
||||
{
|
||||
immUniformColor3ub(((x) & 0xFF),
|
||||
|
|
|
@ -342,7 +342,6 @@ static void playanim_toscreen(PlayState *ps, PlayAnimPict *picture, struct ImBuf
|
|||
int sizex, sizey;
|
||||
float fsizex_inv, fsizey_inv;
|
||||
char str[32 + FILE_MAX];
|
||||
cpack(-1);
|
||||
BLI_snprintf(str, sizeof(str), "%s | %.2f frames/s", picture->name, fstep / swaptime);
|
||||
|
||||
playanim_window_get_size(&sizex, &sizey);
|
||||
|
|
Loading…
Reference in New Issue