4 ms·
Looks like a cool language. Like the short syntax. Impressed they implemented so much of OpenGL natively in the language. Lot of work to implement OpenGL. W
by araes 1y ago
Looks like a cool language. Like the short syntax. Impressed they implemented so much of OpenGL natively in the language. Lot of work to implement OpenGL.
With such a focus, be nice to have a few more OpenGL examples. Took a bit of looking, yet found a longer example for a 2D shooter. https://aardappel.github.io/lobster/shooter_tutorial.html https://aardappel.github.io/lobster/shooter_tutorial.html
However, the real test, from personal perspective, especially with a custom framework for shaders, would be implementing one of the medium difficulty LearnOpenGL 3D examples, such as the Multiple Lights example. https://learnopengl.com/Lighting/Multiple-lights https://learnopengl.com/Lighting/Multiple-lights
With how much goes wrong with OpenGL and shader development, wary of delving very much into an OpenGL centric language, and then finding out there's a bunch of gotchas in the part that tends to be desirable (3D rendering). "Whoops, one of a zillion hidden flags doesn't get set properly for some reason."
Texture loading seems like its there, and it says it actually uses "stb_image.h" internally. Plus, it apparently does cubemaps.
Lights seem implemented, although not sure what that does "sets up a light at the given position for this frame."
Model Loading is also another, from the built-ins it looks like it does .ply and .iqm? (Inter-Quake Model) files.
Matrice math has a few although seems like a LookAt and Perspective matrix creator in the 4x4 category would be needed that return a matrix you can apply to a shader uniform. gl.perspective looks weird, just says "changes from 2D mode (default) to 3D right handed perspective mode"
Either way, looks cool, would just like to have more examples in the target demographic, OpenGL game development. Even if they're simple. That's part of why the LearnOpenGL examples are so useful. Simple. Implementing even a significant subset would go along way toward selling me on game development in an unknown language.
- Aardappel 1y agothe "gl" namespace is really a bit of misnomer since it is much higher level API than OpenGL, and does not really depend on OpenGL. It could pretty easily run on another API underneath. The repo comes with a LOT of graphical samples (in the "samples" dir). The lights are more of standard way of passing them to the shader (see the phong shader implementation). Matrices are a bit of a weak spot since its all implicit (which is convenient, but not powerful). There are also classes for direct use of matrices though.
- araes 1y agoCool. Thanks for the reply and clarification. Although the clarification is admittedly confusing when it's called the "gl" namespace. Not seeing a phong example in the samples dir. "pendulum.lobster", "physics_boxes.lobster" Only reference to "phong" brought back in a search was milen-prg's comment on Aug 7, 2023 about using the phong shader in the "cgtest.lobster" example.
- Aardappel 1y agoif you find in files for "phong" you should be able to find samples that use it.. the actual shader is in data/shaders/default.materials
- klaussilveira 1y agoDo you intend on adding a phys namespace, for stuff like jolt or bullet?
- Aardappel 1y agoWould love to add Jolt at some point, yes. There's already bindings for Box2D in the "ph" namespace.