-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlgraph.h
More file actions
35 lines (31 loc) · 751 Bytes
/
lgraph.h
File metadata and controls
35 lines (31 loc) · 751 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include <GL/glew.h>
#include <glm/glm.hpp>
#define X_LOC 0
#define Y_LOC 1
class LGraph
{
static int ref_count;
static GLuint programObject;
static GLint colorLocation;
static GLint projectionLocation;
GLuint xVBO;
GLuint yVBO;
GLuint VAO;
int Nvertices;
glm::vec4 color0;
glm::vec4 color1;
float lineWidth0;
float lineWidth1;
float ytop;
float ybottom;
void ProgramLoad(void);
void ProgramDestroy(void);
public:
LGraph(int Nvertices);
~LGraph(void);
void SetColors(glm::vec4 &color0, glm::vec4 &color1);
void SetLineWidths(float lineWidth0, float lineWidth1);
void SetLimits(float ytop, float ybottom);
void SetX(float *x);
void Draw(float *y);
};