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 

How do I create a graphics context on a texture memory?


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


Joined: 24 Apr 2018
Posts: 2

PostPosted: Tue Apr 24, 2018 11:40 am    Post subject:
How do I create a graphics context on a texture memory?
Reply with quote

Hi,

We create an osg::Texture2D based on the PNG file that we read. How do we create a graphics context on that texture memory so that we can render into that memory and then re-save the PNG later.
All this has to be implemented without opening a graphics window.

Is it possible to do this in osg? If yes please point me towards some links/documentation if available as i have not found anything helpful in the osg forum/google yet.

Thanks in Advance!

Cheers,
Srinivas
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 11829

PostPosted: Tue Apr 24, 2018 2:24 pm    Post subject:
How do I create a graphics context on a texture memory?
Reply with quote

Hi Srinivas,

What you need to do is create a viewer with a PixelBuffer (also called
pbuffer) as the GraphicsContext rather than a GraphicsWindow. There
are several OSG examples that set up pbuffer graphics context.

Robert.

On 24 April 2018 at 12:40, Srinivas Prabhu <> wrote:
Quote:
Hi,

We create an osg::Texture2D based on the PNG file that we read. How do we create a graphics context on that texture memory so that we can render into that memory and then re-save the PNG later.
All this has to be implemented without opening a graphics window.

Is it possible to do this in osg? If yes please point me towards some links/documentation if available as i have not found anything helpful in the osg forum/google yet.

Thanks in Advance!

Cheers,
Srinivas

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








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


Joined: 18 Mar 2009
Posts: 11829

PostPosted: Tue Apr 24, 2018 2:25 pm    Post subject:
How do I create a graphics context on a texture memory?
Reply with quote

On 24 April 2018 at 15:23, Robert Osfield <> wrote:
Quote:
What you need to do is create a viewer with a PixelBuffer (also called
pbuffer) as the GraphicsContext rather than a GraphicsWindow. There
are several OSG examples that set up pbuffer graphics context.

Oops sent a bit prematurely. See examples like osgpostor or
osgscreencapture and look for references for pbuffer.

Robert


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


Joined: 24 Apr 2018
Posts: 2

PostPosted: Wed Apr 25, 2018 11:54 am    Post subject:
Reply with quote

Hi Robert,

Thank's for the prompt reply.

Cheers,
Srinivas
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 Leaking memory on node removal Tini General 1 Fri May 25, 2018 6:48 pm View latest post
No new posts Leaking memory on node removal Tini General 0 Fri May 25, 2018 6:39 pm View latest post
No new posts Leaking memory on node removal Tini General 0 Fri May 25, 2018 6:30 pm View latest post
No new posts Leaking memory on node removal Tini General 0 Fri May 25, 2018 6:27 pm View latest post
No new posts Setting OpenGL and graphics card sett... Chris Hanson General 2 Thu May 10, 2018 6:16 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