RMenum rmPipeSetWindow (RMpipe *toUse, HWND window, int windowWidth, int windowHeight)
RMpipe *toUse - a handle to an RMpipe object (input, but not const). HWND window - a valid Win32 window handle (input). int windowWidth, int windowHeight - integer values specifying the pixel width & height of the window "w".
Use this routine to "bind" an X11 Window to an RMpipe. When this routine is called, the RMpipe's window attribute is set to the value specified by theWindow parameter, and the RMpipe's window pixel dimension attributes are set.
Note that there are no event callbacks associated with the RMpipe: when the window geometry changes (size, etc) it is the responsibility of the application to inform RM that the window geometry has changed (rmPipeSetWindowSize). There are separate versions of this routine for Win32 and X.
To assign an offscreen rendering area to the RMpipe, use the routine rmPipeSetOffscreenWindow() rather than rmPipeSetWindow().
Win32 notes: in addition to setting the window handle and size attributes, this routine also grabs the DC associated with the window, and stores the DC in a field in the RMpipe structure.
int rmPipeSetOffscreenWindow (RMpipe *toUse, HWND window, int windowWidth, int windowHeight)
Use this routine to "bind" a Win32 HWND window to an RMpipe. When this routine is called, a number of things happen:
1. The RMpipe's notion of the window size is set (rmPipeSetWindowSize).
2. The OpenGL context contained within the RMpipe is made current.
3. Final internal initialization within RM on the RMpipe's OpenGL context is performed, readying both RM and OpenGL for use.
After this call succeeds, on X11 systems is is safe to begin making raw OpenGL calls. Note that things work a bit differently in Win32. See rmauxSetInitFunc().
Returns RM_CHILL upon success, or RM_WHACKED upon failure.
This routine should be used by all applications to activate an OpenGL context and to bind a window to the RMpipe.
On Win32, there is no distinction between an onscreen and offscreen window. The routine rmPipeSetOffscreenWindow() is present to provide API compatibility between X and Win32. Internally, this routine simply makes a call to rmPipeSetWindow().