ReactOS  0.4.15-dev-1638-gc0caa5c
registry.c File Reference
#include "gluos.h"
#include <GL/glu.h>
Include dependency graph for registry.c:

Go to the source code of this file.

Functions

const GLubyte *GLAPIENTRY gluGetString (GLenum name)
 
GLboolean GLAPIENTRY gluCheckExtension (const GLubyte *extName, const GLubyte *extString)
 

Variables

static const GLubyte versionString [] = "1.3"
 
static const GLubyte extensionString []
 

Function Documentation

◆ gluCheckExtension()

GLboolean GLAPIENTRY gluCheckExtension ( const GLubyte extName,
const GLubyte extString 
)

Definition at line 63 of file registry.c.

64 {
66  char *word;
67  char *lookHere;
68  char *deleteThis;
69 
70  if (extString == NULL) return GL_FALSE;
71 
72  deleteThis = lookHere = (char *)malloc(strlen((const char *)extString)+1);
73  if (lookHere == NULL)
74  return GL_FALSE;
75  /* strtok() will modify string, so copy it somewhere */
76  strcpy(lookHere,(const char *)extString);
77 
78  while ((word= strtok(lookHere," ")) != NULL) {
79  if (strcmp(word,(const char *)extName) == 0) {
80  flag = GL_TRUE;
81  break;
82  }
83  lookHere = NULL; /* get next token */
84  }
85  free((void *)deleteThis);
86  return flag;
87 } /* gluCheckExtension() */
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
#define GL_FALSE
Definition: gl.h:173
#define free
Definition: debug_ros.c:5
unsigned char GLboolean
Definition: gl.h:151
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean flag
Definition: glfuncs.h:52
#define GL_TRUE
Definition: gl.h:174
#define NULL
Definition: types.h:112
char * strtok(char *String, const char *Delimiters)
Definition: utclib.c:338
const WCHAR * word
Definition: lex.c:36
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
#define malloc
Definition: debug_ros.c:4

◆ gluGetString()

const GLubyte* GLAPIENTRY gluGetString ( GLenum  name)

Definition at line 44 of file registry.c.

45 {
46 
47  if (name == GLU_VERSION) {
48  return versionString;
49  } else if (name == GLU_EXTENSIONS) {
50  return extensionString;
51  }
52  return NULL;
53 }
#define GLU_EXTENSIONS
Definition: glu.h:85
static const GLubyte versionString[]
Definition: registry.c:37
#define GLU_VERSION
Definition: glu.h:84
static const GLubyte extensionString[]
Definition: registry.c:38
#define NULL
Definition: types.h:112
Definition: name.c:38

Variable Documentation

◆ extensionString

const GLubyte extensionString[]
static
Initial value:
=
"GLU_EXT_nurbs_tessellator "
"GLU_EXT_object_space_tess "

Definition at line 38 of file registry.c.

Referenced by gluGetString().

◆ versionString

const GLubyte versionString[] = "1.3"
static

Definition at line 37 of file registry.c.

Referenced by gluGetString().