Re: SDL2 Wrapper Not Working Under 4.1.0

new topic     » goto parent     » topic index » view thread      » older message » newer message
Icy_Viking said...

My SDL2 Wrapper that I wrote in Euphoria does not seem to work in 4.1.0 beta. I even re-wrote it from scratch and nothing appears to be working. No window pops up or nothing. It seems to run, then exits. I've put in checks, but nothing seems to pop up. It does work under 4.0.5

The SDL2 Wrapper available at rapideuphoria.com works for me with 4.1.0 beta on Windoze and Linux. Both computers are 64bit using the 64bit version of SDL2.

C:\Code\EuSDL2>eui -v 
Euphoria Interpreter v4.1.0 development 
   64-bit Windows, Using System Memory 
   Revision Date: 2014-01-16 02:53:44, Id: 5783:d41527402a7a 

I used this sample program to make sure I could draw to the screen:

include std/machine.e  
include EuSDL2.ew  
  
if SDL_Init(SDL_INIT_VIDEO) = -1 then  
	puts(1,"Could not init SDL!\n") 
	abort(1)  
end if  
  
atom win = SDL_CreateWindow("Win",SDL_WINDOWPOS_CENTERED,SDL_WINDOWPOS_CENTERED,640,480,SDL_WINDOW_SHOWN)  
atom ren = SDL_CreateRenderer(win, -1, 0) 
 
if win = -1 or ren = -1 then  
	puts(1,"Could not create window or renderer!\n")  
	abort(1) 
end if 
	 
atom rect = allocate(16) 
poke4(rect,{100,100,200,100}) 
	 
SDL_RenderClear(ren)	 
SDL_SetRenderDrawColor(ren,255,0,0,0) 
SDL_RenderFillRect(ren, rect) 
SDL_RenderPresent(ren) 
	 
SDL_Delay(5000)  
SDL_DestroyWindow(win)  
SDL_Quit() 

If you post your new version, I can try that one too! Maybe there is an issue with the 32bit SDL2/Eu on a 64bit system?

Thanks,
Ira

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu