afritz1 / OpenTESArena

Open-source re-implementation of The Elder Scrolls: Arena.
MIT License
988 stars 68 forks source link

Vulkan #50

Closed afritz1 closed 7 years ago

afritz1 commented 8 years ago

At some point in the future, the 3D rendering API should be switched from OpenCL to Vulkan. This is because the OpenCL API does not provide a link to any display device by itself, so the resulting color buffer must either be sent back to main memory for updating the SDL_Texture frame buffer with each frame (which is slow), or shared with another API like OpenGL through interop and drawn as a quad.

Vulkan is a more interesting choice than OpenGL interop in my opinion, and I believe it provides a kind of future-proofing as well. Since Vulkan is both a graphics and compute API, the ray tracing can occur on the render device and the results can be sent straight to the screen without any interaction with main memory, which would be a big plus for performance.

afritz1 commented 7 years ago

I've realized that Vulkan would really be too much of a time sink at the moment, and I should wait until the rendering code is feature complete before I start trying to implement anything with Vulkan. A software renderer replacement for OpenCL sounds like a safer idea for now. That should help with faster prototyping as well.

afritz1 commented 7 years ago

Closing for now, reopening once Vulkan enters the project scope again. If not, then my software renderer will probably turn out to be a good enough solution for the long run.