- Voila une partie du code
-
- /*
- Tazi Mehdi Xarier [ Particles Engine ]
- */
-
- #include <math.h>
- #include <windows.h> // Windows
- #include <stdio.h>
- #include <gl\gl.h> // OpenGL32 Library
- #include <gl\glaux.h> // Glaux Library
-
- LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); //WndProc
- #define MAX_PARTICLES 3000 // Nombres de particles
-
-
- typedef struct //Structure des Particles
- {
- float life; // vie Particle
- float fade; // Fade
- float x; // Position X
- float y; // Position Y
- float z; // Position Z
- float xi; // Direction X
- float yi; // Direction Y
- float zi; // Direction Z
- float r; // Couleur Rouge
- float g; // Couleur Verte
- float b; // Couleur Blue
- }particles; // Structure Particles
-
- static GLfloat colors[16][3]= // Colors
- {
- {1.0f,0.5f,0.5f},{1.0f,0.75f,0.5f},{1.0f,1.0f,0.5f},{0.75f,1.0f,0.5f},
- {0.5f,1.0f,0.5f},{0.5f,1.0f,0.75f},{0.5f,1.0f,1.0f},{0.5f,0.75f,1.0f},
- {0.5f,0.5f,1.0f},{0.75f,0.5f,1.0f},{1.0f,0.5f,1.0f},{1.0f,0.5f,0.75f},
- {1.0f,1.0f,1.0f},{0.25f,0.5f,0.5f},{0.0f,0.5f,1.0f},{0.0f,0.67f,1.0f}
- };
-
- GLvoid DrawParticles(float X,float Y,float Z,float minlife,float slowdownx,float slowowny,float slowdownz);
- GLvoid DrawParticles1(float X,float Y,float Z,float minlife,float slowdownx,float slowowny,float slowdownz,float xx,float yy);
- GLvoid DrawParticles2(float X,float Y,float Z,float minlife,float slowdownx,float slowowny,float slowdownz,float xx,float yy);
-
-
-
-
-
-
-
Voila une partie du code
/*
Tazi Mehdi Xarier [ Particles Engine ]
*/
#include <math.h>
#include <windows.h> // Windows
#include <stdio.h>
#include <gl\gl.h> // OpenGL32 Library
#include <gl\glaux.h> // Glaux Library
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); //WndProc
#define MAX_PARTICLES 3000 // Nombres de particles
typedef struct //Structure des Particles
{
float life; // vie Particle
float fade; // Fade
float x; // Position X
float y; // Position Y
float z; // Position Z
float xi; // Direction X
float yi; // Direction Y
float zi; // Direction Z
float r; // Couleur Rouge
float g; // Couleur Verte
float b; // Couleur Blue
}particles; // Structure Particles
static GLfloat colors[16][3]= // Colors
{
{1.0f,0.5f,0.5f},{1.0f,0.75f,0.5f},{1.0f,1.0f,0.5f},{0.75f,1.0f,0.5f},
{0.5f,1.0f,0.5f},{0.5f,1.0f,0.75f},{0.5f,1.0f,1.0f},{0.5f,0.75f,1.0f},
{0.5f,0.5f,1.0f},{0.75f,0.5f,1.0f},{1.0f,0.5f,1.0f},{1.0f,0.5f,0.75f},
{1.0f,1.0f,1.0f},{0.25f,0.5f,0.5f},{0.0f,0.5f,1.0f},{0.0f,0.67f,1.0f}
};
GLvoid DrawParticles(float X,float Y,float Z,float minlife,float slowdownx,float slowowny,float slowdownz);
GLvoid DrawParticles1(float X,float Y,float Z,float minlife,float slowdownx,float slowowny,float slowdownz,float xx,float yy);
GLvoid DrawParticles2(float X,float Y,float Z,float minlife,float slowdownx,float slowowny,float slowdownz,float xx,float yy);