VBoxOGLOp.h revision c98fb3e16fcd571a790eab772c0c66173d225205
af062818b47340eef15700d2f0211576ba3506eevboxsync * VirtualBox OpenGL command pack/unpack header
af062818b47340eef15700d2f0211576ba3506eevboxsync * Copyright (C) 2006-2007 innotek GmbH
af062818b47340eef15700d2f0211576ba3506eevboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
af062818b47340eef15700d2f0211576ba3506eevboxsync * available from http://www.virtualbox.org. This file is free software;
af062818b47340eef15700d2f0211576ba3506eevboxsync * you can redistribute it and/or modify it under the terms of the GNU
af062818b47340eef15700d2f0211576ba3506eevboxsync * General Public License as published by the Free Software Foundation,
af062818b47340eef15700d2f0211576ba3506eevboxsync * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
af062818b47340eef15700d2f0211576ba3506eevboxsync * distribution. VirtualBox OSE is distributed in the hope that it will
af062818b47340eef15700d2f0211576ba3506eevboxsync * be useful, but WITHOUT ANY WARRANTY of any kind.
4b9d6701570cb98fd36e209314239d104ec584d3vboxsync/************************************************************************************************************
4b9d6701570cb98fd36e209314239d104ec584d3vboxsync * Guest side macro's for packing OpenGL function calls into the command buffer. *
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsync ************************************************************************************************************/
af062818b47340eef15700d2f0211576ba3506eevboxsync OGL_CMD(op, 3, sizeof(p1)+sizeof(p2)+sizeof(p3)); \
af062818b47340eef15700d2f0211576ba3506eevboxsync OGL_CMD(op, 4, sizeof(p1)+sizeof(p2)+sizeof(p3)+sizeof(p4)); \
af062818b47340eef15700d2f0211576ba3506eevboxsync OGL_CMD(op, 5, sizeof(p1)+sizeof(p2)+sizeof(p3)+sizeof(p4)+sizeof(p5)); \
af062818b47340eef15700d2f0211576ba3506eevboxsync#define VBOX_OGL_GEN_OP6(op, p1, p2, p3, p4, p5, p6) \
af062818b47340eef15700d2f0211576ba3506eevboxsync OGL_CMD(op, 6, sizeof(p1)+sizeof(p2)+sizeof(p3)+sizeof(p4)+sizeof(p5)+sizeof(p6)); \
af062818b47340eef15700d2f0211576ba3506eevboxsync#define VBOX_OGL_GEN_OP7(op, p1, p2, p3, p4, p5, p6, p7) \
af062818b47340eef15700d2f0211576ba3506eevboxsync OGL_CMD(op, 7, sizeof(p1)+sizeof(p2)+sizeof(p3)+sizeof(p4)+sizeof(p5)+sizeof(p6)+sizeof(p7)); \
OGL_CMD(op, 8, sizeof(p1)+sizeof(p2)+sizeof(p3)+sizeof(p4)+sizeof(p5)+sizeof(p6)+sizeof(p7)+sizeof(p8)); \
OGL_CMD(op, 8, sizeof(p1)+sizeof(p2)+sizeof(p3)+sizeof(p4)+sizeof(p5)+sizeof(p6)+sizeof(p7)+size); \
OGL_CMD(op, 9, sizeof(p1)+sizeof(p2)+sizeof(p3)+sizeof(p4)+sizeof(p5)+sizeof(p6)+sizeof(p7)+sizeof(p8)+size); \
OGL_CMD(op, 10, sizeof(p1)+sizeof(p2)+sizeof(p3)+sizeof(p4)+sizeof(p5)+sizeof(p6)+sizeof(p7)+sizeof(p8)+sizeof(p9)+size); \
VBoxOGLFlush();
VBoxOGLFlush();
VBoxOGLFlush();
VBoxOGLFlush();
VBoxOGLFlush();
VBoxOGLFlush();
VBoxOGLFlush();
/* Sync operation whose last parameter is a block of memory in which results are returned and return a value */
void APIENTRY VBOX_OGL_NAME_PREFIX(Function) (Type1 a, Type2 b, Type3 c, Type4 d, Type5 e, Type6 f) \
void APIENTRY VBOX_OGL_NAME_PREFIX(Function) (Type1 a, Type2 b, Type3 c, Type4 d, Type5 e, Type6 f, Type7 g) \
void APIENTRY VBOX_OGL_NAME_PREFIX(Function) (Type1 a, Type2 b, Type3 c, Type4 d, Type5 e, Type6 f, Type7 g, Type8 h) \
#define GL_GEN_VPAR_FUNC9(Function, Type1, Type2, Type3, Type4, Type5, Type6, Type7, Type8 ,Type9) \
void APIENTRY VBOX_OGL_NAME_PREFIX(Function) (Type1 a, Type2 b, Type3 c, Type4 d, Type5 e, Type6 f, Type7 g, Type8 h, Type9 i) \
/************************************************************************************************************
* Host side macro's for generating OpenGL function calls from the packed commands in the command buffer. *
************************************************************************************************************/
#ifdef VBOX_OGL_CMD_STRICT
#define VBOX_OGL_GEN_OP10PTR(op, Type1, Type2, Type3, Type4, Type5, Type6, Type7, Type8, Type9, Type10) \
#define VBOX_OGL_GEN_SYNC_OP7_PTR_RET(rettype, op, Type1, Type2, Type3, Type4, Type5, Type6, Type7) \
#define GL_GEN_VPAR_FUNC9(Function, Type1, Type2, Type3, Type4, Type5, Type6, Type7, Type8 ,Type9) \
VBOX_OGL_OP_Illegal = 0,
} VBOX_OGL_OP;
NULL,
#ifdef RT_OS_WINDOWS
const char *pszExtName;
const char *pszExtFunctionName;
#ifdef VBOX_OGL_GUEST_SIDE
bool fAvailable;
#ifdef VBOX_OGL_GUEST_SIDE
{ "WGL_EXT_swap_control", "wglGetSwapIntervalEXT", VBOX_OGL_EXTENSION(wglGetSwapIntervalEXT), false },