Results 1 to 5 of 5

Thread: Windows OpenGL drawing accuracy

  1. #1
    Junior Member Newbie
    Join Date
    Oct 2002
    Location
    Russian Federation
    Posts
    15

    Windows OpenGL drawing accuracy

    Is it restricted to float type precision? If not how to force it to be double?

    [This message has been edited by Belgrad (edited 11-16-2002).]

    [This message has been edited by Belgrad (edited 11-16-2002).]

  2. #2
    Senior Member OpenGL Pro
    Join Date
    May 2001
    Location
    Kristianstad,Skåne,Sweden
    Posts
    1,595

    Re: Windows OpenGL drawing accuracy

    Hi !

    There are support for both float and double in the api, but I guess you would like to use double internally instead of float ?

    I think most OpenGL hardware use float, and you cannot change it, the reason I guess is that it's only half the amount of data to send down the pipe line.

    I am not sure if you would gain much with double anyway, the depth buffer is limited to 24 or 32 bits anyway.

    Mikael

  3. #3
    Junior Member Newbie
    Join Date
    Oct 2002
    Location
    Russian Federation
    Posts
    15

    Re: Windows OpenGL drawing accuracy

    ((( Very bad news. It is essential for my project to be able draw with double accuracy...

    [This message has been edited by Belgrad (edited 11-16-2002).]

  4. #4
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,068

    Re: Windows OpenGL drawing accuracy

    You can store your data in double format, then convert it to float when drawing.

    A float is more accurate then a double.

    Originally posted by Belgrad:
    ((( Very bad news. It is essential for my project to be able draw with double accuracy...

    [This message has been edited by Belgrad (edited 11-16-2002).]

  5. #5
    Senior Member Regular Contributor
    Join Date
    Dec 2001
    Location
    Belmont, CA, USA
    Posts
    216

    Re: Windows OpenGL drawing accuracy

    Originally posted by nexusone:


    A float is more accurate then a double.

    nexusone: Huh? Usually float has a 23-bit mantissa and double has a 52-bit or 64-bit mantissa. Look it up.

    Belgrad: You must be doing something very unusual if you require the renderer to use double-precision. But you can always do the transformations yourself and just give OpenGL the final results.

Similar Threads

  1. Drawing texture in Windows OS using OpenGL
    By fatalcoder in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 07-02-2011, 05:47 AM
  2. how do i test accuracy of an opengl library?
    By siddord in forum OpenGL ES
    Replies: 0
    Last Post: 07-03-2006, 04:54 AM
  3. floating type accuracy in opengl
    By cem polat in forum OpenGL: General
    Replies: 1
    Last Post: 09-29-2004, 09:23 PM
  4. Replies: 1
    Last Post: 10-04-2001, 01:45 AM
  5. OpenGL Accuracy on Radeon cards
    By in forum OpenGL: User Software
    Replies: 1
    Last Post: 11-14-2000, 09:49 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean