SDL_GPUGra...eCreateInfo(3type)

πŸ’– SDL_GPUGraphicsPipelineCreateInfo πŸ’–

okay bestie, welcome to the SDL3 DATATYPES corner of the manual, where we meet SDL_GPUGraphicsPipelineCreateInfo β€” and yes that name is a whole mouthful, we're saying it with our chest anyway. 🫢


✨ NAME ✨

SDL_GPUGraphicsPipelineCreateInfo β€” a structure specifying the parameters of a graphics pipeline state. it's literally the little info packet you hand over when you want a graphics pipeline built. no cap. πŸ’…


✨ SYNOPSIS ✨

#include <SDL3/SDL_gpu.h>

typedef struct SDL_GPUGraphicsPipelineCreateInfo
{
    SDL_GPUShader *vertex_shader;                   /**< The vertex shader used by the graphics pipeline. */
    SDL_GPUShader *fragment_shader;                 /**< The fragment shader used by the graphics pipeline. */
    SDL_GPUVertexInputState vertex_input_state;     /**< The vertex layout of the graphics pipeline. */
    SDL_GPUPrimitiveType primitive_type;            /**< The primitive topology of the graphics pipeline. */
    SDL_GPURasterizerState rasterizer_state;        /**< The rasterizer state of the graphics pipeline. */
    SDL_GPUMultisampleState multisample_state;      /**< The multisample state of the graphics pipeline. */
    SDL_GPUDepthStencilState depth_stencil_state;   /**< The depth-stencil state of the graphics pipeline. */
    SDL_GPUGraphicsPipelineTargetInfo target_info;  /**< Formats and blend modes for the render targets of the graphics pipeline. */

    SDL_PropertiesID props;                         /**< A properties ID for extensions. Should be 0 if no extensions are needed. */
} SDL_GPUGraphicsPipelineCreateInfo;

🌸 the field-by-field vibe check 🌸

like, let's go through the whole roster, because every single one of these matters and none of them are filler:

  • vertex_shader β€” an SDL_GPUShader *, aka the vertex shader this graphics pipeline uses. 🌈
  • fragment_shader β€” an SDL_GPUShader *, the fragment shader the graphics pipeline uses. she's the one doing the coloring, iconic. πŸŽ€
  • vertex_input_state β€” an SDL_GPUVertexInputState, the vertex layout of the graphics pipeline.
  • primitive_type β€” an SDL_GPUPrimitiveType, the primitive topology of the graphics pipeline.
  • rasterizer_state β€” an SDL_GPURasterizerState, the rasterizer state of the graphics pipeline.
  • multisample_state β€” an SDL_GPUMultisampleState, the multisample state of the graphics pipeline.
  • depth_stencil_state β€” an SDL_GPUDepthStencilState, the depth-stencil state of the graphics pipeline.
  • target_info β€” an SDL_GPUGraphicsPipelineTargetInfo, holding the formats and blend modes for the render targets of the graphics pipeline.
  • props β€” an SDL_PropertiesID for extensions. heads up bestie: this one should be 0 if no extensions are needed. don't be out here passing random garbage, ok? πŸ™ˆ

πŸ’œ AVAILABILITY πŸ’œ

this struct is available since SDL 3.2.0. she's been around, she's established, she's got seniority. πŸ‘‘


πŸ”₯ SEE ALSO πŸ”₯

the whole friend group, go say hi:


and that's the whole page, periodt. πŸ’…βœ¨ this masterpiece came to you from Simple Directmedia Layer, version SDL 3.4.18, and honestly? slay. go build a pipeline, bestie, i believe in you. πŸ¦‹πŸ’–

πŸ“¦ where this page comes from