Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: texture question

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2013
    Posts
    23

    texture question

    I have mapped texture on a 2D polygon. Is it possible to get the RGB values of a particular point in the polygon.

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jan 2012
    Location
    Australia
    Posts
    1,106
    Only by reading from the frame buffer. There are several ways of doing this one is to use glReadPixels

  3. #3
    Junior Member Newbie
    Join Date
    Jan 2013
    Posts
    23
    I find difficulty in using glReadPixels. Could you give some sample code?

  4. #4
    Senior Member OpenGL Pro
    Join Date
    Jan 2012
    Location
    Australia
    Posts
    1,106
    try
    http://ogldev.atspace.co.uk/www/tuto...utorial29.html

    This site has a lot of good tutorials

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •