thatcosmonaut / SDL

Simple Directmedia Layer
https://libsdl.org
zlib License
1 stars 1 forks source link

Tutorial Series #53

Open TheSpydog opened 1 week ago

TheSpydog commented 1 week ago

This isn't technically necessary for the API, but there's been a fair amount of interest in this so I wanted to document ideas for this.

I think the general tutorial flow would look something like:

  1. Install+build SDL3. Depending on the technical proficiency of the audience this might not be necessary.
  2. Set up a main loop. Window creation, event polling, etc. Just basic stuff.
  3. Clear the window. Demonstrates how to set up a device, acquire a command buffer, acquire a swapchain, and perform a render pass.
  4. Draw a triangle. Demonstrates how to create shaders, create a graphics pipeline, and issue draw calls. (No vertex buffers yet.)
  5. Draw multiple triangles. Expands on the above, but now with vertex and index buffers. Also introduces transfer buffers.
  6. Draw a sprite. Focus on texture/sampler loading and the binding model.
  7. Draw multiple sprites. Goes through a practical example of a CPU-side sprite batch.
  8. Draw multiple sprites quickly. Introduces compute pipelines and passes via implementing a compute sprite batch.
  9. Draw a mesh. Introduces the depth-stencil buffer, in addition to more advanced asset loading.
  10. Draw multiple meshes. Introduces instanced draws.

Totally open to suggestions if there are other topics we'd like to cover, or if the order should be switched around, or whatever!

thatcosmonaut commented 1 week ago

This seems great, the only useful thing I can think to add is an example of full screen post-processing with a compute shader.

thatcosmonaut commented 1 week ago

Oh, maybe for a Super Advanced tutorial we could do skinned mesh animation. Someone's gonna want it.