Results 1 to 4 of 4

Thread: glTexParameter

  1. #1
    Junior Member
    Join Date
    Oct 2007
    Posts
    7

    glTexParameter

    Hi,
    two simple question

    1) Why does the glTexParameterf exist?
    The param value, that in the function signature is a float, must always be a GL flag that is always int; so i don't get why i should use a float.

    2) This code works:
    Code :
    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
    glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);

    but i can say for sure that GL_LINEAR is not the fixed point value of GL_LINEAR, cause they are the same
    So i gues that the glTexParameterx is not the fixed point version of the glTexParameterf, but is integer version. Am i doing an error??

    EDIT:
    If the glTexParameterx is the fixed point version i would expect to write something like this:
    Code :
    glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, toFixedPoint(GL_LINEAR));

    Thanks

  2. #2
    Senior Member
    Join Date
    May 2006
    Posts
    353

    Re: glTexParameter

    Quote Originally Posted by bonfo
    1) Why does the glTexParameterf exist?
    For consistency with desktop OpenGL.

    So i gues that the glTexParameterx is not the fixed point version of the glTexParameterf, but is integer version. Am i doing an error??
    From the OpenGL ES 1.1 full spec:
    "Regardless of language binding, the enum type converts to
    fixed-point without scaling"
    Georg Kolling, Imagination Technologies
    Please ask questions specific to PowerVR hardware or SDKs on the PowerVR Insider Forum
    DevTech@imgtec.com | http://www.powervrinsider.com

  3. #3
    Junior Member
    Join Date
    Feb 2009
    Posts
    4

    Re: glTexParameter

    Quote Originally Posted by Xmas
    Quote Originally Posted by bonfo
    1) Why does the glTexParameterf exist?
    For consistency with desktop OpenGL.
    What is the point of glTexParameterf on desktop then?

  4. #4
    Senior Member
    Join Date
    May 2006
    Posts
    353

    Re: glTexParameter

    To set the texture border colour, for example.
    Georg Kolling, Imagination Technologies
    Please ask questions specific to PowerVR hardware or SDKs on the PowerVR Insider Forum
    DevTech@imgtec.com | http://www.powervrinsider.com

Posting Permissions

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