I am working at a game that has lots of procedural content. I had built a game engine using OpenGL that handles everything needed for creating a basic 2D game, sprites, primitives, blending, polygons etc. At a particular moment I decided to implement target textures to obtain interesting effects and problems started to arise: Sometimes the engine did not initialize OpenGL and GLEW properly and could not isolate the exception. Finally I abandoned the idea of using OpenGL because of similar issues (SOMETIMES cannot use newer GLEW functions...NOTE:drivers up to date). I decided to use DX11 instead and take benefit from the new technologies of the latest GPUs. So I did. Now I am porting my engine to DX11 and I am quite stuck.
I had procedures to be called in a
render() function, like:
which in principle just called a procedure like
glBegin(GL_TRIANGLES); ... glVertex2f(.....); ... glEnd();
Now the problem that arises for me is the new pipeline of DX11. Load up vertices in the VertexBuffer, process them by the VertexShader then fill them with pixels and transform with the PixelShader. This is great as I have full access to what is being displayed on the screen, but, how do I do it the 'old-fashion' way?
I mean, how do I draw primitives like in OpenGL, each frame sending unique, new triangles to the screen. I didn't find any resources that explain this and I cannot think this through myself, loading some vertices in the vertex buffer is designed for meshes that are human made and static and they are only transformed by the shaders.
Long story short: How do I implement my old gfx_render_triangle_list using DX11? NOTE: My engine will be used as a DLL.