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: 12132

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: 12132

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 ~GLExtensions clears cached values fo... robertosfield Submission 0 Tue Oct 02, 2018 11:32 am View latest post
No new posts the speed of PagedLOD create nodes snowlove General 0 Thu Sep 20, 2018 8:07 am View latest post
No new posts context IDs andyskinner General 41 Mon Sep 17, 2018 6:13 pm View latest post
No new posts Rend to Texture Once GuiYe General 1 Sun Aug 26, 2018 7:31 am View latest post
No new posts Can't share Texture among several tex... mp3butcher General 1 Fri Aug 17, 2018 11:06 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