flaw-gl-0.1.0.0

LicenseMIT
Safe HaskellNone
LanguageHaskell2010

Flaw.Graphics.GlContext

Description

 
Synopsis

Documentation

data GlContext Source #

GlContext is a Device and Context simultaneously.

Constructors

GlContext 

Fields

Instances
Device GlContext Source # 
Instance details

Defined in Flaw.Graphics.GlContext

Methods

nullTexture :: TextureId GlContext #

nullSamplerState :: SamplerStateId GlContext #

nullBlendState :: BlendStateId GlContext #

nullDepthStencilTarget :: DepthStencilTargetId GlContext #

nullVertexBuffer :: VertexBufferId GlContext #

nullIndexBuffer :: IndexBufferId GlContext #

nullUniformBuffer :: UniformBufferId GlContext #

createDeferredContext :: GlContext -> IO (DeferredContext GlContext, IO ()) #

createStaticTexture :: GlContext -> TextureInfo -> SamplerStateInfo -> ByteString -> IO (TextureId GlContext, IO ()) #

createNativeTexture :: GlContext -> SamplerStateInfo -> ByteString -> IO (TextureId GlContext, IO ()) #

createSamplerState :: GlContext -> SamplerStateInfo -> IO (SamplerStateId GlContext, IO ()) #

createBlendState :: GlContext -> BlendStateInfo -> IO (BlendStateId GlContext, IO ()) #

createReadableRenderTarget :: GlContext -> Int -> Int -> TextureFormat -> SamplerStateInfo -> IO ((RenderTargetId GlContext, TextureId GlContext), IO ()) #

createDepthStencilTarget :: GlContext -> Int -> Int -> IO (DepthStencilTargetId GlContext, IO ()) #

createReadableDepthStencilTarget :: GlContext -> Int -> Int -> SamplerStateInfo -> IO ((DepthStencilTargetId GlContext, TextureId GlContext), IO ()) #

createFrameBuffer :: GlContext -> [RenderTargetId GlContext] -> DepthStencilTargetId GlContext -> IO (FrameBufferId GlContext, IO ()) #

createStaticVertexBuffer :: GlContext -> ByteString -> Int -> IO (VertexBufferId GlContext, IO ()) #

createDynamicVertexBuffer :: GlContext -> Int -> Int -> IO (VertexBufferId GlContext, IO ()) #

createStaticIndexBuffer :: GlContext -> ByteString -> IndexTopology -> IndexStride -> IO (IndexBufferId GlContext, IO ()) #

createProgram :: GlContext -> Program () -> IO (ProgramId GlContext, IO ()) #

createUniformBuffer :: GlContext -> Int -> IO (UniformBufferId GlContext, IO ()) #

Context GlContext GlContext Source # 
Instance details

Defined in Flaw.Graphics.GlContext

Methods

contextClearColor :: GlContext -> Int -> Float4 -> IO () #

contextClearDepth :: GlContext -> Float -> IO () #

contextClearStencil :: GlContext -> Int -> IO () #

contextClearDepthStencil :: GlContext -> Float -> Int -> IO () #

contextUploadUniformBuffer :: GlContext -> UniformBufferId GlContext -> ByteString -> IO () #

contextUploadVertexBuffer :: GlContext -> VertexBufferId GlContext -> ByteString -> IO () #

contextDraw :: GlContext -> Int -> Int -> IO () #

contextPlay :: Context dc GlContext => GlContext -> dc -> IO () #

contextRender :: GlContext -> IO a -> IO a #

contextSetFrameBuffer :: GlContext -> FrameBufferId GlContext -> IO a -> IO a #

contextSetViewport :: GlContext -> Int4 -> IO a -> IO a #

contextGetViewport :: GlContext -> IO Int4 #

contextSetScissor :: GlContext -> Maybe Int4 -> IO a -> IO a #

contextGetScissor :: GlContext -> IO (Maybe Int4) #

contextSetVertexBuffer :: GlContext -> Int -> VertexBufferId GlContext -> IO a -> IO a #

contextSetIndexBuffer :: GlContext -> IndexBufferId GlContext -> IO a -> IO a #

contextSetUniformBuffer :: GlContext -> Int -> UniformBufferId GlContext -> IO a -> IO a #

contextSetSampler :: GlContext -> Int -> TextureId GlContext -> SamplerStateId GlContext -> IO a -> IO a #

contextSetBlendState :: GlContext -> BlendStateId GlContext -> IO a -> IO a #

contextSetDepthTestFunc :: GlContext -> DepthTestFunc -> IO a -> IO a #

contextSetDepthWrite :: GlContext -> Bool -> IO a -> IO a #

contextSetProgram :: GlContext -> ProgramId GlContext -> IO a -> IO a #

Eq (ProgramId GlDevice) Source # 
Instance details

Defined in Flaw.Graphics.GlContext

Eq (IndexBufferId GlDevice) Source # 
Instance details

Defined in Flaw.Graphics.GlContext

Eq (VertexBufferId GlContext) Source # 
Instance details

Defined in Flaw.Graphics.GlContext

Eq (FrameBufferId GlContext) Source # 
Instance details

Defined in Flaw.Graphics.GlContext

Eq (BlendStateId GlContext) Source # 
Instance details

Defined in Flaw.Graphics.GlContext

Eq (SamplerStateId GlContext) Source # 
Instance details

Defined in Flaw.Graphics.GlContext

Eq (TextureId GlContext) Source # 
Instance details

Defined in Flaw.Graphics.GlContext

data UniformBufferId GlContext Source # 
Instance details

Defined in Flaw.Graphics.GlContext

data ProgramId GlContext Source # 
Instance details

Defined in Flaw.Graphics.GlContext

data IndexBufferId GlContext Source # 
Instance details

Defined in Flaw.Graphics.GlContext

data VertexBufferId GlContext Source # 
Instance details

Defined in Flaw.Graphics.GlContext

data FrameBufferId GlContext Source # 
Instance details

Defined in Flaw.Graphics.GlContext

data DepthStencilTargetId GlContext Source # 
Instance details

Defined in Flaw.Graphics.GlContext

data RenderTargetId GlContext Source # 
Instance details

Defined in Flaw.Graphics.GlContext

data BlendStateId GlContext Source # 
Instance details

Defined in Flaw.Graphics.GlContext

newtype SamplerStateId GlContext Source # 
Instance details

Defined in Flaw.Graphics.GlContext

newtype TextureId GlContext Source # 
Instance details

Defined in Flaw.Graphics.GlContext

newtype TextureId GlContext = GlTextureId TextureName
type DeferredContext GlContext Source # 
Instance details

Defined in Flaw.Graphics.GlContext

data family TextureId d :: Type #

Type for texture id.

Instances
Eq (TextureId GlContext) Source # 
Instance details

Defined in Flaw.Graphics.GlContext

newtype TextureId GlContext Source # 
Instance details

Defined in Flaw.Graphics.GlContext

newtype TextureId GlContext = GlTextureId TextureName

newGlContext Source #

Arguments

:: (forall a. IO a -> IO a)

Invoke function, may be used to perform operations in a window thread. Does not need to be re-entrant.

-> (forall a. IO a -> IO a)

Background invoke function, used by heavy functions. Can be the same as invoke function.

-> (IO () -> IO ())

Async background invoke function, used by destructors.

-> GlCaps

Context capabilities.

-> GlslConfig

GLSL config.

-> SomeBinaryCache

Cache for binary shaders and other stuff.

-> IO GlContext 

Init GlContext structure.