3 ms·
This is pretty fascinating, although superficially a lot of this seems more complex than just plain opengl. For example: clear = FrameBuffer $ (DepthImage @1
by overgard 11y ago
This is pretty fascinating, although superficially a lot of this seems more complex than just plain opengl. For example:
clear = FrameBuffer $ (DepthImage @1 1000, ColorImage @1 navy) -- ...
mapFragments s fs = Accumulate colorFragmentCtx PassAll (\a -> FragmentOutRastDepth $ fs a) s clear
Compared with:
glClearColor(...)
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT)
State management is a nightmare in OpenGL, but that second chunk of code is a lot easier to wrap my head around even if it's objectively worse in a lot of ways. Still though, I'm waiting to see the language tutorial before I make up my mind. Looks interesting!
- csabahruska 11y agothat OpenGL code is written like this in LambdaCube 3D: main = ScreenOut (FrameBuffer (ColorImage @1 (V4 0 1 0 1.0))) or with depth + color buffer main = ScreenOut (FrameBuffer (DepthImage @1 1000, ColorImage @1 navy))