Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7562 in orxonox.OLD for branches/atmospheric_engine/src/lib


Ignore:
Timestamp:
May 10, 2006, 9:52:35 AM (19 years ago)
Author:
amaechler
Message:

branches/atmosphere_engine:

Location:
branches/atmospheric_engine/src/lib/graphics
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/atmospheric_engine/src/lib/graphics/Makefile.am

    r7504 r7562  
    2222                           effects/fog_effect.cc \
    2323                           effects/volfog_effect.cc \
     24                           effects/rain_effect.cc \
    2425                           effects/lense_flare.cc
    2526
     
    4445                 effects/fog_effect.h \
    4546                 effects/volfog_effect.h \
     47                 effects/rain_effect.h \
    4648                 effects/lense_flare.h
    4749
  • branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.cc

    r7561 r7562  
    1919
    2020#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>
    2130
    2231using namespace std;
     
    91100}
    92101
    93 void RainEffect::draw()
     102void RainEffect::draw() const
    94103{
    95   Particle* drawPart = particles;
     104//  Particle* drawPart = ParticleSystem::particles;
    96105
    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();
    123132}
  • branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.h

    r7561 r7562  
    66#define _RAIN_EFFECT
    77
    8 // #include "vector.h"
     8#include "vector.h"
    99#include "particle_system.h"
    1010#include "material.h"
    1111
    1212#include "weather_effect.h"
     13
    1314
    1415class RainEffect : public WeatherEffect
Note: See TracChangeset for help on using the changeset viewer.