|
From: Roger H. <rog...@mi...> - 2005-02-18 18:19:10
|
On Friday, February 18, 2005, at 02:33 PM, Jose' Cruanyes wrote: > I think is anyway cleaner the first approach (patching=20 > e3fformat_3dmf_bin_readobject...) I have now done it that way. Any ideas on another quirk of QD3D? Q3ViewHints_SetClearImageColor takes a parameter of TQ3ColorARGB*, which has four float components, alpha, red, green and blue. In the meta file specification we have: ASCII ImageClearColor Binary imcc ( =3D 0x696D6363 ) Data Format ColorRGB=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0clearColor clearColor The RGB color to be given to the visible background of a model when an=20= image is rendered from that model. Data Size 4 Description An image clear color object is used to assign color to the background=20 of a model in a rendered image when the model does not completely fill=20= that image. Example Container ( =A0=A0=A0=A0ViewHints ( ) =A0=A0=A0=A0ImageDimensions ( ... ) =A0=A0=A0=A0ImageClearColor ( 1 1 1 ) =A0=A0=A0=A0. =A0=A0=A0=A0. =A0=A0=A0=A0. ) So we instead of four floats we have just 3 colour components but held=20= in four bytes. This is quite likely to be 0..255 values (using Pascal=20 syntax) but in the file would it be reasonable to assume rgba, or argb, or=20 rgb<pad> or <pad>rgb? What about in byte swapped files, should I read individual bytes, or=20 must I read them into an TQ3Uns32, letting the byte swapping code get at them on the way, and then get the red byte by right shifting 24=20 places? Roger |