Debian Codegraph @

src/thirdparty/SiftGPU/ProgramGPU.h

raw
1 ////////////////////////////////////////////////////////////////////////////
2 // 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 [email protected]
21 //
22 ////////////////////////////////////////////////////////////////////////////
23
24
25 #ifndef _PROGRAM_GPU_H
26 #define _PROGRAM_GPU_H
27
28 ////////////////////////////////////////////////////////////////////////////
29 //class ProgramGPU
30 //description: pure virtual class
31 // provides a common interface for shader programs
32 ///////////////////////////////////////////////////////////////////////////
33 class ProgramGPU
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
43 ///////////////////////////////////////////////////////////////////////////
44 //class FilterProgram
45 ///////////////////////////////////////////////////////////////////////////
46 class FilterProgram
47 {
48 public:
49 ProgramGPU* s_shader_h;
50 ProgramGPU* s_shader_v;
51 int _size;
52 int _id;
53 public:
54 FilterProgram() { s_shader_h = s_shader_v = NULL; _size = _id = 0; }
55 virtual ~FilterProgram() { if(s_shader_h) delete s_shader_h; if(s_shader_v) delete s_shader_v;}
56 };
57
58 #endif
59