Page 1 of 1
Ogre Line, Point and Triangles drawing on-fly
Posted: Sat Feb 12, 2005 3:29 pm
by osolizig
I have a problem. The Novodex SDK debug mode sends me only data each frame about point, lines and trinagles. How can I set the Ogre to render those data.
Posted: Sat Feb 12, 2005 3:30 pm
by :wumpus:
Create vertex buffers that are large enough at the beginning (with HBU_DISCARD and HBU_WRITE_ONLY for speed), then fill them manually each frame.
Posted: Sun Feb 13, 2005 8:19 pm
by nfz
If you can find Monster's Nogredex demo, it comes with source and has a nice class that handles points, lines, triangles. Search the forum to find the link to the download.
Posted: Mon Feb 14, 2005 12:41 am
by monster
Much as I'd love to take the credit for that, unfortunately I can't. I dunno who did write Nogredex, but it wasn't me!
My OgreOde and Ogrewton libraries both contain classes to display debug geometry of this type, as does walaber's NewtOgre.
Posted: Mon Feb 14, 2005 3:18 am
by Bren
nfz wrote:If you can find Monster's Nogredex demo, it comes with source and has a nice class that handles points, lines, triangles. Search the forum to find the link to the download.
I really think this is something that should be incorporated into the engine.
Posted: Mon Feb 14, 2005 4:45 am
by monster
I hate to disagree, but typically the reasons why an application needs to draw geometry of this type (e.g. for debugging) are as many and varied as the applications themselves. I think that trying to come up with a generic debug line drawing class would probably be as much of a problem as coming up with a generic function to get the triangle data out of a mesh (like I suggested
here).
Like the mesh reading code, there are a number of Line drawing classes scattered around on the forums, and if the Wiki ever becomes available again, there are probably others there. This one is pretty much the exact one I used in both OgreOde and Ogrewton. Works a treat;
http://www.ogre3d.org/phpBB2/viewtopic.php?t=5342
Posted: Mon Feb 14, 2005 5:06 am
by neocryptek
monster wrote:I dunno who did write Nogredex, but it wasn't me!
rocketman,
thread here
-N30
Posted: Mon Feb 14, 2005 3:42 pm
by nfz

. Sorry monster and rocketman. I Should have reread the headers in the source and the readme.txt file.