Hi there!
I'm developing an adventure game engine using love2d as the backend (It's called Adore (Adventure Rendering Engine). Cute right?) I'd like to access love's API from within a host application and hopefully display its output within my editor application. The goal being to create a "live" environment for display of stuff being edited.
I noticed that in the dev branch of love it's possible to compile it to a library. Does this allow me to initialise the graphics separately and maybe capture the output so i can display it within my host? That *seems* to be the purpose of the library but I can't find any documentation (understandable due to the unreleased nature of the feature)
liblove and external access.
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: liblove and external access.
Well, you can do that with the executable, too. Take a look at http://www.libsdl.org/docs/html/sdlenvvars.html (specifically SDL_WINDOWID).
-
- Prole
- Posts: 6
- Joined: Fri Jul 12, 2013 2:43 pm
Re: liblove and external access.
How would I control the viewport though? Surely if i set the SDL window to my host window it will either stretch to the window or just render it at 0,0 relative to the windows client area.
Really I want to direct the output to a control rather than an entire window.
Really I want to direct the output to a control rather than an entire window.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: liblove and external access.
I know most toolkits allow for something like a "subwindow".
That said, if you're not afraid to get your hands (really) dirty, you might be able to somehow feed love.graphics an opengl context.
That said, if you're not afraid to get your hands (really) dirty, you might be able to somehow feed love.graphics an opengl context.
-
- Prole
- Posts: 6
- Joined: Fri Jul 12, 2013 2:43 pm
Re: liblove and external access.
This was my plan B but part of my brief was to keep Adore compatible with stock love if possible.bartbes wrote:That said, if you're not afraid to get your hands (really) dirty, you might be able to somehow feed love.graphics an opengl context.
From looking at the source it does seem like there is some effort to make love less standalone and able to integrate with a host application. i.e the seperation of the screen code and the option to compile to a library rather than an executable.
Re: liblove and external access.
If all else fails, you could use luasocket to communicate between your application and a LÖVE game.
My game called Hat Cat and the Obvious Crimes Against the Fundamental Laws of Physics is out now!
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 2 guests