Raydium 3D Game Engine

Official forum for everything about Raydium, ManiaDrive, MeMak, ...
It is currently Fri Aug 07, 2020 4:16 am

All times are UTC

Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Fri Nov 22, 2013 3:33 am 

Joined: Fri Nov 22, 2013 2:56 am
Posts: 16
Hi forum :-)

I'm toying recently with Newlisp programming language. I'm trying to write a game using hardware rendered graphisc. I just found out i can use Raydium Engine inside Newlisp. I ported simple.c program into newlisp and it worked! It looks to me that Raydium has very elegant api and will match all my needs for the game. I know very little about OpenGL. I studied a few tutorials and i find it very hard to find my way around with this library. Am i right, that developing OpenGL code using OpenGL 4 hardware i could end up with code not working properly in OpenGL2 hardware? But that's not the point. I found one problem, i scrolled the source a bit and i'm aware, it could be hard to solve: raydium_init_args function is not exported to shared library. It's a problem because newlisp encourages you to create additional modules using only shared libraries. And i doubt i have knowledge to write a glue code for static linking. Luckily, the simple.c ported script runs just fine on win7 and slack14 :mrgreen: Here is my script:

  (find ostype '("Win32", "Cygwin"))
     (set 'RAYDIUM_LIB "raydium.dll"))
  (= ostype "Linux")
    (set 'RAYDIUM_LIB "libraydium.so"))

(import RAYDIUM_LIB "raydium_clear_frame")
(import RAYDIUM_LIB "raydium_ode_draw_all")
(import RAYDIUM_LIB "raydium_rendering_finish")
 ;~ (import RAYDIUM_LIB "raydium_init_args")
(import RAYDIUM_LIB "raydium_init_load")
(import RAYDIUM_LIB "raydium_ode_ground_set_name")
(import RAYDIUM_LIB "raydium_callback")
(import RAYDIUM_LIB "raydium_camera_freemove")

(define (display)
   (raydium_camera_freemove RAYDIUM_CAMERA_FREEMOVE_NORMAL)
   (raydium_ode_draw_all RAYDIUM_ODE_DRAW_NORMAL)

(raydium_init_load "simple.conf")
(raydium_ode_ground_set_name "cocorobix.tri")
(raydium_callback (callback 0 'display))


I hope u like my little project and i hope i will make some playable game :-)


PostPosted: Fri Nov 22, 2013 8:37 am 
User avatar

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

Pleased to see playing around with Raydium in a particularly unusual way ! :)

About "raydium_init_args", it's supposed to be an issue only for raydium.dll, it should be fine with libraydium.so where it's exported, IIRC. In C, with win32, we solve this issue by this hack :
#define raydium_init_args(argc,argv)\

#define raydium_init_args_name(argc,argv,app_name)\

In other words, if you have any atexit-like functionality in Newlisp, you can "regain" raydium_init_args using raydium_atexit_call and raydium_init_args_hack, which are exported in win32 library.

Let me know if this answer is not clear enough :)

About OpenGL version, vendor drivers always provides retro-compliant APIs (not always true with OpenGL ES on embedded devices, of course), so it means that your OpenGL 4 compliant driver+card will also provides all OpenGL features of OpenGL 3.3, 3.2, and so on down to OpenGL 1.0.

If you want to create OpenGL 2 code, you must watch out and only use OpenGL 2 functions (and avoid 1.x, for this particular case). Note that you can set explicitly your GLSL version in your shaders, it's an easy way to keep them compliant with a particular OpenGL version (GLSL 1.20 for OpenGL 2.1)

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC

Who is online

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