cr_glsl.h revision e64031e20c39650a7bc902a3e1aba613b9415dee
/* $Id$ */
/** @file
* VBox crOpenGL: GLSL related state info
*/
/*
* Copyright (C) 2009 Oracle Corporation
*
* 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.
*/
#ifndef CR_STATE_GLSL_H
#define CR_STATE_GLSL_H
#include "cr_hash.h"
#include "state/cr_statetypes.h"
#include "state/cr_statefuncs.h"
#ifdef __cplusplus
extern "C" {
#endif
/* We can't go the "easy" way of just extracting all the required data when taking snapshots.
Shader objects might be modified *after* program linkage and wouldn't affect program untill it's relinked.
So we have to keep track of shaders statuses right before each program was linked as well as their "current" status.
*/
/*@todo: check rare case when successfully linked and active program is relinked with failure*/
typedef struct {
} CRGLSLShader;
typedef struct {
} CRGLSLAttrib;
/*Note: active state will hold copies of shaders while current state references shaders in the CRGLSLState hashtable*/
/*@todo: probably don't need a hashtable here*/
typedef struct {
typedef struct{
#ifdef IN_GUEST
#endif
typedef struct {
#ifdef IN_GUEST
#endif
typedef struct {
/* Indicates that we have to resend GLSL data to GPU on first glMakeCurrent call with owning context */
} CRGLSLState;
#ifdef IN_GUEST
DECLEXPORT(void) STATE_APIENTRY crStateGLSLProgramCacheUniforms(GLuint program, GLsizei cbData, GLvoid *pData);
#else
DECLEXPORT(void) STATE_APIENTRY crStateGLSLProgramCacheUniforms(GLuint program, GLsizei maxcbData, GLsizei *cbData, GLvoid *pData);
#endif
#ifdef __cplusplus
}
#endif
#endif /* CR_STATE_GLSL_H */