This is the branch with the port of the B3DAccelerator plugin to Metal. Most the examples in Balloon3D are working with this new plugin, after forcing it by modifying:
B3DSceneMorph >> accelerationEnabled
"Return true if hardware acceleration is enabled"
"self accelerationSuspended ifTrue:[^false].
^self valueOfProperty: #accelerationEnabled ifAbsent:[false]"
^ true
Shaders are now compiled in runtime, from source code which is embedded in a C-string.
In addition to these changes, in the last commit I did some refactoring of the Metal VM code. I am copying the message of that commit:
- I introduced a hack to select the type of rendering view in runtime.
- I am compiling by again the old core graphics based renderer, but this is only used when the -core-graphics option is passed in the command line.
- I added dummy headless view, that does not render and stubs most of the event.
- I added the -metal, -opengl, and -core-graphics command line options for selecting the rendering backend.
- I am testing the Metal implementation by compiling the shader library. If the shader library compilation fails, then Metal will not be used, and instead OpenGL will be used as a fallback, by default.
You can view, comment on, or merge this pull request online at:
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/382
Commit Summary
- I am starting to reimplement the B3DAcceleratorPlugin using Metal. So far I managed to get a black screen by using the extra layers mechanism,
- Creating the depth-stencil buffer, and clearing the screen.
- I am starting to render a bit.
- I am starting to implement the lighting model in the metal based B3DAcceleratorPlugin.
- Add a -1 offset to the B3D indices going to Metal.
- Merge branch 'Cog' into feature/metal_b3d
- I implemented the Squeak3D lighting model above metal.
- Merge branch 'Cog' into feature/metal_b3d
- Merge branch 'Cog' into feature/metal_b3d
- I introduced a hack to select the type of rendering view in runtime.
File Changes
Patch Links:
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.