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

Last change on this file since 2798 was 2798, checked in by ldelgass, 12 years ago

Add emacs mode magic line in preparation for indentation cleanup

  • Property svn:eol-style set to native
File size: 1.1 KB
Line 
1/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2#include "Nv.h"
3#include "NvShader.h"
4#include "NvParticleRenderer.h"
5#include "NvColorTableRenderer.h"
6#include "NvEventLog.h"
7#include "VolumeRenderer.h"
8#include <R2/R2FilePath.h>
9#include <stdio.h>
10#include <stdlib.h>
11#include <assert.h>
12#include <BMPImageLoaderImpl.h>
13#include <ImageLoaderFactory.h>
14#include "PointSetRenderer.h"
15
16extern void NvInitCG(); // in NvShader.cpp
17
18void NvCgErrorCallback(void)
19{
20    CGerror lastError = cgGetError();
21
22    if(lastError) {
23        const char *listing = cgGetLastListing(g_context);
24        ERROR("\n---------------------------------------------------\n");
25        ERROR("%s\n\n", cgGetErrorString(lastError));
26        ERROR("%s\n", listing);
27        ERROR("-----------------------------------------------------\n");
28        ERROR("Cg error, exiting...\n");
29        cgDestroyContext(g_context);
30        exit(-1);
31    }
32}
33
34void NvInit(char* path)
35{
36    TRACE("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.