haskus-system-0.7.0.0: Haskus system programming framework

Safe HaskellNone
LanguageHaskell2010

Haskus.System.Graphics

Contents

Description

Manage graphics devices

Synopsis

Documentation

data GraphicCard Source #

Graphic card

Constructors

GraphicCard 

Fields

loadGraphicCards :: DeviceManager -> Sys [GraphicCard] Source #

Return detected graphic cards

Graphic cards are classdrm/cardN directories in SysFS where N is the card identifier. In this directory, the dev file contains device major/minor to create appropriate device node.

initGenericFrameBuffer :: GraphicCard -> Mode -> PixelFormat -> Sys GenericFrame Source #

Allocate and map fullscreen planes for the given format and mode

Multi-buffering

data RenderingEngine Source #

Rendering engine

Manage multi-buffering

Constructors

RenderingEngine 

Fields

data BufferingState a Source #

Multi-buffering state

Constructors

BufferingState 

Fields

data FrameWait Source #

Rendering wait

Constructors

WaitPending

Wait if there is a pending frame (that will be displayed asap)

WaitDrawn

wait if there is already a rendered frame

initRenderingEngine :: GraphicCard -> Controller -> Mode -> Word -> [FrameWait] -> (Mode -> GenericFrame -> Sys ()) -> Sys RenderingEngine Source #

Init the rendering engine

TODO: indicate failure (GenericBuffer not supported, framebuffer allocation error, etc.) TODO: support multiple controllers/connectors TODO: support connections/disconnections TODO: better support for mode setting (change during rendering, etc.) TODO: support accelerated buffers

Capability

setClientCapabilityWarn :: Handle -> ClientCapability -> Bool -> Sys () Source #

Set a client capability