TORCS  1.3.10
The Open Racing Car Simulator
Loading...
Searching...
No Matches
grutil.h File Reference
#include <stdio.h>
#include "grtexture.h"
Include dependency graph for grutil.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define TRACE_GL(msg)
#define DBG_SET_NAME(base, name, index, subindex)

Functions

int grGetFilename (const char *filename, char *filepath, char *buf, const int BUFSIZE)
ssgState * grSsgEnvTexState (const char *img)
ssgState * grSsgLoadTexState (const char *img)
ssgState * grSsgLoadTexStateEx (const char *img, char *filepath, int wrap, int mipmap)
bool grLoadPngTexture (const char *fname, ssgTextureInfo *info)
void grShutdownState (void)
void grWriteTime (float *color, int font, int x, int y, tdble sec, int sgn)
float grGetHOT (float x, float y)
void grRemoveState (char *img)

Variables

float grGammaValue
int grMipMap
char * grFilePath
char * grTexturePath

Macro Definition Documentation

◆ DBG_SET_NAME

#define DBG_SET_NAME ( base,
name,
index,
subindex )
Value:
{ \
char __buf__[256]; \
if (subindex != -1) { \
sprintf(__buf__, "%s-%d-%d", name, index, subindex); \
} else { \
sprintf(__buf__, "%s-%d", name, index); \
} \
(base)->setName((const char *)__buf__); \
}

Definition at line 34 of file grutil.h.

◆ TRACE_GL

#define TRACE_GL ( msg)
Value:
{ GLenum rc; if ((rc = glGetError()) != GL_NO_ERROR) printf("%s %s\n", msg, gluErrorString(rc)); }

Definition at line 28 of file grutil.h.

Function Documentation

◆ grGetFilename()

int grGetFilename ( const char * filename,
char * filepath,
char * buf,
const int BUFSIZE )
extern

Definition at line 46 of file grutil.cpp.

◆ grGetHOT()

float grGetHOT ( float x,
float y )
extern

Definition at line 354 of file grutil.cpp.

◆ grLoadPngTexture()

bool grLoadPngTexture ( const char * fname,
ssgTextureInfo * info )
extern

Definition at line 91 of file grutil.cpp.

Here is the call graph for this function:

◆ grRemoveState()

void grRemoveState ( char * img)

Definition at line 156 of file grutil.cpp.

◆ grShutdownState()

void grShutdownState ( void )
extern

Definition at line 182 of file grutil.cpp.

◆ grSsgEnvTexState()

ssgState * grSsgEnvTexState ( const char * img)

Definition at line 251 of file grutil.cpp.

Here is the call graph for this function:

◆ grSsgLoadTexState()

ssgState * grSsgLoadTexState ( const char * img)
extern

Definition at line 219 of file grutil.cpp.

Here is the call graph for this function:

◆ grSsgLoadTexStateEx()

ssgState * grSsgLoadTexStateEx ( const char * img,
char * filepath,
int wrap,
int mipmap )
extern

Definition at line 284 of file grutil.cpp.

Here is the call graph for this function:

◆ grWriteTime()

void grWriteTime ( float * color,
int font,
int x,
int y,
tdble sec,
int sgn )
extern

Definition at line 317 of file grutil.cpp.

Here is the call graph for this function:

Variable Documentation

◆ grFilePath

char* grFilePath
extern

Definition at line 42 of file grutil.cpp.

◆ grGammaValue

float grGammaValue
extern

Definition at line 39 of file grutil.cpp.

◆ grMipMap

int grMipMap
extern

Definition at line 40 of file grutil.cpp.

◆ grTexturePath

char* grTexturePath
extern

Definition at line 43 of file grutil.cpp.