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 getColor not implemented for GL_RED


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


Joined: 04 Apr 2018
Posts: 14

PostPosted: Fri May 18, 2018 11:24 am    Post subject:
Image getColor not implemented for GL_RED
Reply with quote

Hi,
I was just trying to read out an Image with getColor(). My texture is a LUT, so I chose a pixel format GL_RED. This works fine in my shader, but for the getColor method this format is not implemented*, thus it returns vec4(1, 1, 1, 1) all the time.

*getColor doesn't implement it itself, but it calls _readColor and there GL_RED is missing.

Now judging by the code I can change to GL_ALPHA and achieve my result, but adding the GL_RED with more or less the same code seems like it isn't too much work and I find it more intuitive to use only the red channel (rather than only the alpha channel).

Kind Regards,
Tim

p.s: @robert, in case you advice me to change my name again - i tried, i can't. there is no possibility for me to do so in my profile settings (or perhaps i just don't have the authority).[/i]
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 12148

PostPosted: Fri May 18, 2018 1:01 pm    Post subject:
Image getColor not implemented for GL_RED
Reply with quote

Hi Tim,

Quote:
Hi,
I was just trying to read out an Image with getColor(). My texture is LUT, so I chose a pixel format GL_RED. This works fine in my shader, but for the getColor method this format is not implemented, thus it returns vec4(1, 1, 1, 1) all the time.

Now judging by the code I can change to GL_ALPHA and achieve my result, but adding the GL_RED with more or less the same code seems like it isn't too much work and I find it more intuitive to use only the red channel (rather than only the alpha channel).

I just had a look at the Image::getColor(), widespread use of GL_RED
and GL_RG usage in OpenGL post-dates when getColor() was written, but
adding it is straight forward so I've added this to the 3.6 branch:

https://github.com/openscenegraph/OpenSceneGraph/commit/7602b868f40be58ab2bc4ffd6004df77a2695914

Quote:
Kind Regards,
Tim

p.s: @robert, in case you advice me to change my name again - i tried, i can't. there is no possibility for me to do so in my profile settings (or perhaps i just don't have the authority).

I'm no a forum user, but following the link on your post that appeared
on osg-users it looks like just "Tim" appears. However, as an
osg-users user (forum posts appear and osg-users and visa-versa) you
see an expansion of your email address which is "Tim Whowantstoknow
<.....>". You might not use your email too often but you might want
to just adjust the address to read "Tim <...>".

Cheers,
Robert.


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


Joined: 04 Apr 2018
Posts: 14

PostPosted: Tue May 22, 2018 6:03 am    Post subject:
Reply with quote

Quote:
However, as an
osg-users user (forum posts appear and osg-users and visa-versa) you
see an expansion of your email address which is "Tim Whowantstoknow
<.....>". You might not use your email too often but you might want
to just adjust the address to read "Tim <...>".


I can't log in to the osg-users with my forum account (i.e. the mail address and password). I have tried to subscribe to the osg users list and change it, but there was no Option for me to connect it to my forum profile. I'll contact a Mod in the forum, maybe this will lead to something.
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 12148

PostPosted: Tue May 22, 2018 6:37 am    Post subject:
Image getColor not implemented for GL_RED
Reply with quote

HI TIm,

Quote:
I can't log in to the osg-users with my forum account (i.e. the mail address and password). I have tried to subscribe to the osg users list and change it, but there was no Option for me to connect it to my forum profile. I'll contact a Mod in the forum, maybe this will lead to something.

It'll be the forum that is generating the message, the osg-users
mailing list is just passing the message along.

Robert.


------------------
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 Image::copySubImage freqfly General 0 Tue Dec 04, 2018 12:32 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
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


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