Raydium 3D Game Engine

Official forum for everything about Raydium, ManiaDrive, MeMak, ...
It is currently Fri Mar 29, 2024 11:16 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Thu Aug 20, 2009 3:16 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2591
Location: gnniiiii (Scrat)
Hi,

Today, while improving GCC warnings for the engine, I've found several small bugs here and there. All were almost harmless and are now fixed.

All, except one :)

I don't know whats the current state of "matrix4x4" code in math module, but I think there's a serious trouble in raydium_matrix_internal_adjoint() (math.c, line 226 of current rev [870])

Here's what I read, basically, despite the broken indent ;) :

Code:
for(row = 0; row < dimension; row++)
    {
    for(col = 0; col < dimension; col++)
        {
        ...
        ...
        ...
        for(row = 0; row < dimension; row++)
            {
            for(col = 0; col < dimension; col++)
                {
                ...
                }
            }
        }
   }


The trouble here is the usage of row and col vars inside the previous for loops that already use these vars.

It shows that:
- This code does not work, and probably never worked.
- Broken indentation is evil. It took me ages to understand that the second pair of for loops were inside the first one.

I see two options here, then:
- We fix that function, and makes sure all that matrix4x4 things really works (used in the engine or in a demo, for instance)
- We remove all these stuffs until we need it.

Anyone ? :)


Top
 Profile  
 
PostPosted: Fri Aug 21, 2009 10:39 am 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
That's sound to me. Maybe I commited them. Anyway, if they are mine they should not supposed to be commited yet (maybe a night without sleeping...).
Anyway, I have to do a few improvements to the character (cal3d) system and then I will have to use matrix functions, but I will try to use Cal3d or ODE internal ones.
So my vote is: remove them until needed. (but first we have to check all the code for possible internal usages of them)


Top
 Profile  
 
PostPosted: Fri Aug 21, 2009 12:58 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2591
Location: gnniiiii (Scrat)
OK. I haven't find any usage of matrix4x4 in the engine, nor in demos, so I'll remove it.
If Cal3D support requires such functions, we'll think again about all this. Another point here is that OpenGL 3.x no more provides matrix features, so if we, one day, want to port Raydium to newer OpenGL version (huge work ahead ...), solid matrix functions will be required too.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 33 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group