Hi,
I noticed on the feature list for pure basic it said you can use SDLand directx.
- Easy but very fast 2D game support trough dedicated libraries (DirectX, SDL, ...)
I want to use SDL as i am very familiar with libraries and done quite a bit of graphics and networking programming using these libraries.
where can i find the command list for SDL or do i need to download a library to use it or something, i just need pointing in the right direction.
SDL
If Im mistaken then someone please correct me, but I think its referring to the Linux version of PB which uses SDL for graphics as opposed to DirectX7 like the Windows version. However, an SDL binding for PB wouldnt be too difficult I imagine. I considered writing one myself not long ago, but decided to pursue newer technology...
Mark my words, when you least expect it, your uppance will come...
SDL
how hard is creating binding any info anywhere on doing this ?
I would really like to use SDL with purebasic as it will make porting existing code simpler.
I am using windows at momeny but tend to right applicatios so they work on linux as well.
I would really like to use SDL with purebasic as it will make porting existing code simpler.
I am using windows at momeny but tend to right applicatios so they work on linux as well.
-
- Enthusiast
- Posts: 252
- Joined: Fri Feb 20, 2004 5:43 pm
I just found Lib SDL on my hard drive, its a simple DLL containing 189 functions. You could either wrap these functions using the PureBasic Library SDK DLL Importer, or you could just call each fuction using CallFunction(...). You could also create an array, loop through all the functions, store a pointer to each function then use CallFunctionFast(...) to make it faster.
Mark my words, when you least expect it, your uppance will come...
Yes this works, I've done itGreenGiant wrote:I'm only guessing at this, but if you downloaded the linux version you could probably find the files with all the constants and structures in. That'd be a start. Dont know enough about it to be much more help though I'm afraid.

Look here:
viewtopic.php?t=8935&start=15
but in this function-wrapper are some things wrong. (SORRY my fault...)

Somewhere I should have a better one but maybe not bug free (if somebody is interested).
Or use the DLL importer.