Beispiel #1
0
/**
 * As above, but for glViewport.  Most apps call glViewport before
 * glClear when a window is resized.
 */
static void SPU_APIENTRY trapViewport(GLint x, GLint y, GLsizei w, GLsizei h)
{
    stubCheckWindowsState();
    /* call the original SPU glViewport function */
    if (!stub.viewportHack)
    {
        origViewport(x, y, w, h);
    }
    else
    {
        ContextInfo *context = stubGetCurrentContext();
        int winX, winY;
        unsigned int winW, winH;
        WindowInfo *pWindow;
        pWindow = context->currentDrawable;
        stubGetWindowGeometry(pWindow, &winX, &winY, &winW, &winH);
        origViewport(0, 0, winW, winH);
    }
}
Beispiel #2
0
static void SPU_APIENTRY trapDrawBuffer(GLenum buf)
{
    stubCheckWindowsState();
    origDrawBuffer(buf);
}
Beispiel #3
0
static void SPU_APIENTRY trapSwapBuffers(GLint window, GLint flags)
{
    stubCheckWindowsState();
    origSwapBuffers(window, flags);
}
Beispiel #4
0
/**
 * Override the head SPU's glClear function.
 * We're basically trapping this function so that we can poll the
 * application window size at a regular interval.
 */
static void SPU_APIENTRY trapClear(GLbitfield mask)
{
    stubCheckWindowsState();
    /* call the original SPU glClear function */
    origClear(mask);
}
Beispiel #5
0
/**
 * As above, but for glViewport.  Most apps call glViewport before
 * glClear when a window is resized.
 */
static void SPU_APIENTRY trapViewport(GLint x, GLint y, GLsizei w, GLsizei h)
{
    stubCheckWindowsState();
    /* call the original SPU glViewport function */
    origViewport(x, y, w, h);
}