VBoxCmd.cpp revision c98fb3e16fcd571a790eab772c0c66173d225205
/** @file
*
* VBoxDisp -- Windows Guest OpenGL ICD
*
* Copyright (C) 2006-2007 innotek GmbH
*
* 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 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.
*/
#define VBOX_OGL_WITH_CMD_STRINGS
#include "VBoxOGL.h"
#include <stdarg.h>
#include <stdio.h>
/**
* Queue a new OpenGL command
*
* @param enmOp OpenGL command op
* @param cParams Number of parameters
* @param cbParams Memory needed for parameters
*/
{
if (pCtx->pCurrentCmd + cParams*VBOX_OGL_CMD_ALIGN + cbParams + sizeof(VBOX_OGL_CMD) >= pCtx->pCmdBufferEnd)
{
DbgPrintf(("VBoxCmdStart -> cmd queue full -> flush!\n"));
VBoxOGLFlush();
}
#ifdef VBOX_OGL_CMD_STRICT
#endif
return;
}
/**
* Add a parameter (fixed size) to the currently queued OpenGL command
*
* @param pParam Parameter ptr
* @param cbParam Parameter value size
*/
{
#ifdef DEBUG
switch(cbParam)
{
case 1:
DbgPrintf2(("Param %s val=%x cbParam=%d\n", pszVBoxOGLCmd[pCmd->enmOp], *(uint8_t *)pParam, cbParam));
break;
case 2:
DbgPrintf2(("Param %s val=%x cbParam=%d\n", pszVBoxOGLCmd[pCmd->enmOp], *(uint16_t *)pParam, cbParam));
break;
case 4:
default:
DbgPrintf2(("Param %s val=%x cbParam=%d\n", pszVBoxOGLCmd[pCmd->enmOp], *(uint32_t *)pParam, cbParam));
break;
}
#endif
}
/**
* Add a parameter (variable size) to the currently queued OpenGL command
*
* @param pParam Parameter ptr
* @param cbParam Parameter value size
*/
{
#ifdef VBOX_OGL_CMD_STRICT
#endif
{
}
else
{
pCurrentParam->cbParam = 0;
cbParam = 0;
}
}
/**
* Finish the queued command
*
* @param enmOp OpenGL command op
*/
{
}