source: trunk/packages/vizservers/nanovis/Nv.cpp @ 2096

Last change on this file since 2096 was 2096, checked in by ldelgass, 13 years ago

Normalize line endings, set eol-style to native on *.cpp, *.h files

  • Property svn:eol-style set to native
File size: 1.0 KB
Line 
1#include "Nv.h"
2#include "NvShader.h"
3#include "NvParticleRenderer.h"
4#include "NvColorTableRenderer.h"
5#include "NvEventLog.h"
6#include "VolumeRenderer.h"
7#include <R2/R2FilePath.h>
8#include <stdio.h>
9#include <stdlib.h>
10#include <assert.h>
11#include <BMPImageLoaderImpl.h>
12#include <ImageLoaderFactory.h>
13#include "PointSetRenderer.h"
14
15extern void NvInitCG(); // in NvShader.cpp
16
17void NvCgErrorCallback(void)
18{
19    CGerror lastError = cgGetError();
20
21    if(lastError) {
22        const char *listing = cgGetLastListing(g_context);
23        printf("\n---------------------------------------------------\n");
24        printf("%s\n\n", cgGetErrorString(lastError));
25        printf("%s\n", listing);
26        printf("-----------------------------------------------------\n");
27        printf("Cg error, exiting...\n");
28        cgDestroyContext(g_context);
29        fflush(stdout);
30        exit(-1);
31    }
32}
33
34void NvInit(char* path)
35{
36    printf("Nanovis GL Initialized\n");
37}
38
39void NvExit()
40{
41#ifdef EVENTLOG
42    NvExitEventLog();
43#endif
44
45#ifdef XINETD
46    NvExitService();
47#endif
48
49}
50
Note: See TracBrowser for help on using the repository browser.