External Publication
Visit Post

An attempt at Vulkan

jMonkeyEngine Hub March 17, 2026
Source
From the current perspective, OpenGL is like an automatic transmission car, while Vulkan is like a manual transmission car. I’ve never had to worry about things like memory management when writing Java, but now I need to manage Vulkan memory with Java…Alright, back to the point. The current challenge is how to retrieve all uniform variables before compiling the shader. Afterward, we need to allocate memory for these uniform variables, cache them, and also record their memory locations. The order in the memory should match the order in which they are defined in the shader. This is my current idea: to use a shader caching mechanism for recording. After looking into some materials, it seems that UE (Unreal Engine) obtains the data through runtime reflection, while Unity seems to cache this information simultaneously as the shader is being compiled. Of course, there is also the reflection-based approach, which I haven’t studied yet. I need to give it a try. Perhaps reflection is more appropriate for the current JMonkeyEngine (jME) context. Of course, if you have a better approach, please let me know. Thank you.

Discussion in the ATmosphere

Loading comments...