.\" This manpage content is licensed under Creative Commons .\" Attribution 4.0 International (CC BY 4.0) .\" https://creativecommons.org/licenses/by/4.0/ .\" This manpage was generated from SDL's wiki page for SDL_CreateTextureWithProperties: .\" https://wiki.libsdl.org/SDL_CreateTextureWithProperties .\" Generated with SDL/build-scripts/wikiheaders.pl .\" revision SDL-3.1.0 .\" Please report issues in this manpage's content at: .\" https://github.com/libsdl-org/sdlwiki/issues/new .\" Please report issues in the generation of this manpage from the wiki at: .\" https://github.com/libsdl-org/SDL/issues/new?title=Misgenerated%20manpage%20for%20SDL_CreateTextureWithProperties .\" SDL can be found at https://libsdl.org/ .de URL \$2 \(laURL: \$1 \(ra\$3 .. .if \n[.g] .mso www.tmac .TH SDL_CreateTextureWithProperties 3 "SDL 3.1.0" "SDL" "SDL3 FUNCTIONS" .SH NAME SDL_CreateTextureWithProperties \- Create a texture for a rendering context with the specified properties\[char46] .SH SYNOPSIS .nf .B #include \(dqSDL3/SDL.h\(dq .PP .BI "SDL_Texture* SDL_CreateTextureWithProperties(SDL_Renderer *renderer, SDL_PropertiesID props); .fi .SH DESCRIPTION These are the supported properties: \(bu .BR .BR SDL_PROP_TEXTURE_CREATE_COLORSPACE_NUMBER : an .BR SDL_ColorSpace value describing the texture colorspace, defaults to .BR SDL_COLORSPACE_SRGB_LINEAR for floating point textures, .BR SDL_COLORSPACE_HDR10 for 10-bit textures, .BR SDL_COLORSPACE_SRGB for other RGB textures and .BR SDL_COLORSPACE_JPEG for YUV textures\[char46] \(bu .BR .BR SDL_PROP_TEXTURE_CREATE_FORMAT_NUMBER : one of the enumerated values in .BR SDL_PixelFormatEnum , defaults to the best RGBA format for the renderer \(bu .BR .BR SDL_PROP_TEXTURE_CREATE_ACCESS_NUMBER : one of the enumerated values in .BR SDL_TextureAccess , defaults to .BR SDL_TEXTUREACCESS_STATIC \(bu .BR .BR SDL_PROP_TEXTURE_CREATE_WIDTH_NUMBER : the width of the texture in pixels, required \(bu .BR .BR SDL_PROP_TEXTURE_CREATE_HEIGHT_NUMBER : the height of the texture in pixels, required \(bu .BR .BR SDL_PROP_TEXTURE_CREATE_SDR_WHITE_POINT_FLOAT : for HDR10 and floating point textures, this defines the value of 100% diffuse white, with higher values being displayed in the High Dynamic Range headroom\[char46] This defaults to 100 for HDR10 textures and 1\[char46]0 for floating point textures\[char46] \(bu .BR .BR SDL_PROP_TEXTURE_CREATE_HDR_HEADROOM_FLOAT : for HDR10 and floating point textures, this defines the maximum dynamic range used by the content, in terms of the SDR white point\[char46] This would be equivalent to maxCLL / .BR SDL_PROP_TEXTURE_CREATE_SDR_WHITE_POINT_FLOAT for HDR10 content\[char46] If this is defined, any values outside the range supported by the display will be scaled into the available HDR headroom, otherwise they are clipped\[char46] With the direct3d11 renderer: \(bu .BR .BR SDL_PROP_TEXTURE_CREATE_D3D11_TEXTURE_POINTER : the ID3D11Texture2D associated with the texture, if you want to wrap an existing texture\[char46] \(bu .BR .BR SDL_PROP_TEXTURE_CREATE_D3D11_TEXTURE_U_POINTER : the ID3D11Texture2D associated with the U plane of a YUV texture, if you want to wrap an existing texture\[char46] \(bu .BR .BR SDL_PROP_TEXTURE_CREATE_D3D11_TEXTURE_V_POINTER : the ID3D11Texture2D associated with the V plane of a YUV texture, if you want to wrap an existing texture\[char46] With the direct3d12 renderer: \(bu .BR .BR SDL_PROP_TEXTURE_CREATE_D3D12_TEXTURE_POINTER : the ID3D12Resource associated with the texture, if you want to wrap an existing texture\[char46] \(bu .BR .BR SDL_PROP_TEXTURE_CREATE_D3D12_TEXTURE_U_POINTER : the ID3D12Resource associated with the U plane of a YUV texture, if you want to wrap an existing texture\[char46] \(bu .BR .BR SDL_PROP_TEXTURE_CREATE_D3D12_TEXTURE_V_POINTER : the ID3D12Resource associated with the V plane of a YUV texture, if you want to wrap an existing texture\[char46] With the metal renderer: \(bu .BR .BR SDL_PROP_TEXTURE_CREATE_METAL_PIXELBUFFER_POINTER : the CVPixelBufferRef associated with the texture, if you want to create a texture from an existing pixel buffer\[char46] With the opengl renderer: \(bu .BR .BR SDL_PROP_TEXTURE_CREATE_OPENGL_TEXTURE_NUMBER : the GLuint texture associated with the texture, if you want to wrap an existing texture\[char46] \(bu .BR .BR SDL_PROP_TEXTURE_CREATE_OPENGL_TEXTURE_UV_NUMBER : the GLuint texture associated with the UV plane of an NV12 texture, if you want to wrap an existing texture\[char46] \(bu .BR .BR SDL_PROP_TEXTURE_CREATE_OPENGL_TEXTURE_U_NUMBER : the GLuint texture associated with the U plane of a YUV texture, if you want to wrap an existing texture\[char46] \(bu .BR .BR SDL_PROP_TEXTURE_CREATE_OPENGL_TEXTURE_V_NUMBER : the GLuint texture associated with the V plane of a YUV texture, if you want to wrap an existing texture\[char46] With the opengles2 renderer: \(bu .BR .BR SDL_PROP_TEXTURE_CREATE_OPENGLES2_TEXTURE_NUMBER : the GLuint texture associated with the texture, if you want to wrap an existing texture\[char46] \(bu .BR .BR SDL_PROP_TEXTURE_CREATE_OPENGLES2_TEXTURE_NUMBER : the GLuint texture associated with the texture, if you want to wrap an existing texture\[char46] \(bu .BR .BR SDL_PROP_TEXTURE_CREATE_OPENGLES2_TEXTURE_UV_NUMBER : the GLuint texture associated with the UV plane of an NV12 texture, if you want to wrap an existing texture\[char46] \(bu .BR .BR SDL_PROP_TEXTURE_CREATE_OPENGLES2_TEXTURE_U_NUMBER : the GLuint texture associated with the U plane of a YUV texture, if you want to wrap an existing texture\[char46] \(bu .BR .BR SDL_PROP_TEXTURE_CREATE_OPENGLES2_TEXTURE_V_NUMBER : the GLuint texture associated with the V plane of a YUV texture, if you want to wrap an existing texture\[char46] With the vulkan renderer: \(bu .BR .BR SDL_PROP_TEXTURE_CREATE_VULKAN_TEXTURE_NUMBER : the VkImage with layout VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL associated with the texture, if you want to wrap an existing texture\[char46] .SH FUNCTION PARAMETERS .TP .I renderer the rendering context .TP .I props the properties to use .SH RETURN VALUE Returns a pointer to the created texture or NULL if no rendering context was active, the format was unsupported, or the width or height were out of range; call .BR SDL_GetError () for more information\[char46] .SH AVAILABILITY This function is available since SDL 3\[char46]0\[char46]0\[char46] .SH SEE ALSO .BR SDL_CreateProperties (3), .BR SDL_CreateTexture (3), .BR SDL_CreateTextureFromSurface (3), .BR SDL_DestroyTexture (3), .BR SDL_QueryTexture (3), .BR SDL_UpdateTexture (3)