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 

Question about map() of index buffer


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> osgCompute [osgCompute]
View previous topic :: View next topic  
Author Message
martin31567
Newbie


Joined: 25 Aug 2011
Posts: 4

PostPosted: Sat Aug 27, 2011 4:14 am    Post subject:
Question about map() of index buffer
Reply with quote

Hi,
From web of osgCompute, I find a geometrie's index buffer can be mapped, as follows:
osg::ref_ptr<osgCompute::Memory> memory = memoryAdapter->getMemory();
void* devInd = memory->map( osgCompute::MAP_DEVICE_INDICES );

When I read the source code of osgCuda::Geometry, I found some problem as follows:
1. MAP_DEVICE_INDICES is defined in namespace osgCuda, rather than osgCompute.
2. Map of index buffer is implemented in Class IndexedGeometryMemory, but the class member _memory is initialized as Class GeometryMemory in the constructor of osgCuda::Geometry. In this way, the function map() is not related with index buffer.

So I think the codes above can't realize map() of index buffer.

In fact, My geometry utilizs many DrawElementsUInt, but the return value of map( osgCuda::MAP_DEVICE_INDICES ) is NULL.

I have revised the source code of osgCompute, but it still doesn't work. So I want to know the reason of the failure about map of index buffer.

Thank you!

Cheers,
Zhen
Back to top
View user's profile Send private message
Mick
User


Joined: 11 Mar 2009
Posts: 31

PostPosted: Wed Sep 21, 2011 10:42 am    Post subject:
Reply with quote

Dear Zhen,

yes you are right. osgCompute::MAP_DEVICE_INDICES is already documented and it will be included in the code in the upcoming release. We are sorry for any confusion.

Best regards,
Mick

_________________
SVT Group
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> osgCompute [osgCompute] 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 osggeometryshaders example question mgreene General 3 Tue Sep 12, 2017 3:12 pm View latest post
No new posts 【NEWBIE】Question about osg::Matri... Jiechang Guo General 5 Fri May 05, 2017 11:54 am View latest post
No new posts How to use frame buffer object in exi... saedrna1 General 2 Sat Feb 18, 2017 3:54 am View latest post
No new posts Vertex Buffer Object used inside disp... scrawl General 2 Thu Feb 16, 2017 9:14 pm View latest post
No new posts Buffer object pool and setUnrefImageD... scrawl General 1 Tue Feb 14, 2017 1:58 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