Subject:
|
Re: LDraw File Format Spec 1.0 DRAFT - Call for Public Comments
|
Newsgroups:
|
lugnet.cad
|
Date:
|
Wed, 22 Aug 2007 21:22:12 GMT
|
Viewed:
|
6398 times
|
| |
| |
In lugnet.cad, Leonardo Zide wrote:
> In lugnet.cad, Travis Cobbs wrote:
> > In lugnet.cad, Rob Ross wrote:
> > > The "so-what" would be that I, as someone who will eventually read in these
> > > files to create OpenGL renderings of them, would expect the matrices to be in
> > > column-major order, unless explicitly stated otherwise.
> >
> > I think the original suggestion that we mention that it is in row-major format
> > is valid. I agree that the fact that OpenGL (almost certainly one of the top
> > two most used 3D APIs on the planet) uses column major format is a good reason
> > to specify that LDraw uses row-major format, instead of just saying "standard".
> > It just proves that "standard" in this context is ambiguous.
> >
> > --Travis
>
> You guys are both wrong, OpenGL is NOT column major. This is one of the
> biggest mistakes I keep hearing people repeat about OpenGL.
The OpenGL 2.1 specification:
page 23
Vertex Arrays
"Matrices are loaded into these slots in column major order."
page 43
Matrices
LoadMatrix takes a pointer to a 4 × 4 matrix stored in column-major order as 16
consecutive floating-point values, i.e. as
a1 a5 a9 a13
a2 a6 a10 a14
a3 a7 a11 a15
a4 a8 a12 a16
(This differs from the standard row-major C ordering for matrix elements. If the
standard ordering is used, all of the subsequent transformation equations are
transposed,
and the columns representing vectors become rows.)"
page 264
State and State Requests
If the uniform queried is a
matrix, the values of the matrix are returned in column major order.
>
> The same is true for LDraw, it's not really column or row major. All you need
> to explain is that line type 1 is an array of floats that form a matrix and
> you're using a column major notation and post multiplying the matrices for
> reference in the spec but the LDraw standard is not column major, you can get
> the same exact results by pre multiplying using row major matrices.
But the point is, you have to clearly communicate how that array of floats is
ordered. If you assume it's one way, but it's really the other way, you're going
to be using an incorrect matrix. So the ordering is important, and needs to be
specified, one way or the other.
Rob
|
|
Message has 1 Reply: | | Re: OpenGL spec (was LDraw File Format spec)
|
| (...) As this thread is for the discussion of the LDraw specification can any further debate of what the OpenGL specification may or may not say please be continued on .off-topic.debate Thanks William (17 years ago, 23-Aug-07, to lugnet.cad)
|
Message is in Reply To:
55 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|