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-GLSL triangle adjacency


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
boulbo (Nabil)
Newbie


Joined: 18 Jul 2017
Posts: 3

PostPosted: Thu Jul 20, 2017 2:43 pm    Post subject:
OSG-GLSL triangle adjacency
Reply with quote

Hello, I'm using geometry shader with OSG to do some operations on mesh using GPU.
When i use triangles_adjacency  in the input layout, my shader crashes.
I tried with layout(triangles) in  and it's running well.


Is there any configuration in OSG that i should use, or a pre-processing on the mesh to understand triangle adjacency?


Regards,
Nabil 

------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message Send e-mail
SMesserschmidt (Sebastian Messerschmidt)
Forum Moderator


Joined: 10 Sep 2013
Posts: 767

PostPosted: Fri Jul 21, 2017 7:37 am    Post subject:
OSG-GLSL triangle adjacency
Reply with quote

Hi Nabil,
Quote:
Hello,
I'm using geometry shader with OSG to do some operations on mesh using GPU.
When i use /triangles_adjacency/ in the input layout, my shader crashes.
I tried with /layout(triangles) in/ and it's running well.

Is there any configuration in OSG that i should use, or a pre-processing
on the mesh to understand triangle adjacency?
You need to pre-process the mesh to get the adjacency information. There
is no facility in OSG that I know of, wich does this for you.


Cheers
Sebastian
Quote:

Regards,
Nabil






------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
boulbo (Nabil)
Newbie


Joined: 18 Jul 2017
Posts: 3

PostPosted: Fri Jul 21, 2017 8:43 am    Post subject:
OSG-GLSL triangle adjacency
Reply with quote

Thank you Sebastian. So If i set the DrawArrays mode of the PrimitiveSet, does it suffice?Otherwise, is it easy to implement? Sorry but i'm newby in OSG.


On 21 July 2017 at 09:36, Sebastian Messerschmidt < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:


Hi Nabil,
Quote:
Hello,
I'm using geometry shader with OSG to do some operations on mesh using GPU.
When i use /triangles_adjacency/  in the input layout, my shader crashes.
I tried with /layout(triangles) in/  and it's running well.

Is there any configuration in OSG that i should use, or a pre-processing on the mesh to understand triangle adjacency?
You need to pre-process the mesh to get the adjacency information. There is no facility in OSG that I know of, wich does this for you.


Cheers
Sebastian
Quote:

Regards,
Nabil


_______________________________________________
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





--
Nabil Khalifa

------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message Send e-mail
SMesserschmidt (Sebastian Messerschmidt)
Forum Moderator


Joined: 10 Sep 2013
Posts: 767

PostPosted: Fri Jul 21, 2017 9:03 am    Post subject:
OSG-GLSL triangle adjacency
Reply with quote

Hi Nabil,


Quote:
Thank you Sebastian. So If i set the DrawArrays mode of the
PrimitiveSet, does it suffice?
Otherwise, is it easy to implement? Sorry but i'm newby in OSG.
Can you elaborate on this?

Usually you need to set the program-parameter for output:
GL_GEOMETRY_INPUT_TYPE and simply pass you geometry.

So when using triangles for instance, you need to pass 3 additional
vertices per triangle (the neighboring ones). You can get the
appropriate order from the openGL spec or various examples.
I'd start with a minimal example with a fixed vertex set to see what
needs to be set in the state and program.


The osggeometryshader example might help here to get started.

Cheers
Sebastian
Quote:

On 21 July 2017 at 09:36, Sebastian Messerschmidt
< <mailto:>>
wrote:



Hi Nabil,

Hello,
I'm using geometry shader with OSG to do some operations on mesh
using GPU.
When i use /triangles_adjacency/ in the input layout, my shader
crashes.
I tried with /layout(triangles) in/ and it's running well.

Is there any configuration in OSG that i should use, or a
pre-processing on the mesh to understand triangle adjacency?

You need to pre-process the mesh to get the adjacency information.
There is no facility in OSG that I know of, wich does this for you.


Cheers
Sebastian


Regards,
Nabil


_______________________________________________
osg-users mailing list

<mailto:>
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
<http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org>




--
Nabil Khalifa


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
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 [Triangle Functor on Vec4array?] mp3butcher General 0 Mon Feb 20, 2017 11:40 am View latest post
No new posts Glsl structs and osg::Uniform. How? Steal General 3 Thu Jan 26, 2017 12:04 pm View latest post
No new posts GLSL 1.3 support for vertex-attrib al... robertosfield Submission 0 Fri Dec 23, 2016 5:08 pm View latest post
No new posts Tearing hair out over simple GLSL ins... loopy General 7 Thu Dec 22, 2016 5:17 pm View latest post
No new posts Migrate shaders to glsl 4.1 Bruno Oliveira General 1 Thu Nov 17, 2016 11:34 pm 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