Changeset 6467 in orxonox.OLD for trunk/src/world_entities
- Timestamp:
- Jan 11, 2006, 11:46:52 AM (19 years ago)
- Location:
- trunk/src/world_entities/environments
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/environments/water.cc
r6458 r6467 23 23 #include "material.h" 24 24 25 #include "resource_manager.h" 26 #include "shader.h" 27 28 25 29 using namespace std; 26 30 … … 43 47 this->rebuildGrid(); 44 48 this->waterMaterial = new Material(); 49 this->waterShader = (Shader*)ResourceManager::getInstance()->load("shaders/water.vert", SHADER, RP_GAME, (void*)"shaders/water.frag"); 50 45 51 } 46 52 … … 97 103 void Water::draw() const 98 104 { 99 this->waterMaterial->select(); 105 this->waterShader->activateShader(); 106 // this->waterMaterial->select(); 100 107 WorldEntity::draw(); 108 Shader::deactivateShader(); 101 109 } 102 110 … … 109 117 { 110 118 this->grid->height(i,j) = this->height*sin(((float)i/(float)this->grid->rows() *phase)+ 111 this->height*cos((float)j/(float)this->grid->columns()) * phase );119 this->height*cos((float)j/(float)this->grid->columns()) * phase * 2.0); 112 120 } 113 121 } -
trunk/src/world_entities/environments/water.h
r6458 r6467 16 16 class Material; 17 17 class Grid; 18 class Shader; 18 19 19 20 //! A Class to handle a WaterEffects … … 37 38 Grid* grid; //!< The water-surface-model to render with 38 39 Material* waterMaterial; 40 Shader* waterShader; 39 41 float height; //!< The hight of the Water 40 42
Note: See TracChangeset
for help on using the changeset viewer.