state_limits.c revision bf5c9a8b30aeef751e52cfe8a66250caab2fd6a2
/* Copyright (c) 2001, Stanford University
* All rights reserved
*
* See the file LICENSE.txt for information on redistributing this software.
*/
#include <stdio.h>
#include "state.h"
#include "state/cr_statetypes.h"
#include "cr_mem.h"
#include "cr_string.h"
#include "cr_extstring.h"
#ifdef WINDOWS
#endif
/* This is a debug helper function. */
void crStateLimitsPrint (const CRLimitsState *l)
{
}
void crStateLimitsDestroy(CRLimitsState *l)
{
if (l->extensions) {
crFree((void *) l->extensions);
l->extensions = NULL;
}
}
/*
* Initialize the CRLimitsState object to Chromium's defaults.
*/
void crStateLimitsInit (CRLimitsState *l)
{
#ifdef CR_NV_texture_rectangle
#endif
l->maxLights = CR_MAX_LIGHTS;
l->subpixelBits = CR_SUBPIXEL_BITS;
#ifdef CR_EXT_texture_lod_bias
#endif
#ifdef CR_NV_fragment_program
#endif
#ifdef CR_NV_vertex_program
#endif
#ifdef CR_ARB_fragment_program
#endif
#ifdef CR_ARB_vertex_program
#endif
/* These will get properly set in crStateCreateContext() by examining
* the visBits bitfield parameter.
*/
l->redBits = 0;
l->greenBits = 0;
l->blueBits = 0;
l->alphaBits = 0;
l->depthBits = 0;
l->stencilBits = 0;
l->accumRedBits = 0;
l->accumGreenBits = 0;
l->accumBlueBits = 0;
l->accumAlphaBits = 0;
l->auxBuffers = 0;
l->doubleBuffer = GL_FALSE;
l->sampleBuffers = 0;
l->samples = 0;
l->level = 0;
(void) crAppOnlyExtensions; /* silence warning */
}
/*
* Given the GL version number returned from a real GL renderer,
* compute the version number supported by Chromium.
*/
{
if (crVersion < minVersion)
return minVersion;
}
/*
* <extenions> is an array [n] of GLubyte pointers which contain lists of
* OpenGL extensions.
* Compute the intersection of those strings, then append the Chromium
* extension strings.
*/
{
GLuint i;
/* find intersection of all extension strings */
for (i = 0; i < n; i++)
{
if (merged)
merged = m;
}
/* append Cr extensions */
}
{
const char *s;
while (1) {
if (!s)
return GL_FALSE;
return GL_TRUE;
}
}
/*
* Examine the context's extension string and set the boolean extension
* flags accordingly. This is to be called during context initialization.
*/
{
/* init all booleans to false */
if (extensions->NV_vertex_program2)
else
#if 0
/* Now, determine what level of OpenGL we support */
if (extensions->ARB_multisample &&
if (extensions->ARB_depth_texture &&
extensions->ARB_shadow &&
if (extensions->ARB_occlusion_query &&
}
else {
}
}
else {
}
}
else {
}
#endif
}
/*
* Set the GL_EXTENSIONS string for the given context. We'll make
* a copy of the given string.
*/
void
{
}