File: shadow.c

package info (click to toggle)
viewmol 2.4.1-13
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 7,212 kB
  • ctags: 2,054
  • sloc: ansic: 30,727; python: 1,849; sh: 921; awk: 433; makefile: 205
file content (32 lines) | stat: -rw-r--r-- 1,405 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*******************************************************************************
*                                                                              *
*                                   Viewmol                                    *
*                                                                              *
*                               S H A D O W . C                                *
*                                                                              *
*                 Copyright (c) Joerg-R. Hill, October 2003                    *
*                                                                              *
********************************************************************************
*
* $Id: shadow.c,v 1.1 2003/11/07 11:16:08 jrh Exp $
* $Log: shadow.c,v $
* Revision 1.1  2003/11/07 11:16:08  jrh
* Initial revision
*
*/

#include<GL/gl.h>
#include "viewmol.h"

int findShadowMapSupport(void)
{
  const GLubyte *extensions=NULL;
  int hasTextureEnvCombine=FALSE, hasNVRegisterCombiners=FALSE;

  extensions=glGetString(GL_EXTENSIONS);
  if (strstr((char *)extensions, "GL_EXT_texture_env_combine")) hasTextureEnvCombine=TRUE;
  if (strstr((char *)extensions, "GL_NV_register_combiners")) hasNVRegisterCombiners=TRUE;
  if (hasTextureEnvCombine || hasNVRegisterCombiners) return(TRUE);
  else                                                return(FALSE);

}