Draw Commands Draw Black

BlitzMax Forums/MiniB3D Module/Draw Commands Draw Black

BLaBZ(Posted 2013) [#1]
I'm not sure if this is a common problem, but for some reason Max2D's draw commands seems to only draw black under certain conditions.

Has anyone else experienced this before?


BLaBZ(Posted 2013) [#2]
Very Strange, apparently if I call DrawText(" ",0,0) before my DrawLine commands, the drawline commands are shown otherwise they just show black,


ima747(Posted 2013) [#3]
Are you setting the draw color before drawing the lines? are you enabling 2D mode and properly disabling it when done?


BLaBZ(Posted 2013) [#4]
Yes to both


SLotman(Posted 2013) [#5]
Post a small sample of the problem... or people won't be able to help you =/

Usually this works:

BeginMax2D()
SetColor 255,255,255
(do your 2d max commands here)
EndMax2D()


And call this AFTER 'RenderWorld' and BEFORE calling 'Flip' (Doing this from memory, so don't know if it's exactly those commands - but it gived the right idea).


jkrankie(Posted 2013) [#6]
try a glDisable(gl_texture_2d). If it's been left on nothing will render. drawtext uses a texture and cleans up after itself, so that may be why nothing show until you've used drawtext.

Cheers
Charlie