Ogre Line, Point and Triangles drawing on-fly

Problems building or running the engine, queries about how to use features etc.
Post Reply
User avatar
osolizig
Halfling
Posts: 56
Joined: Thu Jan 06, 2005 3:55 pm
Location: Ljubljana, Slovenia, Europe
x 1
Contact:

Ogre Line, Point and Triangles drawing on-fly

Post 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.
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post 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.
nfz
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 1263
Joined: Wed Sep 24, 2003 4:00 pm
Location: Halifax, Nova Scotia, Canada

Post 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.
User avatar
monster
OGRE Community Helper
OGRE Community Helper
Posts: 1098
Joined: Mon Sep 22, 2003 2:40 am
Location: Melbourne, Australia
Contact:

Post 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.
User avatar
Bren
Goblin
Posts: 215
Joined: Tue Jul 08, 2003 4:41 pm
Location: 0,0,0
Contact:

Post 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.
User avatar
monster
OGRE Community Helper
OGRE Community Helper
Posts: 1098
Joined: Mon Sep 22, 2003 2:40 am
Location: Melbourne, Australia
Contact:

Post 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
User avatar
neocryptek
Gnome
Posts: 335
Joined: Sat Mar 01, 2003 11:21 pm
Location: Idaho, USA
Contact:

Post by neocryptek »

monster wrote:I dunno who did write Nogredex, but it wasn't me!
rocketman, thread here

-N30
nfz
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 1263
Joined: Wed Sep 24, 2003 4:00 pm
Location: Halifax, Nova Scotia, Canada

Post by nfz »

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