state.h revision 4889465c09b77293d26e548597b3181038e47e48
/* Copyright (c) 2001, Stanford University
* All rights reserved.
*
* See the file LICENSE.txt for information on redistributing this software.
*/
#ifndef STATE_H
#define STATE_H
#include "cr_glstate.h"
if (expr) { \
return ret; \
}
#define CRSTATE_NO_RETURN
#define CRSTATE_CHECKERR(expr, result, message) CRSTATE_CHECKERR_RET(expr, result, message, CRSTATE_NO_RETURN)
typedef struct _crCheckIDHWID {
extern SPUDispatchTable diff_api;
extern CRStateBits *__currentBits;
#define GetCurrentBits() __currentBits
#ifdef CHROMIUM_THREADSAFE
#include <cr_threads.h>
extern CRtsd __contextTSD;
/* NOTE: below SetCurrentContext stuff is supposed to be used only internally!!
* it is placed here only to simplify things since some code besides state_init.c
* (i.e. state_glsl.c) is using it */
#else
extern CRContext *__currentContext;
#define GetCurrentContext() __currentContext
#endif
extern void crStateTextureInitTextureObj (CRContext *ctx, CRTextureObj *tobj, GLuint name, GLenum target);
/* Normally these functions would have been in cr_bufferobject.h but
* that led to a number of issues.
*/
/* These would normally be in cr_client.h */
void crStateFreeBufferObject(void *data);
void crStateFreeFBO(void *data);
void crStateFreeRBO(void *data);
#endif