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

program.h

00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /***************************************************************************
00003  *            program.h
00004  *
00005  *  Fri Jan  7 12:02:49 CET 2005
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_SRC_H__
00027 #define __LIBGPU_SRC_H__
00028 
00029 #include "glstuff.h"
00030 #include "cgstuff.h"
00031 
00032 #include "gpu.h"
00033 
00034 #include "parameter.h"
00035 class Parameter;
00036 
00037 #include <string>
00038 #include <iostream>
00039 #include <fstream>
00040 
00041 typedef enum {
00042   FRAGMENT_PROGRAM,
00043   VERTEX_PROGRAM
00044 } programType;
00045 
00048 class Program {
00049 friend class Kernel;
00050 friend class FragmentProgram;
00051 friend class VertexProgram;
00052 public:
00057   Parameter* getParam(char* name);
00058 
00059 private:
00060   Program(programType type, char* prgstr);
00061   Program(programType type, char* file, char* function);
00062   ~Program();
00063 
00064   void activate();
00065 
00066   void addMacros();
00067   void createProgram();
00068   void initParams();
00069 
00070   CGprofile profile;
00071   CGprogram id;
00072 
00073   std::string *src;
00074   std::string *main;
00075 
00076   Gpu *gpu;
00077 
00078   unsigned int numParams;
00079   Parameter** params;
00080 };
00081 
00082 #endif/*__LIBGPU_SRC_H__*/

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