Copyright | (c) Daan Leijen 2003 |
---|---|
License | wxWindows |
Maintainer | wxhaskell-devel@lists.sourceforge.net |
Stability | provisional |
Portability | portable |
Safe Haskell | None |
Language | Haskell98 |
Convenience wrappers for the openGL canvas window (GLCanvas
).
- data GLAttribute
- = GL_RGBA
- | GL_BUFFER_SIZE Int
- | GL_LEVEL Ordering
- | GL_DOUBLEBUFFER
- | GL_STEREO
- | GL_AUX_BUFFERS Int
- | GL_MIN_RED Int
- | GL_MIN_GREEN Int
- | GL_MIN_BLUE Int
- | GL_MIN_ALPHA Int
- | GL_DEPTH_SIZE Int
- | GL_STENCIL_SIZE Int
- | GL_MIN_ACCUM_RED Int
- | GL_MIN_ACCUM_GREEN Int
- | GL_MIN_ACCUM_BLUE Int
- | GL_MIN_ACCUM_ALPHA Int
- | GL_SAMPLE_BUFFERS Int
- | GL_SAMPLES Int
- | GL_CORE_PROFILE
- | GL_MAJOR_VERSION Int
- | GL_MINOR_VERSION Int
- glCanvasCreateDefault :: Window a -> Style -> String -> [GLAttribute] -> IO (GLCanvas ())
- glCanvasCreateEx :: Window a -> Id -> Rect -> Style -> String -> [GLAttribute] -> Palette b -> IO (GLCanvas ())
Types
data GLAttribute Source
OpenGL window (GLCanvas
) attributes.
GL_RGBA | Use true colour |
GL_BUFFER_SIZE Int | Bits for buffer if not |
GL_LEVEL Ordering | |
GL_DOUBLEBUFFER | Use doublebuffer |
GL_STEREO | Use stereoscopic display |
GL_AUX_BUFFERS Int | Number of auxiliary buffers (not all implementation support this option) |
GL_MIN_RED Int | Use red buffer with at least argument bits |
GL_MIN_GREEN Int | Use green buffer with at least argument bits |
GL_MIN_BLUE Int | Use blue buffer with at least argument bits |
GL_MIN_ALPHA Int | Use alpha buffer with at least argument bits |
GL_DEPTH_SIZE Int | Bits for Z-buffer (0,16,32) |
GL_STENCIL_SIZE Int | Bits for stencil buffer |
GL_MIN_ACCUM_RED Int | Use red accumulation buffer with at least argument bits |
GL_MIN_ACCUM_GREEN Int | Use green accumulation buffer with at least argument bits |
GL_MIN_ACCUM_BLUE Int | Use blue accumulation buffer with at least argument bits |
GL_MIN_ACCUM_ALPHA Int | Use alpha accumulation buffer with at least argument bits |
GL_SAMPLE_BUFFERS Int | 1 for multisampling support (antialiasing) |
GL_SAMPLES Int | 4 for 2x2 antialiasing supersampling on most graphics cards |
GL_CORE_PROFILE | request an OpenGL core profile. This will result in also requesting OpenGL at least version 3.0, since wx 3.1 |
GL_MAJOR_VERSION Int | request a specific OpenGL major version number (>= 3), since wx 3.1 |
GL_MINOR_VERSION Int | request a specific OpenGL minor version number (e.g. 2 for 3.2), since wx 3.1 |
Creation
glCanvasCreateDefault :: Window a -> Style -> String -> [GLAttribute] -> IO (GLCanvas ()) Source
Create a standard openGL canvas window with a certain title and attributes.
glCanvasCreateEx :: Window a -> Id -> Rect -> Style -> String -> [GLAttribute] -> Palette b -> IO (GLCanvas ()) Source
Create an openGL window. Use nullPalette
to use the default palette.