Windows (VC6) build fixes, 02/##: grDrawLine() const issue.

this is a hack and need to be fixed properly by constifying other
procedures.
This commit is contained in:
sezero
2018-08-08 08:47:00 +03:00
parent d6448ee662
commit 0aa1e159bf
2 changed files with 8 additions and 5 deletions

View File

@@ -258,11 +258,13 @@ GR_ENTRY(grDrawPoint, void, (const void *p))
GR_ENTRY(grDrawLine, void, (const void *a, const void *b))
{
#define FN_NAME "grDrawLine"
const void *vertices[2] = {a, b};
void *vertices[2]; /**** FIXME: this needs to be const! ****/
GR_BEGIN_NOFIFOCHECK(FN_NAME, 91);
GDBG_INFO_MORE(gc->myLevel, "(a = 0x%x, b = 0x%x)\n", a, b);
vertices[0] = (void *)a; vertices[1] = (void *)b; /* FIXME! */
if (gc->state.grEnableArgs.primitive_smooth_mode & GR_AA_ORDERED_LINES_MASK)
_grAADrawLineStrip(GR_VTX_PTR_ARRAY, GR_LINES, 2, vertices);
else

View File

@@ -274,12 +274,13 @@ GR_ENTRY(grDrawPoint, void, (const void *p))
GR_ENTRY(grDrawLine, void, (const void *a, const void *b))
{
void *verts[2];
#define FN_NAME "grDrawLine"
void *verts[2]; /**** FIXME: this needs to be const! ****/
GR_BEGIN_NOFIFOCHECK(FN_NAME, 91);
GDBG_INFO_MORE(gc->myLevel, "(a = 0x%x, b = 0x%x)\n", a, b);
verts[0] = (void *)a; verts[1] = (void *)b;
verts[0] = (void *)a; verts[1] = (void *)b; /** FIXME **/
if (gc->state.grEnableArgs.primitive_smooth_mode & GR_AA_ORDERED_LINES_MASK)
_grAADrawLineStrip(GR_VTX_PTR_ARRAY, GR_LINES, 2, verts);