module Graphics.LambdaCube.Pass where
import Graphics.LambdaCube.BlendMode
import Graphics.LambdaCube.Common
import Graphics.LambdaCube.GpuProgram
import Graphics.LambdaCube.GpuProgramUsage
import Graphics.LambdaCube.Light
import Graphics.LambdaCube.Texture
import Graphics.LambdaCube.TextureUnitState
import Graphics.LambdaCube.Types
data IlluminationStage
= IS_AMBIENT
| IS_PER_LIGHT
| IS_DECAL
| IS_UNKNOWN
deriving (Eq,Ord)
data (Texture t, LinkedGpuProgram lp) => Pass t lp
= Pass
{ psName :: String
, psAmbient :: ColourValue
, psDiffuse :: ColourValue
, psSpecular :: ColourValue
, psEmissive :: ColourValue
, psShininess :: FloatType
, psTracking :: TrackVertexColourType
, psSourceBlendFactor :: SceneBlendFactor
, psDestBlendFactor :: SceneBlendFactor
, psSourceBlendFactorAlpha :: SceneBlendFactor
, psDestBlendFactorAlpha :: SceneBlendFactor
, psSeparateBlend :: Bool
, psBlendOperation :: SceneBlendOperation
, psAlphaBlendOperation :: SceneBlendOperation
, psSeparateBlendOperation :: Bool
, psDepthCheck :: Bool
, psDepthWrite :: Bool
, psDepthFunc :: CompareFunction
, psDepthBiasConstant :: FloatType
, psDepthBiasSlopeScale :: FloatType
, psDepthBiasPerIteration :: FloatType
, psColourWrite :: Bool
, psAlphaRejectFunc :: CompareFunction
, psAlphaRejectVal :: Int
, psAlphaToCoverageEnabled :: Bool
, psTransparentSorting :: Bool
, psTransparentSortingForced :: Bool
, psCullMode :: CullingMode
, psManualCullMode :: ManualCullingMode
, psLightingEnabled :: Bool
, psMaxSimultaneousLights :: Int
, psStartLight :: Int
, psLightsPerIteration :: Maybe Int
, psOnlyLightType :: Maybe LightTypes
, psShadeOptions :: ShadeOptions
, psPolygonMode :: PolygonMode
, psNormaliseNormals :: Bool
, psPolygonModeOverrideable :: Bool
, psFogOverride :: Bool
, psFogMode :: FogMode
, psFogColour :: ColourValue
, psFogStart :: FloatType
, psFogEnd :: FloatType
, psFogDensity :: FloatType
, psTextureUnitStates :: [TextureUnitState t]
, psVertexProgramUsage :: Maybe GpuProgramUsage
, psFragmentProgramUsage :: Maybe GpuProgramUsage
, psGeometryProgramUsage :: Maybe GpuProgramUsage
, psLinkedGpuProgram :: Maybe lp
, psPassIterationCount :: Int
, psPointSize :: FloatType
, psPointMinSize :: FloatType
, psPointMaxSize :: FloatType
, psPointSpritesEnabled :: Bool
, psPointAttenuationEnabled :: Bool
, psPointAttenuationCoeffs :: FloatType3
, psLightScissoring :: Bool
, psLightClipPlanes :: Bool
, psIlluminationStage :: IlluminationStage
}
deriving (Eq,Ord)