back to index
Viewport
- window and fullscreen 16/32 bit color modes (probably 24, too)
- event polling + event controlled redraw modes
- vertical blank synchronisation (win32)
- a note on object picking: you need to allocate a picking color first (SDL.allocPickingColor()). Now the strategy is:
- use that picking color to draw a small pixel on the screen before you draw your "pickable" object
- draw your object
- grab the pixel at the mouse coordinates from the GL RGB(A) framebuffer (use zglReadColorPixel())
- if the pixel is not there anymore, also grab the 'z' value from the GL depth buffer (use zglReadDepthPixel()), otherwise the object is not under the current mouse cursor (since it did not overdraw the magic pixel)
Inheritance
Object -> Viewport
Properties
Methods
beginPaint ()
close ()
endPaint ()
int getDepth ()
int getFrequency ()
int getHeight ()
float getPickedz ()
int getPickedid ()
int getWidth ()
needRedraw ()
int openScreen (int _w, int _h, int _bitsperpixel)
int openWindow (int _w, int _h)
int resizeWindow (int _w, int _h)
setCaption (String _title)
setPickingPos (int _x, int _y)
setScreenResolution (int _w, int _h, int _bipp) - call prior to toggleFullScreen()
setFlags (int _flags) - SDL_NOFRAME | SDL_RESIZE
toggleFullScreen ()
waitVBlank ()
back to index