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 

Is it possible to load texture without applying to a drawable


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 12337

PostPosted: Thu May 09, 2019 8:29 pm    Post subject:
Is it possible to load texture without applying to a drawable
Reply with quote

Hi Steven,

It probably isn't directly related to the lack of Drawable but my
guess is that the subgraph you have it on isn;t being traversed by the
cull or draw traversal so isn't being applied. We don't know enough
about your whole scene graph setup to know exactly what might be going
on.

As a general note, the OSG's compile traversal will explicitly call
Texture::compileGLObjects() for any Texture's you have in the scene
graph when the compile traversal is called on the first frame. If the
texture isn't added till after the first frame then you cold explictly
call Texture::compielGLObjects() within a Camera or other draw
callback.

Robert.

Robert.

On Thu, 9 May 2019 at 16:34, Steve Powers <> wrote:
Quote:

I am attempting to load a Texture2D into memory in order to pass the texture ID to a 3rd party OpenGL object that will use the ID within it's own drawable class.

The issue is that the TextureObject attached to the texture is not getting instantiated and I think this is because it is not assigned to a drawable object and thus not getting visited.


Instead, I set the texture to a stateset on an osg::Group node


stateset = group->getOrCreateStateSet();
stateset->setTextureAttributeAndModes(0, texture, osg::StateAttribute:ShockedN);


Is there a way to have this texture object instantiate without physically using the texture on a drawable?

Thank you!

Cheers,
Steven



------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 12337

PostPosted: Thu May 09, 2019 8:29 pm    Post subject:
Is it possible to load texture without applying to a drawable
Reply with quote

Hi Steven,

It probably isn't directly related to the lack of Drawable but my
guess is that the subgraph you have it on isn;t being traversed by the
cull or draw traversal so isn't being applied. We don't know enough
about your whole scene graph setup to know exactly what might be going
on.

As a general note, the OSG's compile traversal will explicitly call
Texture::compileGLObjects() for any Texture's you have in the scene
graph when the compile traversal is called on the first frame. If the
texture isn't added till after the first frame then you cold explictly
call Texture::compielGLObjects() within a Camera or other draw
callback.

Robert.

Robert.

On Thu, 9 May 2019 at 16:34, Steve Powers <> wrote:
Quote:

I am attempting to load a Texture2D into memory in order to pass the texture ID to a 3rd party OpenGL object that will use the ID within it's own drawable class.

The issue is that the TextureObject attached to the texture is not getting instantiated and I think this is because it is not assigned to a drawable object and thus not getting visited.


Instead, I set the texture to a stateset on an osg::Group node


stateset = group->getOrCreateStateSet();
stateset->setTextureAttributeAndModes(0, texture, osg::StateAttribute:ShockedN);


Is there a way to have this texture object instantiate without physically using the texture on a drawable?

Thank you!

Cheers,
Steven



------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 12337

PostPosted: Thu May 09, 2019 8:29 pm    Post subject:
Is it possible to load texture without applying to a drawable
Reply with quote

Hi Steven,

It probably isn't directly related to the lack of Drawable but my
guess is that the subgraph you have it on isn;t being traversed by the
cull or draw traversal so isn't being applied. We don't know enough
about your whole scene graph setup to know exactly what might be going
on.

As a general note, the OSG's compile traversal will explicitly call
Texture::compileGLObjects() for any Texture's you have in the scene
graph when the compile traversal is called on the first frame. If the
texture isn't added till after the first frame then you cold explictly
call Texture::compielGLObjects() within a Camera or other draw
callback.

Robert.

Robert.

On Thu, 9 May 2019 at 16:34, Steve Powers <> wrote:
Quote:

I am attempting to load a Texture2D into memory in order to pass the texture ID to a 3rd party OpenGL object that will use the ID within it's own drawable class.

The issue is that the TextureObject attached to the texture is not getting instantiated and I think this is because it is not assigned to a drawable object and thus not getting visited.


Instead, I set the texture to a stateset on an osg::Group node


stateset = group->getOrCreateStateSet();
stateset->setTextureAttributeAndModes(0, texture, osg::StateAttribute:ShockedN);


Is there a way to have this texture object instantiate without physically using the texture on a drawable?

Thank you!

Cheers,
Steven



------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 12337

PostPosted: Thu May 09, 2019 8:29 pm    Post subject:
Is it possible to load texture without applying to a drawable
Reply with quote

Hi Steven,

It probably isn't directly related to the lack of Drawable but my
guess is that the subgraph you have it on isn;t being traversed by the
cull or draw traversal so isn't being applied. We don't know enough
about your whole scene graph setup to know exactly what might be going
on.

As a general note, the OSG's compile traversal will explicitly call
Texture::compileGLObjects() for any Texture's you have in the scene
graph when the compile traversal is called on the first frame. If the
texture isn't added till after the first frame then you cold explictly
call Texture::compielGLObjects() within a Camera or other draw
callback.

Robert.

Robert.

On Thu, 9 May 2019 at 16:34, Steve Powers <> wrote:
Quote:

I am attempting to load a Texture2D into memory in order to pass the texture ID to a 3rd party OpenGL object that will use the ID within it's own drawable class.

The issue is that the TextureObject attached to the texture is not getting instantiated and I think this is because it is not assigned to a drawable object and thus not getting visited.


Instead, I set the texture to a stateset on an osg::Group node


stateset = group->getOrCreateStateSet();
stateset->setTextureAttributeAndModes(0, texture, osg::StateAttribute:ShockedN);


Is there a way to have this texture object instantiate without physically using the texture on a drawable?

Thank you!

Cheers,
Steven



------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 12337

PostPosted: Thu May 09, 2019 8:29 pm    Post subject:
Is it possible to load texture without applying to a drawable
Reply with quote

Hi Steven,

It probably isn't directly related to the lack of Drawable but my
guess is that the subgraph you have it on isn;t being traversed by the
cull or draw traversal so isn't being applied. We don't know enough
about your whole scene graph setup to know exactly what might be going
on.

As a general note, the OSG's compile traversal will explicitly call
Texture::compileGLObjects() for any Texture's you have in the scene
graph when the compile traversal is called on the first frame. If the
texture isn't added till after the first frame then you cold explictly
call Texture::compielGLObjects() within a Camera or other draw
callback.

Robert.

Robert.

On Thu, 9 May 2019 at 16:34, Steve Powers <> wrote:
Quote:

I am attempting to load a Texture2D into memory in order to pass the texture ID to a 3rd party OpenGL object that will use the ID within it's own drawable class.

The issue is that the TextureObject attached to the texture is not getting instantiated and I think this is because it is not assigned to a drawable object and thus not getting visited.


Instead, I set the texture to a stateset on an osg::Group node


stateset = group->getOrCreateStateSet();
stateset->setTextureAttributeAndModes(0, texture, osg::StateAttribute:ShockedN);


Is there a way to have this texture object instantiate without physically using the texture on a drawable?

Thank you!

Cheers,
Steven



------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 12337

PostPosted: Thu May 09, 2019 8:29 pm    Post subject:
Is it possible to load texture without applying to a drawable
Reply with quote

Hi Steven,

It probably isn't directly related to the lack of Drawable but my
guess is that the subgraph you have it on isn;t being traversed by the
cull or draw traversal so isn't being applied. We don't know enough
about your whole scene graph setup to know exactly what might be going
on.

As a general note, the OSG's compile traversal will explicitly call
Texture::compileGLObjects() for any Texture's you have in the scene
graph when the compile traversal is called on the first frame. If the
texture isn't added till after the first frame then you cold explictly
call Texture::compielGLObjects() within a Camera or other draw
callback.

Robert.

Robert.

On Thu, 9 May 2019 at 16:34, Steve Powers <> wrote:
Quote:

I am attempting to load a Texture2D into memory in order to pass the texture ID to a 3rd party OpenGL object that will use the ID within it's own drawable class.

The issue is that the TextureObject attached to the texture is not getting instantiated and I think this is because it is not assigned to a drawable object and thus not getting visited.


Instead, I set the texture to a stateset on an osg::Group node


stateset = group->getOrCreateStateSet();
stateset->setTextureAttributeAndModes(0, texture, osg::StateAttribute:ShockedN);


Is there a way to have this texture object instantiate without physically using the texture on a drawable?

Thank you!

Cheers,
Steven



------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 12337

PostPosted: Thu May 09, 2019 8:29 pm    Post subject:
Is it possible to load texture without applying to a drawable
Reply with quote

Hi Steven,

It probably isn't directly related to the lack of Drawable but my
guess is that the subgraph you have it on isn;t being traversed by the
cull or draw traversal so isn't being applied. We don't know enough
about your whole scene graph setup to know exactly what might be going
on.

As a general note, the OSG's compile traversal will explicitly call
Texture::compileGLObjects() for any Texture's you have in the scene
graph when the compile traversal is called on the first frame. If the
texture isn't added till after the first frame then you cold explictly
call Texture::compielGLObjects() within a Camera or other draw
callback.

Robert.

Robert.

On Thu, 9 May 2019 at 16:34, Steve Powers <> wrote:
Quote:

I am attempting to load a Texture2D into memory in order to pass the texture ID to a 3rd party OpenGL object that will use the ID within it's own drawable class.

The issue is that the TextureObject attached to the texture is not getting instantiated and I think this is because it is not assigned to a drawable object and thus not getting visited.


Instead, I set the texture to a stateset on an osg::Group node


stateset = group->getOrCreateStateSet();
stateset->setTextureAttributeAndModes(0, texture, osg::StateAttribute:ShockedN);


Is there a way to have this texture object instantiate without physically using the texture on a drawable?

Thank you!

Cheers,
Steven



------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 12337

PostPosted: Thu May 09, 2019 8:29 pm    Post subject:
Is it possible to load texture without applying to a drawable
Reply with quote

Hi Steven,

It probably isn't directly related to the lack of Drawable but my
guess is that the subgraph you have it on isn;t being traversed by the
cull or draw traversal so isn't being applied. We don't know enough
about your whole scene graph setup to know exactly what might be going
on.

As a general note, the OSG's compile traversal will explicitly call
Texture::compileGLObjects() for any Texture's you have in the scene
graph when the compile traversal is called on the first frame. If the
texture isn't added till after the first frame then you cold explictly
call Texture::compielGLObjects() within a Camera or other draw
callback.

Robert.

Robert.

On Thu, 9 May 2019 at 16:34, Steve Powers <> wrote:
Quote:

I am attempting to load a Texture2D into memory in order to pass the texture ID to a 3rd party OpenGL object that will use the ID within it's own drawable class.

The issue is that the TextureObject attached to the texture is not getting instantiated and I think this is because it is not assigned to a drawable object and thus not getting visited.


Instead, I set the texture to a stateset on an osg::Group node


stateset = group->getOrCreateStateSet();
stateset->setTextureAttributeAndModes(0, texture, osg::StateAttribute:ShockedN);


Is there a way to have this texture object instantiate without physically using the texture on a drawable?

Thank you!

Cheers,
Steven



------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 12337

PostPosted: Thu May 09, 2019 8:29 pm    Post subject:
Is it possible to load texture without applying to a drawable
Reply with quote

Hi Steven,

It probably isn't directly related to the lack of Drawable but my
guess is that the subgraph you have it on isn;t being traversed by the
cull or draw traversal so isn't being applied. We don't know enough
about your whole scene graph setup to know exactly what might be going
on.

As a general note, the OSG's compile traversal will explicitly call
Texture::compileGLObjects() for any Texture's you have in the scene
graph when the compile traversal is called on the first frame. If the
texture isn't added till after the first frame then you cold explictly
call Texture::compielGLObjects() within a Camera or other draw
callback.

Robert.

Robert.

On Thu, 9 May 2019 at 16:34, Steve Powers <> wrote:
Quote:

I am attempting to load a Texture2D into memory in order to pass the texture ID to a 3rd party OpenGL object that will use the ID within it's own drawable class.

The issue is that the TextureObject attached to the texture is not getting instantiated and I think this is because it is not assigned to a drawable object and thus not getting visited.


Instead, I set the texture to a stateset on an osg::Group node


stateset = group->getOrCreateStateSet();
stateset->setTextureAttributeAndModes(0, texture, osg::StateAttribute:ShockedN);


Is there a way to have this texture object instantiate without physically using the texture on a drawable?

Thank you!

Cheers,
Steven



------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
DrPowers
User


Joined: 10 Mar 2009
Posts: 61

PostPosted: Fri May 10, 2019 10:35 am    Post subject:
Is it possible to load texture without applying to a drawable
Reply with quote

I am attempting to load a Texture2D into memory in order to pass the texture ID to a 3rd party OpenGL object that will use the ID within it's own drawable class.


The issue is that the TextureObject attached to the texture is not getting instantiated and I think this is because it is not assigned to a drawable object and thus not getting visited.




Instead, I set the texture to a stateset on an osg::Group nodeĀ 




stateset = group->getOrCreateStateSet();
stateset->setTextureAttributeAndModes(0, texture, osg::StateAttribute:ShockedN);




Is there a way to have this texture object instantiate without physically using the texture on a drawable?


Thank you!


Cheers,
Steven

------------------
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 How do I move a Texture in an model ... newlife958 General 4 Tue Sep 17, 2019 1:16 am View latest post
No new posts Render to Texture and osgQt (osgQOpenGL) wroos General 2 Mon Sep 16, 2019 5:47 pm View latest post
No new posts Geode and Drawable Classes Trajce Nikolov NICK General 2 Mon Jul 29, 2019 11:19 am View latest post
No new posts I want to move the texture to rain. H... robertosfield General 4 Thu Jul 25, 2019 12:06 am View latest post
No new posts two pass rendering without enhancing ... Trajce Nikolov NICK General 2 Tue Jul 02, 2019 9: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