module SDLGL: sig
.. end
SDL OpenGL support
type
gl_attr =
| |
RED_SIZE |
| |
GREEN_SIZE |
| |
BLUE_SIZE |
| |
ALPHA_SIZE |
| |
DOUBLEBUFFER |
| |
BUFFER_SIZE |
| |
DEPTH_SIZE |
| |
STENCIL_SIZE |
| |
ACCUM_RED_SIZE |
| |
ACCUM_GREEN_SIZE |
| |
ACCUM_BLUE_SIZE |
| |
ACCUM_ALPHA_SIZE |
While you can set most OpenGL attributes normally, the attributes listed above must be known before SDL sets the video mode.
These attributes a set and read with set_attribute
and get_attribute
.
val swap_buffers : unit -> unit
swap_buffers
Swap OpenGL framebuffers/Update Display
val load_bmp : string -> Sdl.Video.surface
load_bmp file -> surface
Loads a Windows Bitmap file and loads it into a surface suitable for use as an OpenGL texture
val set_attribute : gl_attr -> int -> unit
set_attribute attr value
Sets the OpenGL attribute attr to value. The attributes you set don't take effect until after a call to set_video_mode
.
You should use get_attribute
to check the values after a set_video_mode
call.
val get_attribute : gl_attr -> int
get_attribute attr -> value
Returns the value of the SDL/OpenGL attribute attr in value.
This is useful after a call to set_video_mode
to check whether your attributes have been set as you expected.