Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

branches/atmosphere_engine:

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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}
Note: See TracChangeset for help on using the changeset viewer.