Raydium 3D Game Engine

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

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Fri Jun 20, 2008 12:53 pm 
Offline
User avatar

Joined: Thu Aug 24, 2006 4:06 pm
Posts: 73
Location: SLOVAKIA
When i good see, then scene ( tri file ) rendering works like - every frame, all faces are rendered from streamed vertex list.

My idea about optimalisation is:

add command raydium_tri_optimalisation with this flow:

a) group faces with same texture
- good for call texture binding only once per faces group
b) for every face sheck if is inside viewport frurtum
c) when is used shader then create faces group by shader
- good for same thing like a)

Note: First rule in all 3D engines, don't call al lot of changes on render state during one FRAME.

and latest basic optimalisation is, rewrite using DisplayList to vertex array (for low-end card) or vertex buffer object (for newest gr. card) and for renderig then call DrawElement or DrawArray


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 20, 2008 2:01 pm 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
Hello,

I'm not an expert of rendering pipeline. (far away).

Your proposal touch one part of raydium that only xfennec is an expert.
As he don't have time to do such modification now.

Can we try to get thoses proposition for later ?

Or can you propose such code that can be added to raydium render ?

Perhaps can you continue to use the engine, as is. And when you are an expert :) :) propose new code to optimise raydium (it's the way we have followed).

Thanks for suggestions.

Have a nice day
Ouille.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 20, 2008 3:56 pm 
Offline
User avatar

Joined: Thu Aug 24, 2006 4:06 pm
Posts: 73
Location: SLOVAKIA
I going study rendering code ;)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 20, 2008 4:29 pm 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
Hello,

It will be great and !

Have a nice day.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 20, 2008 7:06 pm 
Offline
User avatar

Joined: Thu Aug 24, 2006 4:06 pm
Posts: 73
Location: SLOVAKIA
run any demo and remember FPS

then

open render.c and add this:

Code:
void raydium_shader_internal_vertex_attributes(int i);

// AGFX begin
int last_text_id = 999;
// AGFX end

// color is a GLfloat[4] (RGBA)



Code:
// let's keep this define here, until full tests
int raydium_rendering_prepare_texture_unit(GLenum tu,GLuint tex)
{
    // AGFX begin
    if (last_text_id==tex) return 0;
    last_text_id = tex;
    // AGFX end

    // cache state of each texunit
    static GLuint texunit_state[RAYDIUM_RENDER_MAX_TEXUNITS];


make new lib raydium and run same demo again and write me FPS

thx


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 20, 2008 8:26 pm 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
hello,

fps will not be revelant my laptop sync to 60fps.


What is the purpose of your patch ?

It won't prepare twice the same texture ?

I'll have a look. Can you post your perfs ?

Have a nice day
Ouille


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 20, 2008 8:46 pm 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
For me not apparent changes neither .


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 20, 2008 9:07 pm 
Offline
User avatar

Joined: Thu Aug 24, 2006 4:06 pm
Posts: 73
Location: SLOVAKIA
OK.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 25 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:  
cron
Powered by phpBB® Forum Software © phpBB Group