drv.cpp revision 4604ab7d38c2bd2dfc255aa1facffdf81c1c9153
/** @file
*
* VirtualBox Windows NT/2000/XP guest OpenGL ICD
*
* ICD entry points.
*
* Copyright (C) 2006-2007 Sun Microsystems, Inc.
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
* Clara, CA 95054 USA or visit http://www.sun.com if you need
* additional information or have any questions.
*/
/*
* Mesa 3-D graphics library
* Version: 6.1
*
* Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/*
* File name: icd.c
* Author: Gregor Anich
*
* ICD (Installable Client Driver) interface.
*/
#include "VBoxOGL.h"
#include "VBoxICDList.h"
} };
{
return TRUE;
}
{
/* Note: we ignore the callback parameter here */
return &icdTable;
}
/* DrvSetPixelFormat can only be called once for each window (if hdc associated with one). */
{
/** check dimensions and pixel format of hdc */
if (hwnd)
{
}
else
{
/** @todo get dimenions of memory dc; a bitmap should be selected in there */
AssertFailed();
}
/* Propagate error through the right channel */
return retval;
}
{
/* Propagate error through the right channel */
return retval;
}
{
/* Propagate error through the right channel */
return retval;
}
{
VBOX_OGL_GEN_SYNC_OP5_PASS_PTR_RET(BOOL, DrvDescribeLayerPlane, hdc, iPixelFormat, iLayerPlane, nBytes, nBytes, plpd);
/* Propagate error through the right channel */
return retval;
}
{
VBOX_OGL_GEN_SYNC_OP5_PASS_PTR_RET(int, DrvGetLayerPaletteEntries, hdc, iLayerPlane, iStart, cEntries, sizeof(COLORREF)*cEntries, pcr);
/* Propagate error through the right channel */
return retval;
}
int APIENTRY DrvDescribePixelFormat(HDC hdc, int iPixelFormat, UINT nBytes, LPPIXELFORMATDESCRIPTOR ppfd)
{
/* if ppfd == NULL, then DrvDescribelayerPlane returns the maximum nr of supported pixel formats */
VBOX_OGL_GEN_SYNC_OP4_PASS_PTR_RET(int, DrvDescribePixelFormat, hdc, iPixelFormat, nBytes, nBytes, ppfd);
/* Propagate error through the right channel */
return retval;
}
{
/* Propagate error through the right channel */
return retval;
}
{
/* Propagate error through the right channel */
return retval;
}
{
/* Propagate error through the right channel */
}
{
/* Propagate error through the right channel */
return retval;
}
{
VBOX_OGL_GEN_SYNC_OP5_PTR_RET(int, DrvSetLayerPaletteEntries, hdc, iLayerPlane, iStart, cEntries, sizeof(COLORREF)*cEntries, pcr);
/* Propagate error through the right channel */
return retval;
}
{
/* Propagate error through the right channel */
return retval;
}
{
/* Propagate error through the right channel */
return retval;
}
{
/* Propagate error through the right channel */
return retval;
}
#ifdef VBOX_WITH_WGL_EXPORTS
/* Test export for directly linking with vboxogl.dll */
{
}
{
}
{
}
{
return DrvDeleteContext(hglrc);
}
{
}
{
return DrvSwapBuffers(hdc);
}
{
}
{
}
{
return TRUE;
}
{
return DrvGetProcAddress(lpszProc);
}
int WINAPI wglDescribePixelFormat(HDC hdc, int iPixelFormat, UINT nBytes, LPPIXELFORMATDESCRIPTOR ppfd)
{
}
{
}
{
}
{
return DrvCreateContext(hdc);
}
#endif