{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreiax6g7h7ynzalm4rykci5b2vbbgleiuy3sacxtylom3iuwl6twp7u",
    "uri": "at://did:plc:dxjzgxe7cvirxkwfjr2tjspt/app.bsky.feed.post/3mhe7dwvv6222"
  },
  "path": "/t/an-attempt-at-vulkan/49433?page=2#post_22",
  "publishedAt": "2026-03-17T18:53:23.000Z",
  "site": "https://hub.jmonkeyengine.org",
  "textContent": "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.\n\nThe current challenge is how to retrieve all uniform variables before compiling the shader.\nAfterward, 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.\n\nThis 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.\n\nOf 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.\n\nOf course, if you have a better approach, please let me know. Thank you.",
  "title": "An attempt at Vulkan"
}