[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [12309] trunk/blender/source/blender: added an option to adjust the alpha clipping value in the oprnGL preferenes .

Alexander Ewering blender at instinctive.de
Mon Oct 22 19:36:45 CEST 2007

On Mon, 22 Oct 2007, Campbell Barton wrote:

> We tried to fix this (by doing alignment checks for 32bit and 64bit at
> once, no matter what system your compiling on), but there is no 100%
> sure solution - (only the OS knows this).
> The existing 64bit checks are not good but at least they dont break
> existing files, which is a risk of making larger changes.
> In short, we need to do compile tests for 32 and 64bit platforms.

I do not think that this is correct. makesdna.c should not use any platform
specific information to calculate alignment and size, it should always
expect 64 bit platforms and thus, 64 bit pointers.

A quick check in the source shows that there is only one place where sizeof
is used in such a wrong way:

/* 4-8 aligned/ */
if(sizeof(void *) == 4) {

This smells wrong, because if structs are aligned or not should not depend
on the size of the pointer ON THE PARTICULAR PLATFORM someone particular is
compiling on.

Conclusion: Of course, this can work independently of compiling platform, it
just needs to be fixed.

Alexander Ewering

[ i n s t i n c t i v e . ]      instinctive mediaworks

Zur Waldeshoehe 6                    Tel.: 02393-220558
59846 Sundern                         Fax: 02393-220559
Germany                xx-mail: xx-mail.com/instinctive

More information about the Bf-committers mailing list