In file libs/cs2d/openglos2/libGL.h:

## class glWindow

> OpenGL window class This class implements everything needed to create and use a OpenGL context under OS/2

### Public Methods

inline long ActiveBuff()
  Return active buffer
bool Bind(HWND winHandle)
  Bind OpenGL buffer to a PM window, either client or frame window
inline long BufferHeight()
  Return logical buffer height
inline long BufferWidth()
  Return logical buffer width
virtual MRESULT ClientMessage(ULONG Message, MPARAM MsgParm1, MPARAM MsgParm2)
  Two virtual functions that performs PM message management for frame and client
inline void Command(ULONG CommandCode)
  Send a message to frame window (any of cmdXXX works too)
bool DisableAccelTable()
  Disable standard accelerator table for window so we can use ALT, ALT+F4 etc
void Flush(PRECTL rect)
  Flush OpenGL buffer
glWindow(long Width, long Height, long ContextFlags)
  Constructor: attach OpenGL context to client of given frame handle
inline bool isMinimized()
  Return minimized status
inline bool isPaused()
  Return if window is paused
inline void MouseCursor(ULONG ID)
  Set mouse cursor shape when it is over GL window
void MouseVisible(bool State)
  Set mouse cursor visibility when it is over GL window
inline void Pause(bool State)
  Pause window: application should check IsPaused() itself
void Select()
  Select this OpenGL context for drawing
inline void SetFocusHandler(tFocusHandler Handler, void *param)
  Define window focus change handler
inline void SetKeyboardHandler(tKeyboardHandler Handler, void *param)
  Define Keyboard Handler
inline void SetMouseHandler(tMouseHandler Handler, void *param)
  Define mouse handler
void SetPalette(u_long *palette, int count)
  Set OpenGL palette for color index modes
bool SetPos(long X, long Y)
  Set OpenGL window position
inline void SetTerminateHandler(tTerminateHandler Handler, void *param)
  Define Terminate Handler
inline bool SetTitle(char *Title)
  Set window title: This function requires a message queue
bool Show(bool Visible)
  Show the window
bool Unbind(bool Destroy)
  Unbind from window; optionally destroy window
inline void WaitFlush()
  Wait until flush is complete. Recommended before calling Flush()
virtual ~glWindow()
  Destructor: free all OpenGL buffers and memory

## Documentation

> OpenGL window class This class implements everything needed to create and use a OpenGL context under OS/2. If you attach it to a frame window (by passing a handle of a frame window in constructor) it will replace system menu (or application menu if there is one) by a specialized one. If you pass a handle of a different-type window, OpenGL context will simply attach to that window (@@ NOT TESTED! but should work). Window resises, moves etc are disabled because OS/2 OpenGL does not support resizeable output as DIVE does (why???). You can set up some additional callbacks to process all input to the window such as mouse and keyboard.

`glWindow(long Width, long Height, long ContextFlags)`
  Constructor: attach OpenGL context to client of given frame handle

`virtual ~glWindow()`
  Destructor: free all OpenGL buffers and memory

`bool Bind(HWND winHandle)`
  Bind OpenGL buffer to a PM window, either client or frame window

`bool Unbind(bool Destroy)`
  Unbind from window; optionally destroy window

`void Select()`
  Select this OpenGL context for drawing

`bool Show(bool Visible)`
  Show the window

`bool DisableAccelTable()`
  Disable standard accelerator table for window so we can use ALT, ALT+F4 etc

`virtual MRESULT ClientMessage(ULONG Message, MPARAM MsgParm1, MPARAM MsgParm2)`
  Two virtual functions that performs PM message management for frame and client

`void SetPalette(u_long *palette, int count)`
  Set OpenGL palette for color index modes

`inline void Pause(bool State)`
  Pause window: application should check IsPaused() itself

`void MouseVisible(bool State)`
  Set mouse cursor visibility when it is over GL window

`inline void MouseCursor(ULONG ID)`
  Set mouse cursor shape when it is over GL window

`void Flush(PRECTL rect)`
  Flush OpenGL buffer

`inline void WaitFlush()`
  Wait until flush is complete. Recommended before calling Flush()

`inline long ActiveBuff()`
  Return active buffer

`inline bool SetTitle(char *Title)`
  Set window title: This function requires a message queue

`inline void Command(ULONG CommandCode)`
  Send a message to frame window (any of cmdXXX works too)

`bool SetPos(long X, long Y)`
  Set OpenGL window position

`inline void SetKeyboardHandler(tKeyboardHandler Handler, void *param)`
  Define Keyboard Handler

`inline void SetTerminateHandler(tTerminateHandler Handler, void *param)`
  Define Terminate Handler

`inline void SetMouseHandler(tMouseHandler Handler, void *param)`
  Define mouse handler

`inline void SetFocusHandler(tFocusHandler Handler, void *param)`
  Define window focus change handler

`inline bool isPaused()`
  Return if window is paused

`inline bool isMinimized()`
  Return minimized status

`inline long BufferWidth()`
  Return logical buffer width

`inline long BufferHeight()`
  Return logical buffer height

This class has no child classes.

alphabetic index hierarchy of classes

this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de