Author Topic: Sdl Update  (Read 6674 times)

0 Members and 2 Guests are viewing this topic.

Peter

  • Guest
Re: Sdl Update
« Reply #15 on: September 30, 2015, 07:33:55 AM »
Quote
i am wondering what is freakin sdl advantage over win api ?

Hi Aurel,
is faster! 

JRS

  • Guest
Re: Sdl Update
« Reply #16 on: September 30, 2015, 02:50:17 PM »
That should be enough to give Aurel a coronary.  :)

Peter

  • Guest
Re: Sdl Update
« Reply #17 on: September 30, 2015, 04:05:03 PM »
Quote
That should be enough to give Aurel a coronary
  ;D

Hi John.

Mike Lobanovsky

  • Guest
Re: Sdl Update
« Reply #18 on: September 30, 2015, 08:09:28 PM »
SDL is not faster than carefully chosen Windows DIB section APIs whereby pixel modifications are written directly into the DIB section's pixel data, rather than modifying the window canvas by brute force with the turtle slow SetPixel() API.

[UPD] Examining sdl.dll in a PE explorer, you can notice that SDL imports those DIB section APIs from the Gdi32.dll system library, i.e. its strategy in its MS Windows implementation is built around the DIB functionality I'm talking about. Which means there's nothing that prevents you from doing the exact same things directly in your O2 scripts thus sparing you over 400KB of SDL libraries' footprint both in memory and on your hard disk, and all the overhead of thousands of calls to SDL proxy functions in each frame that you draw on your screen.
« Last Edit: September 30, 2015, 08:59:37 PM by Mike Lobanovsky »

Aurel

  • Guest
Re: Sdl Update
« Reply #19 on: September 30, 2015, 08:15:19 PM »
Thanks Mike.  ;)

John is hi....ooooo he use pipe again  :o
ooooo no  ;D

JRS

  • Guest
Re: Sdl Update
« Reply #20 on: September 30, 2015, 08:27:22 PM »
Quote
John is hi....ooooo he use pipe again

Nothing like that free Linux gold to mellow you out.  :-*

Peter

  • Guest
Re: Sdl Update
« Reply #21 on: October 01, 2015, 05:20:48 AM »
Hi Mike.

Mike Lobanovsky

  • Guest
Re: Sdl Update
« Reply #22 on: October 01, 2015, 05:41:22 AM »
Hi Peter. Hope you're doing well.

JRS

  • Guest
Re: Sdl Update
« Reply #23 on: October 02, 2015, 12:28:31 AM »
If you guys are bored, I've kicked off the Script Ledger forum which is targeted towards scripting VBA and Script BASIC and Microsoft Office (Excel mostly) for accounting folks. Join us if you like.

Peter

  • Guest
Re: Sdl Update
« Reply #24 on: October 02, 2015, 02:01:31 AM »
Hi,
Sdl Example20: Binary World.  :P
Code: [Select]
include "sdl.inc"
window 640,480,1
loadfont 1,"sdlfonts/digitmono.ttf",12

float i
while key(27)=0
cls 0,0,0
color 0,0,255,255
fillcircle 300,250,208
for i=0 to 360
    textcolor rand(128,255),rand(128,255),rand(128,255)
    text "O", 300+sin(i)*Rand(10,200),240+cos(i)*Rand(10,200),1
    text "1", 300+sin(i)*Rand(10,200),240+cos(i)*Rand(10,200),1
next
color 255,255,255,255
drawcircle 300,250,208
text "BINARY WORLD",250,8,1
redraw
setfps 4
wend   




[attachment deleted by admin]