Game Development Community

DglDrawLine off by one in D3D?

by James Spellman · in Torque Game Engine · 02/24/2005 (10:49 am) · 1 replies

I was working on an artsy complicated gui control and noticed that my dglDrawLines came up one pixel short in D3D. Is this a bug or some strange OpenGL math that I'm not aware of?

#1
02/24/2005 (11:09 am)
Might be related to D3Ds texel/pixel mapping...

http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/directx9_c/directx/graphics/programmingguide/FixedFunction/Textures/coordinates/mappingtexelstopixels.asp

You might have to detect D3D rendering and then alter your line drawing.