Richard Schilling

07-18-2009, 03:07 PM

O.K. Just started doing serious OpenGL work. Greetings everyone.

I have a problem right off, and I can't find in any of the references I bought or on this forum. But, I expect it's a really easy problem.

I have a vertex array with the following points in it:

(-1.0, 1.0, -1.0)

(1.0, 1.0, -1.0)

(-1.0, -1.0, -1.0)

(1.0, -1.0, -1.0)

(-0.3, 0.3, -1.0)

(-0.4, 0.4, -1.0)

It's just a simple box, with a few points that coordiates with values < 1.0. The points that have whole numbers as their coordinates (1.0, -1.0) display just fine. The points with fractional coordinates get rounded down to (0.0, 0.0, 0.0).

It doesn't make sense as to why this would happen.

A day's worth of searching turned up no information about how OpenGL rounds float values down, or that there's a restriction on using whole numbers for coordinates. Or, an API call to get my points with numbers < 1.0 to show where they need to be.

Can someone please enlighten me on what I need to do to get a point to show up at, say (0.3, 0.3, -1.0)?

Thanks.

Richard Schilling

I have a problem right off, and I can't find in any of the references I bought or on this forum. But, I expect it's a really easy problem.

I have a vertex array with the following points in it:

(-1.0, 1.0, -1.0)

(1.0, 1.0, -1.0)

(-1.0, -1.0, -1.0)

(1.0, -1.0, -1.0)

(-0.3, 0.3, -1.0)

(-0.4, 0.4, -1.0)

It's just a simple box, with a few points that coordiates with values < 1.0. The points that have whole numbers as their coordinates (1.0, -1.0) display just fine. The points with fractional coordinates get rounded down to (0.0, 0.0, 0.0).

It doesn't make sense as to why this would happen.

A day's worth of searching turned up no information about how OpenGL rounds float values down, or that there's a restriction on using whole numbers for coordinates. Or, an API call to get my points with numbers < 1.0 to show where they need to be.

Can someone please enlighten me on what I need to do to get a point to show up at, say (0.3, 0.3, -1.0)?

Thanks.

Richard Schilling