Hello,
I am currently writing a wrapper of SFML 2.6 for the OpenEuphoria programming language. I'm using the most updated version of CSFML for easier portability. Does using sfVideoMode causes the screen to go fullscreen, even though I have set the parameters so that it is a window.
https://openeuphoria.org/index.wcMy GPU is a RTX 3070 8GB.
Shouldn't the window appear as a normal window by default and not fullscreen, the video mode becomes 800x600, 32 when I test my program. I can post a actual C example if it makes it easier. Just wondering if this is a bug or something.
--Wrapper Code
public constant sfVideoMode = define_c_struct({
C_UINT, --width
C_UINT, --height
C_UINT --bitsPerPixel
})
public constant xsfRenderWindow_create = define_c_func(gfx,"+sfRenderWindow_create",{sfVideoMode,C_STRING,C_UINT32,C_POINTER},C_POINTER)
public function sfRenderWindow_create(sequence mode,sequence title,sfWindowStyle style,atom settings)
return c_func(xsfRenderWindow_create,{mode,title,style,settings})
end function
include std/ffi.e
include std/math.e
include sfml_system.e
include sfml_window.e
include sfml_graphics.e
sequence mode = {800,600,32}
atom win = sfRenderWindow_create(mode,"Window",sfClose,NULL)
if win = -1 then
puts(1,"Failed to create window!\n")
abort(0)
end if
atom evt = allocate_struct(sfEvent)
atom evt_type = 0
while sfRenderWindow_isOpen(win) do
while sfRenderWindow_pollEvent(win,evt) do
evt_type = peek_type(evt,C_UINT32)
if evt_type = sfEvtClosed then
sfRenderWindow_close(win)
end if
end while
sfRenderWindow_clear(win,sfBlue)
sfRenderWindow_display(win)
end while
sfRenderWindow_destroy(win)