#[repr(transparent)]pub struct SDL_GPUPrimitiveType(pub c_int);Expand description
Specifies the primitive topology of a graphics pipeline.
If you are using POINTLIST you must include a point size output in the vertex shader.
- For HLSL compiling to SPIRV you must decorate a float output with [[vk::builtin(“PointSize”)]].
- For GLSL you must set the gl_PointSize builtin.
- For MSL you must include a float output with the [[point_size]] decorator.
Note that sized point topology is totally unsupported on D3D12. Any size other than 1 will be ignored. In general, you should avoid using point topology for both compatibility and performance reasons. You WILL regret using it.
§Availability
This enum is available since SDL 3.2.0.
§See also
§Known values (sdl3-sys)
| Associated constant | Global constant | Description |
|---|---|---|
TRIANGLELIST | SDL_GPU_PRIMITIVETYPE_TRIANGLELIST | A series of separate triangles. |
TRIANGLESTRIP | SDL_GPU_PRIMITIVETYPE_TRIANGLESTRIP | A series of connected triangles. |
LINELIST | SDL_GPU_PRIMITIVETYPE_LINELIST | A series of separate lines. |
LINESTRIP | SDL_GPU_PRIMITIVETYPE_LINESTRIP | A series of connected lines. |
POINTLIST | SDL_GPU_PRIMITIVETYPE_POINTLIST | A series of separate points. |
Tuple Fields§
§0: c_intImplementations§
Source§impl SDL_GPUPrimitiveType
impl SDL_GPUPrimitiveType
Sourcepub const TRIANGLELIST: Self
pub const TRIANGLELIST: Self
A series of separate triangles.
Sourcepub const TRIANGLESTRIP: Self
pub const TRIANGLESTRIP: Self
A series of connected triangles.
Trait Implementations§
Source§impl Clone for SDL_GPUPrimitiveType
impl Clone for SDL_GPUPrimitiveType
Source§fn clone(&self) -> SDL_GPUPrimitiveType
fn clone(&self) -> SDL_GPUPrimitiveType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SDL_GPUPrimitiveType
Available on crate feature debug-impls only.
impl Debug for SDL_GPUPrimitiveType
Available on crate feature
debug-impls only.Source§impl Default for SDL_GPUPrimitiveType
impl Default for SDL_GPUPrimitiveType
Source§fn default() -> SDL_GPUPrimitiveType
fn default() -> SDL_GPUPrimitiveType
Returns the “default value” for a type. Read more
Source§impl From<SDL_GPUPrimitiveType> for c_int
impl From<SDL_GPUPrimitiveType> for c_int
Source§fn from(value: SDL_GPUPrimitiveType) -> Self
fn from(value: SDL_GPUPrimitiveType) -> Self
Converts to this type from the input type.
Source§impl GroupMetadata for SDL_GPUPrimitiveType
Available on crate feature metadata only.
impl GroupMetadata for SDL_GPUPrimitiveType
Available on crate feature
metadata only.Source§const GROUP_METADATA: &'static Group
const GROUP_METADATA: &'static Group
Metadata for this group
Source§impl Hash for SDL_GPUPrimitiveType
impl Hash for SDL_GPUPrimitiveType
Source§impl Ord for SDL_GPUPrimitiveType
impl Ord for SDL_GPUPrimitiveType
Source§fn cmp(&self, other: &SDL_GPUPrimitiveType) -> Ordering
fn cmp(&self, other: &SDL_GPUPrimitiveType) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq<SDL_GPUPrimitiveType> for c_int
impl PartialEq<SDL_GPUPrimitiveType> for c_int
Source§impl PartialEq<i32> for SDL_GPUPrimitiveType
impl PartialEq<i32> for SDL_GPUPrimitiveType
Source§impl PartialEq for SDL_GPUPrimitiveType
impl PartialEq for SDL_GPUPrimitiveType
Source§impl PartialOrd for SDL_GPUPrimitiveType
impl PartialOrd for SDL_GPUPrimitiveType
impl Copy for SDL_GPUPrimitiveType
impl Eq for SDL_GPUPrimitiveType
impl StructuralPartialEq for SDL_GPUPrimitiveType
Auto Trait Implementations§
impl Freeze for SDL_GPUPrimitiveType
impl RefUnwindSafe for SDL_GPUPrimitiveType
impl Send for SDL_GPUPrimitiveType
impl Sync for SDL_GPUPrimitiveType
impl Unpin for SDL_GPUPrimitiveType
impl UnwindSafe for SDL_GPUPrimitiveType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more