What is the maximum value for Y which can be passed to gluOrtho2D?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

What is the maximum value for Y which can be passed to gluOrtho2D?

cristian
I have somewhere in the code something like this:
GLU.gluOrtho2D(-1, 1, 0, Double.MAX_VALUE)
and after that i draw some lines which has a bound on Double.MAX_VALUE.
The problem is the lines are not visible.

Do you know what is the maximum Y which can be passed to GLU.gluOrtho2D?
If instead of Double.MAX_VALUE i'm using Integer.MAX_VALUE  or Math.pow(10, 38) then everything it's fine.

I searched on the internet but i didn't find. I checked also Microsoft docs, about the native method glOrtho and i didn't find any limit.
Reply | Threaded
Open this post in threaded view
|

Re: What is the maximum value for Y which can be passed to gluOrtho2D?

Sven Gothel
Administrator
On 9/9/19 8:48 AM, cristian [via jogamp] wrote:
> I have somewhere in the code something like this:
> *GLU.gluOrtho2D(-1, 1, 0, Double.MAX_VALUE)*
> and after that i draw some lines which has a bound on Double.MAX_VALUE.
> The problem is the lines are not visible.
>

Just from memories w/o checking, it is possible we use a float based
implementation.

~Sven
Reply | Threaded
Open this post in threaded view
|

Re: What is the maximum value for Y which can be passed to gluOrtho2D?

cristian
But even if i set Float.MAX_VALUE it doesn't work. It seems that is too big.
Reply | Threaded
Open this post in threaded view
|

Re: What is the maximum value for Y which can be passed to gluOrtho2D?

Sven Gothel
Administrator
On 9/9/19 9:06 AM, cristian [via jogamp] wrote:
> But even if i set Float.MAX_VALUE it doesn't work. It seems that is too big.

Didn't you write?
> If instead of Double.MAX_VALUE i'm using Float.MAX_VALUE then everything
it's fine.

~Sven
Reply | Threaded
Open this post in threaded view
|

Re: What is the maximum value for Y which can be passed to gluOrtho2D?

cristian
It was a mistake. I corrected the post in the meantime. I wanted to say Integer.MAX_VALUE
Reply | Threaded
Open this post in threaded view
|

Re: What is the maximum value for Y which can be passed to gluOrtho2D?

Sven Gothel
Administrator
On 9/9/19 9:49 AM, cristian [via jogamp] wrote:
> It was a mistake. I corrected the post in the meantime. I wanted to say
> Integer.MAX_VALUE

Ah, sorry - yes I only read the emails usually (mailinglist setup).

Now that is indeed curious.

~Sven