File: gli.h

package info (click to toggle)
nvidia-cg-toolkit 3.1.0013-5
  • links: PTS, VCS
  • area: non-free
  • in suites: bookworm, bullseye, buster, forky, sid, trixie
  • size: 187,516 kB
  • sloc: ansic: 510,168; cpp: 34,693; makefile: 745
file content (44 lines) | stat: -rw-r--r-- 844 bytes parent folder | download | duplicates (6)
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
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef __gli_h__
#define __gli_h__

/* gli.h - OpenGL image (GLI) file loader */

/* Copyright NVIDIA Corporation, 1999. */

/* A lightweight generic image file loader for OpenGL programs. */

#include <stdio.h>

#include <GL/glew.h>

#ifdef  __cplusplus
extern "C" {
#endif

typedef struct {

  GLsizei  width;
  GLsizei  height;
  GLint    components;
  GLenum   type;
  GLenum   format;
  GLenum   internalFormat;

  GLsizei  cmapEntries;
  GLenum   cmapFormat;
  GLubyte *cmap;

  GLubyte *pixels;
  
} gliGenericImage;

extern gliGenericImage *gliReadTGA(FILE *fp, const char *name, int yFlip);
extern void gliFree(gliGenericImage *image);
extern gliGenericImage *gliScaleImage(gliGenericImage *image, int nw, int nh);
extern void gliConvertImageToCoreFormat(gliGenericImage *image);

#ifdef  __cplusplus
}
#endif

#endif /* __gli_h__ */