1. EuSFML 2.5.1 Released!

Hey guys,

I've released my updated wrapper for SFML, EuSFML for SFML 2.5.1. This is mostly a bug-fix release in terms of SFML, but I re-wrote the wrappers to have cleaner code. Also, the music demo now works! The old demos should work as normal. I did make a couple new demos just for fun. Once SFML 2.6.0 or 3.0 is released, I plan on making a wrapper for those version(s) too. I guess I can try working on a new IUP Wrapper or Allegro or something else in the meantime.

I didn't wrap the net functions for SFML 2.5.1 as Euphoria already has networking functions built-in. Audio.ew,Graphics.ew,System.ew, and Window.ew are the updated wrappers for SFML 2.5.1

EuSFML: https://github.com/gAndy50/EuSFML2

--Render Window Example 
--Written By Andy P. 
--Copyright (c) 2022 
 
without warning 
without type_check 
 
include std/machine.e 
include std/dll.e 
 
include flags.e 
 
include System.ew 
include Graphics.ew 
 
atom win = sfRenderWindow_create(800,600,32,"Hello",sfClose,0) 
 
if win = -1 then 
	puts(1,"Failed to create Render Window!\n") 
	abort(0) 
end if 
 
constant event = allocate(4 * 6) --allocate memory for events 
 
atom blue = sfColor_fromRGB(0,0,255) --blue 
--Use RGB values (i.e. red is 255,0,0) 
--You can also use sfColor_fromRGBA to add in a alpha color 
--use to change color of window 
 
while sfRenderWindow_isOpen(win)  do 
 
 while sfRenderWindow_pollEvent(win,event) do 
  
      atom eventType = peek4s(event) 
	  atom code = peek4s(event+4) 
	  atom alt = peek4s(event+8) 
	  atom control = peek4s(event+13) 
	  atom shift = peek4s(event+16) 
	  atom system = peek4s(event+20) 
 
 if eventType = sfEvtClosed then 
 	sfRenderWindow_close(win) 
 end if 
	 
 end while 
  
  sfRenderWindow_clear(win,sfBLACK) 
  
 sfRenderWindow_display(win) 
	 
end while 
 
free(event) --free event to prevent memory leaks 
sfRenderWindow_destroy(win) 
new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu