Comments (6)
Accelerated sprite-batching would probably be better suited to a separate, smaller module. Lua-SDL2 focuses on simply making the SDL2 API available to Lua. I am uncomfortable extending it into a game engine itself, because everybody wants different things from their game engines.
What you probably want is to use SDL to open a window with an OpenGL context, and draw the sprites via OpenGL. IIRC attribute arrays let you batch sprites fairly efficiently.
The current state of OpenGL libraries for recent Lua versions is a bit dry, but there aren't many functions you need to bind for drawing sprites, so rolling your own is feasible. (I have some primitive code I could try to get into a publishable state later.)
from luasdl2.
i always saw lua-SDL2 as the starting board for game making, or really whatever else, but with work etc can make it more through scripting in lua. so really just tapping into SDL, as @Tangent128 said, it just grabs things from the API. still leaving an openness too it
it would be awesome to see more openGL inside lua-SDL2, that would be super cool. but think again it should stay the same as the way SDL is talking to lua and back and forth. so its left open-ended, so still it needs figuring out and working on your own thing, but its at least there.
pretty much it can tap into it
as far as c++ IDE, woof. in linux there are a few code::blocks
off the top of my head, and also eclipse
aye, if you have code @Tangent128 for such things, id love to see it
from luasdl2.
And do you tested it with Lua or LuaJIT?
from luasdl2.
could anyone please explain to me how to get opengl 3+ working with luasdl2? i have tryed with 2 opengl libaries but i can't seem to get it to work...i'm trying to make a very simple 3d game for educational purposes
from luasdl2.
Which OpenGL libraries, and which Lua version? The state of OpenGL bindings for Lua is not very impressive right now.
https://github.com/vrld/G4L might be your best bet, and it's a bit old (OpenGL 3.3, not 4.5)
from luasdl2.
i will try this lib again... it didn't work on my last distro also i tried the glua lib and my results
but i will try again on debian jessie (crunchbang is basically debian wheezy)
from luasdl2.
Related Issues (20)
- Web export? HOT 2
- SDL.hint not defined
- `SDL.mouseMask.Right` and `SDL.mouseMask.Middle` are the same HOT 1
- No `semver.org` file HOT 1
- SDL HitTests will make window invalid. HOT 1
- Integers in Lua 5.3 HOT 1
- channel first/last method results in deadlock HOT 2
- Compile error with Lua5.2 HOT 2
- SDL.joyHat lack SDL_HAT_CENTERED HOT 1
- Question. Using Release without Luarocks HOT 2
- trouble after install with luarocks HOT 2
- Add windows/powershell install instructions HOT 3
- Compiling on OSX Bug Sur (Intel) HOT 4
- getPerformanceCounter and getPerformanceFrequency should return a wider type
- Linux building luasdl2 complains none compatible version detected 5.4 HOT 7
- Missing functions? HOT 6
- Channel:pop() is leaking memory HOT 1
- Provide LSP-friendly documentation file
- texture:update
- Could NOT find SDL2 (missing: image mixer net ttf)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from luasdl2.