Browse Source

Fix building of GLSL demos which use M_PI

Some <math.h> files do not define M_PI, in which case, provide our own definition

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
tags/mesa_7_6_1_rc1
Jon TURNEY 16 years ago
parent
commit
a15d9ca9cc
3 changed files with 9 additions and 0 deletions
  1. 3
    0
      progs/glsl/skinning.c
  2. 3
    0
      progs/glsl/texaaline.c
  3. 3
    0
      progs/glsl/twoside.c

+ 3
- 0
progs/glsl/skinning.c View File

@@ -16,6 +16,9 @@
#include <GL/glut.h>
#include "shaderutil.h"

#ifndef M_PI
#define M_PI 3.1415926535
#endif

static char *FragProgFile = "skinning.frag";
static char *VertProgFile = "skinning.vert";

+ 3
- 0
progs/glsl/texaaline.c View File

@@ -14,6 +14,9 @@
#include <GL/glew.h>
#include <GL/glut.h>

#ifndef M_PI
#define M_PI 3.1415926535
#endif

static GLint WinWidth = 300, WinHeight = 300;
static GLint win = 0;

+ 3
- 0
progs/glsl/twoside.c View File

@@ -16,6 +16,9 @@
#include <GL/glut.h>
#include "shaderutil.h"

#ifndef M_PI
#define M_PI 3.1415926535
#endif

static GLint WinWidth = 300, WinHeight = 300;
static char *FragProgFile = NULL;

Loading…
Cancel
Save