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 2 of 2

Thread: querying of GLclampf and GLclampd data type arguments

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2001
    Location
    india
    Posts
    15

    querying of GLclampf and GLclampd data type arguments

    if I call glClearColor() with arguments greater than 1 or less than 0
    say glClearColor( 1.1, -0.1, 2, 1)and then
    query the set clearing color as
    glGetFloatv (GL_COLOR_CLEAR_VALUE, INTO_SOME_ARRRAY)

    then what do you think it will return.

    It think it will return the set values.But it is not doing that!!why?????...

    FYI : the prototype for glClearColor is
    glClearColor(GLclampf red, GLclampf green,
    GLclampf blue, GLclampf alpha) ;

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    3,115

    Re: querying of GLclampf and GLclampd data type arguments

    Since the datatype is GLclapf, all values you pass will be cut to fit into the range[1, 0]. So I assume glGetFloatfv returns {1, 0, 1, 1}.

Posting Permissions

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