source: trunk/packages/vizservers/nanovis/define.h @ 1028

Last change on this file since 1028 was 434, checked in by mmc, 18 years ago

Added separate controls for outline enable/disable/color, and volume
data enable/disable.

File size: 2.3 KB
Line 
1/*
2 * ----------------------------------------------------------------------
3 * Nanovis: Visualization of Nanoelectronics Data
4 *
5 * ======================================================================
6 *  AUTHOR:  Wei Qiao <qiaow@purdue.edu>
7 *           Purdue Rendering and Perceptualization Lab (PURPL)
8 *
9 *  Copyright (c) 2004-2006  Purdue Research Foundation
10 *
11 *  See the file "license.terms" for information on usage and
12 *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
13 * ======================================================================
14 */
15
16
17//The NanoVis system wide defines
18//Here we try to hide OpenGL native definitions as much as possible
19
20
21#ifndef _DEFINE_H_
22#define _DEFINE_H_
23
24#include <GL/glew.h>
25#include <Cg/cgGL.h>
26
27#define NVIS_FLOAT GL_FLOAT
28#define NVIS_UNSIGNED_INT GL_UNSIGNED_INT
29#define NVIS_UNSIGNED_BYTE GL_UNSIGNED_BYTE
30
31#define NVIS_LINEAR_INTERP GL_LINEAR
32#define NVIS_NEAREST_INTERP GL_NEAREST
33
34typedef GLuint NVISdatatype;            //OpenGL datatype: unsigned int
35typedef GLuint NVISinterptype;          //OpenGL interpolation type: unsigned int
36typedef GLuint NVISid;                  //OpenGL identifier: unsigned int
37
38
39#define CHECK_FRAMEBUFFER_STATUS()                            \
40  {                                                           \
41    GLenum status;                                            \
42    status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT); \
43    switch(status) {                                          \
44      case GL_FRAMEBUFFER_COMPLETE_EXT:                       \
45        break;                                                \
46      case GL_FRAMEBUFFER_UNSUPPORTED_EXT:                    \
47        /* choose different formats */                        \
48        break;                                                \
49      default:                                                \
50        /* programming error; will fail on all hardware */    \
51        fprintf(stderr, "programming error\n");               \
52        assert(0);                                            \
53     }                                                        \
54   }
55
56// use this to send debug messages back to the client
57void debug(char *message);
58void debug(char *message, double v1);
59void debug(char *message, double v1, double v2);
60void debug(char *message, double v1, double v2, double v3);
61
62#endif
Note: See TracBrowser for help on using the repository browser.