Page 1 of 3

GLSL in Löve

Posted: Tue May 26, 2009 7:00 pm
by S-Rave
Wzup guise.

Long time since I've been here now. I was working on GRIME, until like the beginning of April when I showed it off to a few friends at a LAN party. Then I lost interest because it felt like all I was doing was making backgrounds (I was making the garage and I noticed I really suck at pixeling cars). No inspiration. But now I feel like I got it back. :) Yay.

I was asking Rude about support of shaders (GLSL, fragment shaders that it) in march, and I'm still interested in the feature but it seems very improbable that it's gonna be included at all. So I was thinking about making a plugin for it. Then I realized that it probably won't be a good idea since (I'm just assuming this) the actual drawing takes place after the "draw" function is called and over. If this is true you can only use the same shader for the whole screen as opposed to using it for a few sprites as a time. But maybe this isn't a problem?

Anyone else interested in this or maybe it's just me? :)

All I was gonna do was export the GLSL functions to Lua. Though I'd have to figure that one out first. Maybe someones already done this? Or is it a completely useless feature?

Re: GLSL in Löve

Posted: Tue May 26, 2009 8:10 pm
by rude
It would be useful, but it breaks abstraction with Direct3D. The love.graphics module will eventually get a Direct3D backend, and GLSL would stop working.

Re: GLSL in Löve

Posted: Wed May 27, 2009 12:10 pm
by appleide
When direct3d is implemented, the GL backend is still there for mac and linux? would it be wise to let the developer say which backend gets used for windows, or would you just have a windows version sans GL?

Re: GLSL in Löve

Posted: Wed May 27, 2009 1:42 pm
by rude
Yes, of course OpenGL will still be there for Mac and Linux. LÖVE isn't going Windows-only, you know. :ultraglee:

I haven't decided what to do with the Windows binary yet. Personally, I don't see why people would want chose OpenGL over Direct3D on Windows, and removing OpenGL would decrease its size ... but we'll see.

Re: GLSL in Löve

Posted: Thu May 28, 2009 2:17 pm
by Sslaxx
Thought about using OGRE?

Re: GLSL in Löve

Posted: Fri May 29, 2009 9:39 pm
by rude
No, I have not. I looked at it briefly, and it seems OGRE is really huge.

Besides, I want to get some DirectX experience.

Re: GLSL in Löve

Posted: Sun May 31, 2009 8:27 am
by sauer2
Why DX and not GLSL? There is nothing of DX you can't do in GLSL too, and GLSL runs under Windows fine, too.
Using DX, you split the platform support and this is always a bad thing, since some platforms will be disadvantaged after a time. :death:

Re: GLSL in Löve

Posted: Sun May 31, 2009 11:37 am
by rude
Yet another "should be a FAQ entry":
  1. I want to see if there's any significant performance difference in Direct3D on low end machines, like my laptop, though it might not be.
  2. I want to learn DirectX.
  3. I want to "test" the internal LÖVE abstractions by implementing different backends.
  4. Using DirectX may reduce the size of the binary on Windows, which makes it more attractive.
It's just a matter of using the best technology available for each platform, though it remains to be seen if it actually is better. Also, it is a matter of what I want to do. :megagrin:

Sauer2, I do not intend to "disadvantage" other platforms by implementing DX-only features. If you're saying it is unavoidable ... then I guess we're S.O.L. :rofl:

Stats from Google analytics, May 2009:

Code: Select all

Windows: 60,99 %
Linux: 20,52 %
Macintosh: 17,86 %

Re: GLSL in Löve

Posted: Sun May 31, 2009 11:59 am
by appleide
The Mac sources are simply repackaged versions of the Linux sources and then compiled. (You could also compile linux sources on mac)... The statistics don't look too biased against non-windows users. Roughly 6 vs 4! =D

Re: GLSL in Löve

Posted: Sun May 31, 2009 12:04 pm
by bartbes
Still weird, as a lot of frequent visitors here (including me) use Linux/Mac all/most of the time.