OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

osg::Drawable vs osg::Geometry


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
NoeMurr
Newbie


Joined: 12 Oct 2018
Posts: 3

PostPosted: Sun Oct 21, 2018 2:45 pm    Post subject:
osg::Drawable vs osg::Geometry
Reply with quote

Hi,

I need to draw a custom object in osg.

To do that I have to choose between derive from class osg::Drawable and deriving from osg::Geometry.

Which is the more efficient way to create a custom drawable object and why?

Thank you!

p.s. I'm new to osg, so I'm trying to understand the best practices.

Cheers,
Noè
Back to top
View user's profile Send private message Send e-mail
Chris Hanson
Guest





PostPosted: Sun Oct 21, 2018 6:27 pm    Post subject:
osg::Drawable vs osg::Geometry
Reply with quote

Suggesting the best approach would require you give us a little more detail about what kind of custom object it is. Can you describe better what you're trying to do, and less about how you are trying to do it?

On Sun, Oct 21, 2018 at 4:44 PM Noè Murr < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:

Quote:
Hi,

I need to draw a custom object in osg.

To do that I have to choose between derive from class osg::Drawable and deriving from osg::Geometry.

Which is the more efficient way to create a custom drawable object and why?

Thank you!

p.s. I'm new to osg, so I'm trying to understand the best practices.

Cheers,
Noè

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75105#75105





_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



--
Chris 'Xenon' Hanson, omo sanza lettere. http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Legal/IP • Forensics • Imaging • UAVs • GIS • GPS • osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile • iPhone/iPad/iOS • Android
@alphapixel facebook.com/alphapixel (775) 623-PIXL [7495]

------------------
Post generated by Mail2Forum
Back to top
mp3butcher (Julien Valentin)
Appreciator


Joined: 17 Feb 2010
Posts: 484
Location: France

PostPosted: Sun Oct 21, 2018 8:11 pm    Post subject:
Re: osg::Drawable vs osg::Geometry
Reply with quote

Hi
If you can fit in osg::Geometry semantic your data and just want to override drawimplementation, guidelines prescribe to setup a DrawCallback.
using osg::Geometry have also the advantage for your data to be interpreted for various task in osg (computebound,primitivefunctors, osgutil visitors..)
If you really need to subclass, prefer Drawable over Geometry if you don't want osg can interpret your Drawable as a Geometry (which is sometime the case..)

Cheers

NoeMurr wrote:
Hi,

I need to draw a custom object in osg.

To do that I have to choose between derive from class osg::Drawable and deriving from osg::Geometry.

Which is the more efficient way to create a custom drawable object and why?

Thank you!

p.s. I'm new to osg, so I'm trying to understand the best practices.

Cheers,
Noè

_________________
Twirling twirling twirling toward freedom
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts Drawable - recent commit causing prob... gwaldron General 3 Thu Aug 30, 2018 12:19 pm View latest post
No new posts [HELP] Properly using osg::VertexAttr... ppsychrite General 3 Wed Aug 01, 2018 12:17 pm View latest post
No new posts [Crash issue] How to add&remove d... pwang General 2 Thu Jul 26, 2018 10:10 am View latest post
No new posts Draw geometry on demand sergio2k18 General 5 Sun Jun 10, 2018 7:53 am View latest post
No new posts geometry shader with opengles lyn General 3 Mon Apr 02, 2018 1:41 am View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP