Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Exchange / Draw inside an existing HWND or NSView and second monitor
- - By starmessage Date 2015-06-21 17:16
Hi,
I am looking at gosu as a library to make a cross platform version of my screensaver ( http://www.starmessagesoftware.com/moonscreensaver ).
I have two questions:

1) The launch, the shutdown and the “game loop” of a screensaver is a bit different from the other applications.
The operating system creates a window in which drawing must be done by the screensaver.
In windows the window is a HWND and in MAC is an NSView.
I did not find any gosu::window create funtion that takes the handle that is supplied by the operating system and performs the drawing inside that the window.
Is this doable?

2) does gosu support multiple monitors?

thanks
Mike
Parent - By jlnr (dev) Date 2015-06-22 08:55
1) Ruby/Gosu uses SDL 2 to create the window for rendering OpenGL. There is a SDL_CreateWindowFrom() function that can create an SDL window from HWND and NSWindow, but I don't know how it would work with an NSView, especially when OpenGL is thrown into the mix.

2) nope :(

Considering that wrapping up Ruby/Gosu apps as .app/.exe files is a bit of a hack anyway...I think this is out of the scope of what Gosu can do. Sorry!
Up Topic Gosu / Gosu Exchange / Draw inside an existing HWND or NSView and second monitor

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill