liblove and external access.

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Calin Leafshade
Prole
Posts: 6
Joined: Fri Jul 12, 2013 2:43 pm

liblove and external access.

Post by Calin Leafshade »

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)
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: liblove and external access.

Post by bartbes »

Well, you can do that with the executable, too. Take a look at http://www.libsdl.org/docs/html/sdlenvvars.html (specifically SDL_WINDOWID).
Calin Leafshade
Prole
Posts: 6
Joined: Fri Jul 12, 2013 2:43 pm

Re: liblove and external access.

Post by Calin Leafshade »

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.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: liblove and external access.

Post by bartbes »

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.
Calin Leafshade
Prole
Posts: 6
Joined: Fri Jul 12, 2013 2:43 pm

Re: liblove and external access.

Post by Calin Leafshade »

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.
This was my plan B but part of my brief was to keep Adore compatible with stock love if possible.

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.
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: liblove and external access.

Post by T-Bone »

If all else fails, you could use luasocket to communicate between your application and a LÖVE game.
Post Reply

Who is online

Users browsing this forum: noahnadai and 10 guests