[SDK] issues drawing polyline in viewport


#21

Still the same problem.


#22

dunno then, though would say I’d rather use a mesh (as wireframe only) to render something like that as opposed to a polyline.


#23

I think the Z-Buffer flag has to be cleared like this:

(rlim & (~GW_Z_BUFFER))

#24

if you always want it drawn on top yes

if (drawOnTop) vpt->getGW()->setRndLimits(limits & ~GW_Z_BUFFER);

from point helper


#25

How did you get point’s source code? I’m using max 2014 sdk and there’s no point in samples folder.


#26
\maxsdk\samples\objects\helpers\pthelp.cpp

#27

Thanks Klvnk, I’ve solved the problem :slight_smile: I’ve noticed that the getRndLimits() returns “50” as int, so it’s 2+16+32:

#define GW_ILLUM				0x0000002
#define GW_TEXTURE			0x0000010
#define GW_Z_BUFFER			0x0000020

but when I press 7 to enter the statistics mode it returns 18 (16+2, so without GW_Z_BUFFER).
So now I don’t use the getRndLimits() function, I do it like this:

DWORD rl = GW_ILLUM | GW_TEXTURE | GW_Z_BUFFER;
gw->setRndLimits(rl);

and it works perfectly :slight_smile: