Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

kernel.h

00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /***************************************************************************
00003  *            kernel.h
00004  *
00005  *  Sun Dec 19 12:47:58 CET 2004
00006  *  Copyright  2004  Jesper Fruergaard and Bent Bisballe
00007  *  {deva,jesper}@daimi.au.dk
00008  ****************************************************************************/
00009 
00010 /*
00011  *  This program is free software; you can redistribute it and/or modify
00012  *  it under the terms of the GNU General Public License as published by
00013  *  the Free Software Foundation; either version 2 of the License, or
00014  *  (at your option) any later version.
00015  *
00016  *  This program is distributed in the hope that it will be useful,
00017  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  *  GNU Library General Public License for more details.
00020  *
00021  *  You should have received a copy of the GNU General Public License
00022  *  along with this program; if not, write to the Free Software
00023  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00024  */
00025 
00026 #ifndef __LIBGPU_KERNEL_H__
00027 #define __LIBGPU_KERNEL_H__
00028 
00029 #include "cgstuff.h"
00030 
00031 #include "gpu.h"
00032 class Gpu;
00033 
00034 #include "texture.h"
00035 class Texture;
00036 
00037 #include "parameter.h"
00038 class Parameter;
00039 
00040 #include "vertexprogram.h"
00041 class VertexProgram;
00042 
00043 #include "fragmentprogram.h"
00044 class FragmentProgram;
00045 
00046 
00049 class Kernel {
00050 friend class Texture;
00051 public:
00057   Kernel(FragmentProgram *fragment, VertexProgram *vertex = NULL);
00058   ~Kernel();
00059   
00063   void setOutput(Texture* out);
00064 
00067   void run();
00068 
00069 private:
00070   bool setup;
00071 
00072   FragmentProgram *fp;
00073   VertexProgram *vp;
00074 
00075   //  void run(bool grab);
00076   void run(int width, int height);
00077 
00078   bool coord01;
00079 
00080   int numParams;
00081   Parameter** params;
00082 
00083   char *prgstr;
00084   Gpu* gpu;
00085 
00086   // CG stuff
00087   //  CGprogram id;
00088 
00089   Texture* output;
00090 };
00091 
00092 #endif/*__LIBGPU_KERNEL_H__*/

Generated on Sun Jan 9 19:22:05 2005 for libGPGPU by doxygen 1.3.6