Question on Texture

I am a undergrad student just becoming familiar with OpenGL. I have some very basic question on OpenGL. I want to know about texture. Can I derive the RGB value from a texture and then use it for coloring a polygon? Will it give the same output like original texture?

Can I derive the RGB value from a texture and then use it for coloring a polygon

I’m not 100% sure what you’re asking here.
Are you saying that you want to sample the texture and then manipulate it in some way and then output the results of that calculation? Yes you can do that. It’s called a fragment shader - you can do what ever you want in one of those.

Will it give the same output like original texture

The frament shader will give the same output results like basic texturing if you want it to. it’s up to you really.

Thank you for answer. Can you please tell me how fragment shader can be used? Is any tutorial on it available?

You could try this site. There are many tutorial sies on the net - just search.
HeNe offer OpenGl tutorials as well, as does LightHouse3d…

http://arcsynthesis.org/gltut/

Thanks for the link provided. I want to do something like this. In my texture, there are some white portions. I want to separate them from the rest of the colored part. Can’t I do it without fragment shader?