Raydium 3D Game Engine

Official forum for everything about Raydium, ManiaDrive, MeMak, ...
It is currently Tue Jul 14, 2020 8:40 pm

All times are UTC




Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: Tue Jun 10, 2008 5:15 pm 
Offline
User avatar

Joined: Thu Aug 24, 2006 4:06 pm
Posts: 73
Location: SLOVAKIA
ouille wrote:
Hello,

And don't forget php.ini file in your bin directory.

Automatic repository file download will work.

Have a nice day.

Ouille


OK> But i think that this download, add thinks to BIN folder, and i need all data sorted. I like trim in file system.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 10, 2008 5:25 pm 
Offline

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

Your app is working here either adding textures in data/textures or adding php.ini

I have rebuild your exe.

I'll try with your exe asap.

Have a nice day
Ouille.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 10, 2008 6:34 pm 
Offline
User avatar

Joined: Thu Aug 24, 2006 4:06 pm
Posts: 73
Location: SLOVAKIA
ouille wrote:
Hello,

Your app is working here either adding textures in data/textures or adding php.ini

I have rebuild your exe.

I'll try with your exe asap.

Have a nice day
Ouille.


ok. thx.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 11, 2008 7:39 am 
Offline

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

So ...
Disable fog and dont clear frame after positionning camera (else skybox is cleared).

Changing few parmater on hdr (it was toooooo slllooooowwwww).

Here is a working code.

One remark: i don't think that php function are fast, so calling a php function at the begining of display function is perhaps hazardous (IMHO).

Have a nice day
ouille.

Code:
#include "raydium/index.c"

#include "rkr_globals.h"
#include "rkr_config.h"
#include "rkr_kart.h"


TConfig Config;
TCarDefinition CAR;
GLfloat sun[]={1.0,0.9,0.9,1.0};
int CameraMode;

int HDR=0;

//****************************************************************************************
// DISPLAY LOOP
//****************************************************************************************
void display(void)
{
    if (raydium_key_last==1027) exit(0);
 if(0){   
    raydium_clear_frame();

    raydium_camera_freemove(1);
    raydium_ode_draw_all(0);
   
    raydium_rendering_finish();

   
    return;
 }

    // if exist script on begin frame then EXECUTE
    if (Config.bPHP_BeginFrame==1) raydium_php_exec(Config.PHP_BeginFrame);

    raydium_clear_frame();
    RKR_UpdateCamera();
    RKR_UpdateCarControl();




    raydium_ode_draw_all(0);
    if (raydium_key[GLUT_KEY_F5]) raydium_ode_draw_all(1);



    // if exist script on End frame then EXECUTE
    if (Config.bPHP_EndFrame==1) raydium_php_exec(Config.PHP_EndFrame);

    raydium_rendering_finish();
}

//****************************************************************************************
// MAIN
//****************************************************************************************
int main(int argc, char **argv)
{
    raydium_init_args(argc,argv);

    RKR_LoadConfiguration("default.cfg");

    raydium_window_create(Config.app_width,Config.app_height,RAYDIUM_RENDERING_WINDOW,Config.app_title);
    raydium_texture_filter_change(RAYDIUM_TEXTURE_FILTER_TRILINEAR);
    raydium_projection_near=Config.r_view_near;
    raydium_projection_far=Config.r_view_far;
    raydium_projection_fov=Config.r_view_fov;

    raydium_path_string_from(Config.app_mediapath);

    // if exist script on Startup then EXECUTE
    if (Config.bPHP_OnStartup==1) raydium_php_exec(Config.PHP_OnStartup);


    if (Config.r_light==1) raydium_light_enable();
    if (Config.r_shadow==1) raydium_shadow_enable();
    if (Config.r_HDR==1)
    {
        raydium_hdr_enable();
        raydium_hdr_settings_eye(5,1);

    }

    raydium_light_on(0);
    raydium_fog_disable();


    memcpy(raydium_light_color[0],sun,raydium_internal_size_vector_float_4);
    raydium_light_intensity[0]=1000000;

    raydium_light_position[0][0]=300;
    raydium_light_position[0][1]=300;
    raydium_light_position[0][2]=300;

    raydium_light_update_all(0);
    raydium_background_color_change(sun[0],sun[1],sun[2],sun[3]);

    raydium_ode_ground_set_name(Config.ground_file);

    RKR_CreateKartFromFile(Config.car_definition);

    if (Config.r_shader==1)
    {
        raydium_shader_load("shader2","bump.vert","bump.frag");
        raydium_shader_var_i_name("shader2","normalMap",1);
        raydium_shader_var_i_name("shader2","colorMap",0);
        raydium_shader_var_4f_name("shader2","specular",0.1,0.1,0.1,1);
        raydium_shader_var_f_name("shader2","shininess",30);
        raydium_shader_attach_texture_name("shader2","land_color.tga");
    }


    raydium_sky_box_cache();
    //raydium_sky_atmosphere_enable();

    CameraMode = CAMERA_MODE_FLY;
    raydium_callback(&display);

    return 0;
}



Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 11, 2008 11:05 am 
Offline
User avatar

Joined: Thu Aug 24, 2006 4:06 pm
Posts: 73
Location: SLOVAKIA
thx. work cool.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 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