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 remove mipmap data from osg::Image Trajce Nikolov NICK General 0 Tue May 28, 2019 2:40 pm View latest post
No new posts Write Image From texture Generated by... GarfieldPig General 1 Wed May 08, 2019 11:42 am View latest post
No new posts Image capture in memory icf80 General 12 Fri Apr 12, 2019 6:11 pm View latest post
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


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP