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 

Image::copySubImage


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


Joined: 13 Dec 2016
Posts: 10

PostPosted: Tue Dec 04, 2018 12:32 pm    Post subject:
Image::copySubImage
Reply with quote

Hi,

forgive me for asking a very beginner question.

I am trying to substitute some pixels in a Image with some data I have.
The data is just RGBA in floats.

So I am in doubt about the call parameters, and also what namespace I need to get GL_RGBA and GL_FLOAT from.
After the call to copySubImage, I am just gonna throw the subImg away.

img is just an image attached to a Texture2D.

Code:

osg::Image subImg = new osg::Image();
subImg->setImage(w,h,1, GL_RGBA, GL_RGBA, GL_FLOAT, data, osg::Image::AllocationMode->USE_MALLOC_FREE,1);
img->copySubImage(s,t,1,subImg);


Advice appreciated.

Cheers,
Nikolai
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 Missing 'png' image reader sdef General [3rdparty] 2 Mon Nov 12, 2018 5:51 am View latest post
No new posts Read Image from RTT romulogcerqueira General 6 Thu Sep 27, 2018 7:06 pm View latest post
No new posts Image containing floats ivar General 2 Thu Sep 20, 2018 9:18 am View latest post
No new posts minor change: move assumeSizedInterna... mp3butcher General 9 Wed Aug 15, 2018 10:07 pm View latest post
No new posts Drawing a partially transparent image... Jose Pedro Canilho General 6 Mon Jul 02, 2018 9:28 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