Saturday, July 23, 2022
HomeGame Developmentopengl - Dealing with pipeline objects in each DX12 and Vulkan like...

opengl – Dealing with pipeline objects in each DX12 and Vulkan like graphics APIs


I’ve been utilizing OpenGL and Directx11 extensively for my engine. The factor is once I needed to help DX12 or Vulkan I noticed that they accumulate all of the state information in a single place eradicating the replace of various states altogether.

This arises an issue. As an example I’ve 5 completely different mesh layouts, 300 completely different supplies and 5 completely different framebuffer with completely different codecs. So so far as I perceive I ought to create a 5x300x5 completely different pipelines with a view to help the drawing of all of the permutation.

This bugs me. It forces you to create all your information staticly within the editor time.

Let’s think about that I created a special lighting technique, and I need to spawn my mild at runtime. My mild makes use of a special format from the present lights within the scene. So what occurs? I froze the sport for 0-x milliseconds to compile the entire permutations only for my newly instantiated mild ?

I hope I am lacking one thing out right here. As a result of I dont like the thought of forcing me to create all of the permutation of the potential pipelines earlier than constructing the sport right into a seperate executable.

Though this doesn’t finish with the sport runtime. Each time I create an completely different mesh format or import completely different mesh format from .obj/.fbx file I ought to create all the required pipelines for these mesh layouts.

Which begs additional questions, questions like ought to I handle my current mesh layout-material-framebuffer registry everytime I start to render.

I really feel like it’s going to demand a excessive degree upkeep for creeating the required pipelines and accessing the present pipelines.

Earlier than it was like

Iterate every digicam
Iterate every mesh renderer
Get mesh and materials information and render

and now how ought to I handle the rendering?

Iterate every digicam
Iterate every mesh renderer
Get the pipeline utilizing the mesh renderer's materials and mesh ID mixtures?
Use pipeline and render

What occurs when mesh renderer’s materials and mesh fields modifications? Ought to I detect and change pipelines for that renderer ?

I really feel like Vulkan and Directx12 is a let down on this regard. I perceive that they provide an in depth management over the machine in contrast to OpenGL nevertheless it feels prefer it’s limiting me.

I am inquisitive about what your inputs will probably be. Please be at liberty to provide any kind of suggestions.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments