Hacker News new | ask | show | jobs
by Aardappel 296 days ago
the "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.

2 comments

Cool. 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.

if 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
Do you intend on adding a phys namespace, for stuff like jolt or bullet?
Would love to add Jolt at some point, yes.

There's already bindings for Box2D in the "ph" namespace.