{-# language CPP #-} module Vulkan.Core10.Enums.PrimitiveTopology (PrimitiveTopology( PRIMITIVE_TOPOLOGY_POINT_LIST , PRIMITIVE_TOPOLOGY_LINE_LIST , PRIMITIVE_TOPOLOGY_LINE_STRIP , PRIMITIVE_TOPOLOGY_TRIANGLE_LIST , PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP , PRIMITIVE_TOPOLOGY_TRIANGLE_FAN , PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY , PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY , PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY , PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY , PRIMITIVE_TOPOLOGY_PATCH_LIST , .. )) where import GHC.Read (choose) import GHC.Read (expectP) import GHC.Read (parens) import GHC.Show (showParen) import GHC.Show (showString) import GHC.Show (showsPrec) import Text.ParserCombinators.ReadPrec ((+++)) import Text.ParserCombinators.ReadPrec (prec) import Text.ParserCombinators.ReadPrec (step) import Foreign.Storable (Storable) import Data.Int (Int32) import GHC.Read (Read(readPrec)) import Text.Read.Lex (Lexeme(Ident)) import Vulkan.Zero (Zero) -- | VkPrimitiveTopology - Supported primitive topologies -- -- = Description -- -- Each primitive topology, and its construction from a list of vertices, -- is described in detail below with a supporting diagram, according to the -- following key: -- -- +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+--------------------------------------------------------------------------------------------------------------------------------+ -- | <> | Vertex | A point in 3-dimensional space. Positions chosen within the diagrams are arbitrary and for illustration only. | -- +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+--------------------------------------------------------------------------------------------------------------------------------+ -- | <> | Vertex | Sequence position of a vertex within the provided vertex data. | -- | | Number | | -- +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+--------------------------------------------------------------------------------------------------------------------------------+ -- | <> | Provoking | Provoking vertex within the main primitive. The arrow points along an edge of the relevant primitive, following winding order. | -- | | Vertex | Used in | -- | | | . | -- +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+--------------------------------------------------------------------------------------------------------------------------------+ -- | <> | Primitive | An edge connecting the points of a main primitive. | -- | | Edge | | -- +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+--------------------------------------------------------------------------------------------------------------------------------+ -- | <> | Adjacency | Points connected by these lines do not contribute to a main primitive, and are only accessible in a | -- | | Edge | . | -- +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+--------------------------------------------------------------------------------------------------------------------------------+ -- | <> | Winding | The relative order in which vertices are defined within a primitive, used in the | -- | | Order | . | -- | | | This ordering has no specific start or end point. | -- +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+--------------------------------------------------------------------------------------------------------------------------------+ -- -- The diagrams are supported with mathematical definitions where the -- vertices (v) and primitives (p) are numbered starting from 0; v0 is the -- first vertex in the provided data and p0 is the first primitive in the -- set of primitives defined by the vertices and topology. -- -- = See Also -- -- 'Vulkan.Core10.Pipeline.PipelineInputAssemblyStateCreateInfo', -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetPrimitiveTopologyEXT' newtype PrimitiveTopology = PrimitiveTopology Int32 deriving newtype (Eq, Ord, Storable, Zero) -- | 'PRIMITIVE_TOPOLOGY_POINT_LIST' specifies a series of -- . pattern PRIMITIVE_TOPOLOGY_POINT_LIST = PrimitiveTopology 0 -- | 'PRIMITIVE_TOPOLOGY_LINE_LIST' specifies a series of -- . pattern PRIMITIVE_TOPOLOGY_LINE_LIST = PrimitiveTopology 1 -- | 'PRIMITIVE_TOPOLOGY_LINE_STRIP' specifies a series of -- -- with consecutive lines sharing a vertex. pattern PRIMITIVE_TOPOLOGY_LINE_STRIP = PrimitiveTopology 2 -- | 'PRIMITIVE_TOPOLOGY_TRIANGLE_LIST' specifies a series of -- . pattern PRIMITIVE_TOPOLOGY_TRIANGLE_LIST = PrimitiveTopology 3 -- | 'PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP' specifies a series of -- -- with consecutive triangles sharing an edge. pattern PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP = PrimitiveTopology 4 -- | 'PRIMITIVE_TOPOLOGY_TRIANGLE_FAN' specifies a series of -- -- with all triangles sharing a common vertex. If the -- @VK_KHR_portability_subset@ extension is enabled, and -- 'Vulkan.Extensions.VK_KHR_portability_subset.PhysicalDevicePortabilitySubsetFeaturesKHR'::@triangleFans@ -- is 'Vulkan.Core10.FundamentalTypes.FALSE', then triangle fans are not -- supported by the implementation, and 'PRIMITIVE_TOPOLOGY_TRIANGLE_FAN' -- /must/ not be used. pattern PRIMITIVE_TOPOLOGY_TRIANGLE_FAN = PrimitiveTopology 5 -- | 'PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY' specifies a series of -- . pattern PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY = PrimitiveTopology 6 -- | 'PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY' specifies a series of -- , -- with consecutive primitives sharing three vertices. pattern PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY = PrimitiveTopology 7 -- | 'PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY' specifies a series of -- . pattern PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY = PrimitiveTopology 8 -- | 'PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY' specifies -- , -- with consecutive triangles sharing an edge. pattern PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY = PrimitiveTopology 9 -- | 'PRIMITIVE_TOPOLOGY_PATCH_LIST' specifies -- . pattern PRIMITIVE_TOPOLOGY_PATCH_LIST = PrimitiveTopology 10 {-# complete PRIMITIVE_TOPOLOGY_POINT_LIST, PRIMITIVE_TOPOLOGY_LINE_LIST, PRIMITIVE_TOPOLOGY_LINE_STRIP, PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP, PRIMITIVE_TOPOLOGY_TRIANGLE_FAN, PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY, PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY, PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY, PRIMITIVE_TOPOLOGY_PATCH_LIST :: PrimitiveTopology #-} instance Show PrimitiveTopology where showsPrec p = \case PRIMITIVE_TOPOLOGY_POINT_LIST -> showString "PRIMITIVE_TOPOLOGY_POINT_LIST" PRIMITIVE_TOPOLOGY_LINE_LIST -> showString "PRIMITIVE_TOPOLOGY_LINE_LIST" PRIMITIVE_TOPOLOGY_LINE_STRIP -> showString "PRIMITIVE_TOPOLOGY_LINE_STRIP" PRIMITIVE_TOPOLOGY_TRIANGLE_LIST -> showString "PRIMITIVE_TOPOLOGY_TRIANGLE_LIST" PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP -> showString "PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP" PRIMITIVE_TOPOLOGY_TRIANGLE_FAN -> showString "PRIMITIVE_TOPOLOGY_TRIANGLE_FAN" PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY -> showString "PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY" PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY -> showString "PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY" PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY -> showString "PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY" PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY -> showString "PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY" PRIMITIVE_TOPOLOGY_PATCH_LIST -> showString "PRIMITIVE_TOPOLOGY_PATCH_LIST" PrimitiveTopology x -> showParen (p >= 11) (showString "PrimitiveTopology " . showsPrec 11 x) instance Read PrimitiveTopology where readPrec = parens (choose [("PRIMITIVE_TOPOLOGY_POINT_LIST", pure PRIMITIVE_TOPOLOGY_POINT_LIST) , ("PRIMITIVE_TOPOLOGY_LINE_LIST", pure PRIMITIVE_TOPOLOGY_LINE_LIST) , ("PRIMITIVE_TOPOLOGY_LINE_STRIP", pure PRIMITIVE_TOPOLOGY_LINE_STRIP) , ("PRIMITIVE_TOPOLOGY_TRIANGLE_LIST", pure PRIMITIVE_TOPOLOGY_TRIANGLE_LIST) , ("PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP", pure PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP) , ("PRIMITIVE_TOPOLOGY_TRIANGLE_FAN", pure PRIMITIVE_TOPOLOGY_TRIANGLE_FAN) , ("PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY", pure PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY) , ("PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY", pure PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY) , ("PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY", pure PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY) , ("PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY", pure PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY) , ("PRIMITIVE_TOPOLOGY_PATCH_LIST", pure PRIMITIVE_TOPOLOGY_PATCH_LIST)] +++ prec 10 (do expectP (Ident "PrimitiveTopology") v <- step readPrec pure (PrimitiveTopology v)))