Re:FOAM: New JavaScript Framework by Google Engineers
by seanmcdirmid on Monday April 27, 2015 @10:29AM
(#9446502)
Immediate shader mode is fairly stateless, pixel and vertex shaders are as functional as one can get. Let's not talk about the fixed function APIs that no one uses anymore.
[ Parent
| on HN ]
Re:FOAM: New JavaScript Framework by Google Engineers
by eropple on Monday April 27, 2015 @10:47AM
(#9446617)
I'm not sure what you mean by "immediate shader mode". Even direct state access mode is tweaking knobs in a state machine that can have very strange side effects if you don't re-set the state every time (and that's antithetical to pure functional programming). When not using DSA--I mean, just grep for "bind" in any OpenGL codebase...
Re:FOAM: New JavaScript Framework by Google Engineers
by seanmcdirmid on Monday April 27, 2015 @11:07AM
(#9446748)
The hardware has state that is exposed more or less directly, but texture management is all just plumbing and easily wrapped. Most of my experience is with directX though, which seems to have a much cleaner API.
Anyways, immediate mode UIs abound for game stacks given the ease at which they can be mapped to the GPU directly.
Re:FOAM: New JavaScript Framework by Google Engineers
by eropple on Monday April 27, 2015 @11:11AM
(#9446773)
DirectX still uses stuff like ID3D11DeviceContext::PSSetShaderResources to set application-global state that's required to do anything. It is fundamentally stateful and non-pure. I'm not sure why you're trying to argue this point.