ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ProgramGPU.h
Go to the documentation of this file.
1 // File: ProgramGPU.h
3 // Author: Changchang Wu
4 // Description : Based class for GPU programs
5 // ProgramGPU: base class of ProgramGLSL
6 // FilterProgram: base class of FilterGLSL, FilterPKSL
7 //
8 // Copyright (c) 2007 University of North Carolina at Chapel Hill
9 // All Rights Reserved
10 //
11 // Permission to use, copy, modify and distribute this software and its
12 // documentation for educational, research and non-profit purposes, without
13 // fee, and without a written agreement is hereby granted, provided that the
14 // above copyright notice and the following paragraph appear in all copies.
15 //
16 // The University of North Carolina at Chapel Hill make no representations
17 // about the suitability of this software for any purpose. It is provided
18 // 'as is' without express or implied warranty.
19 //
20 // Please send BUG REPORTS to ccwu@cs.unc.edu
21 //
23 
24 
25 #ifndef _PROGRAM_GPU_H
26 #define _PROGRAM_GPU_H
27 
29 //class ProgramGPU
30 //description: pure virtual class
31 // provides a common interface for shader programs
34 {
35 public:
36  //use a gpu program
37  virtual int UseProgram() = 0;
38  virtual void* GetProgramID() = 0;
39  //not used
40  virtual ~ProgramGPU(){};
41 };
42 
44 //class FilterProgram
47 {
48 public:
51  int _size;
52  int _id;
53 public:
55  virtual ~FilterProgram() { if(s_shader_h) delete s_shader_h; if(s_shader_v) delete s_shader_v;}
56 };
57 
58 #endif
59 
#define NULL
ProgramGPU * s_shader_h
Definition: ProgramGPU.h:49
ProgramGPU * s_shader_v
Definition: ProgramGPU.h:50
virtual ~FilterProgram()
Definition: ProgramGPU.h:55
virtual void * GetProgramID()=0
virtual ~ProgramGPU()
Definition: ProgramGPU.h:40
virtual int UseProgram()=0