Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5261 in orxonox.OLD for trunk/src/lib/graphics/shader.cc


Ignore:
Timestamp:
Sep 26, 2005, 10:34:21 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: structure of the Shader-lib

File:
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/shader.cc

    r5260 r5261  
    1010
    1111   ### File Specific:
    12    main-programmer: ...
     12   main-programmer: Benjamin Grauer
    1313   co-programmer: ...
    1414*/
     
    1616//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_
    1717
    18 #include "proto_class.h"
     18#include "shader.h"
    1919
    2020using namespace std;
     
    2323/**
    2424 * standard constructor
    25  * @todo this constructor is not jet implemented - do it
    2625*/
    27 ProtoClass::ProtoClass ()
     26Shader::Shader (SHADER_TYPE type, ...)
    2827{
    29    this->setClassID(CL_PROTO_ID, "ProtoClass");
     28   this->setClassID(CL_SHADER, "Shader");
    3029
    31    /* If you make a new class, what is most probably the case when you write this file
    32       don't forget to:
    33        1. Add the new file new_class.cc to the ./src/Makefile.am
    34        2. Add the class identifier to ./src/class_id.h eg. CL_NEW_CLASS
    35 
    36       Advanced Topics:
    37       - if you want to let your object be managed via the ObjectManager make sure to read
    38         the object_manager.h header comments. You will use this most certanly only if you
    39         make many objects of your class, like a weapon bullet.
    40    */
     30   this->fragmentShaderFile = NULL;
     31   this->vertexShaderFile = NULL;
     32   this->fragmentShaderSource = NULL;
     33   this->vertexShaderSource = NULL;
     34   this->shaderProgram = 0;
     35   this->vertexShader = 0;
     36   this->fragmentShader = 0;
    4137}
    4238
     
    4541 * standard deconstructor
    4642*/
    47 ProtoClass::~ProtoClass ()
     43Shader::~Shader ()
    4844{
    4945  // delete what has to be deleted here
     46  delete[] this->fragmentShaderFile;
     47  delete[] this->vertexShaderFile;
     48  delete[] this->fragmentShaderSource;
     49  delete[] this->vertexShaderSource;
     50
     51  // DELETE THE PROGRAMS
     52/*  this->shaderProgram = 0;
     53  this->vertexShader = 0;
     54  this->fragmentShader = 0;*/
    5055}
     56
     57
     58bool Shader::loadShaderProgramm(SHADER_TYPE type, const char* fileName)
     59{
     60  if (type != SHADER_VERTEX || type != SHADER_FRAGMENT)
     61    return false;
     62
     63
     64}
     65
     66bool Shader::activateShader()
     67{
     68
     69}
Note: See TracChangeset for help on using the changeset viewer.