Changeset 7562 in orxonox.OLD for branches/atmospheric_engine
- Timestamp:
- May 10, 2006, 9:52:35 AM (19 years ago)
- Location:
- branches/atmospheric_engine/src/lib/graphics
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/atmospheric_engine/src/lib/graphics/Makefile.am
r7504 r7562 22 22 effects/fog_effect.cc \ 23 23 effects/volfog_effect.cc \ 24 effects/rain_effect.cc \ 24 25 effects/lense_flare.cc 25 26 … … 44 45 effects/fog_effect.h \ 45 46 effects/volfog_effect.h \ 47 effects/rain_effect.h \ 46 48 effects/lense_flare.h 47 49 -
branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.cc
r7561 r7562 19 19 20 20 #include "glincl.h" 21 22 // ***** 23 24 #include "material.h" 25 #include "state.h" 26 #include "shell_command.h" 27 28 #include "parser/tinyxml/tinyxml.h" 29 #include <algorithm> 21 30 22 31 using namespace std; … … 91 100 } 92 101 93 void RainEffect::draw() 102 void RainEffect::draw() const 94 103 { 95 Particle* drawPart =particles;104 // Particle* drawPart = ParticleSystem::particles; 96 105 97 glDepthMask(GL_FALSE);98 glPushAttrib(GL_ENABLE_BIT);99 100 glDisable(GL_LIGHTING);101 glDisable(GL_TEXTURE_2D);102 103 glEnable(GL_LINE_SMOOTH);104 glEnable(GL_BLEND);105 glBlendFunc(GL_SRC_ALPHA, GL_DST_ALPHA);106 107 glLineWidth(2.0);108 glBegin(GL_LINES);109 while (likely(drawPart != NULL))110 {111 // printf("%f %f %f %f\n", drawPart->color[0], drawPart->color[1], drawPart->color[2], drawPart->color[3]);112 glColor4fv(drawPart->color);113 glVertex3f(drawPart->position.x, drawPart->position.y, drawPart->position.z);114 glVertex3f(drawPart->position.x - drawPart->velocity.x * drawPart->radius,115 drawPart->position.y - drawPart->velocity.y * drawPart->radius,116 drawPart->position.z - drawPart->velocity.z * drawPart->radius);117 drawPart = drawPart->next;118 }119 glEnd();120 121 glDepthMask(GL_TRUE);122 glPopAttrib();106 // glDepthMask(GL_FALSE); 107 // glPushAttrib(GL_ENABLE_BIT); 108 // 109 // glDisable(GL_LIGHTING); 110 // glDisable(GL_TEXTURE_2D); 111 // 112 // glEnable(GL_LINE_SMOOTH); 113 // glEnable(GL_BLEND); 114 // glBlendFunc(GL_SRC_ALPHA, GL_DST_ALPHA); 115 // 116 // glLineWidth(2.0); 117 // glBegin(GL_LINES); 118 // while (likely(drawPart != NULL)) 119 // { 120 // // printf("%f %f %f %f\n", drawPart->color[0], drawPart->color[1], drawPart->color[2], drawPart->color[3]); 121 // glColor4fv(drawPart->color); 122 // glVertex3f(drawPart->position.x, drawPart->position.y, drawPart->position.z); 123 // glVertex3f(drawPart->position.x - drawPart->velocity.x * drawPart->radius, 124 // drawPart->position.y - drawPart->velocity.y * drawPart->radius, 125 // drawPart->position.z - drawPart->velocity.z * drawPart->radius); 126 // drawPart = drawPart->next; 127 // } 128 // glEnd(); 129 // 130 // glDepthMask(GL_TRUE); 131 // glPopAttrib(); 123 132 } -
branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.h
r7561 r7562 6 6 #define _RAIN_EFFECT 7 7 8 //#include "vector.h"8 #include "vector.h" 9 9 #include "particle_system.h" 10 10 #include "material.h" 11 11 12 12 #include "weather_effect.h" 13 13 14 14 15 class RainEffect : public WeatherEffect
Note: See TracChangeset
for help on using the changeset viewer.