0% found this document useful (0 votes)
21 views2 pages

Untitled Document 1

The document contains shader source code for geometry, fragment, vertex, and texture shaders. It also contains code defining mesh data structures and color arrays.

Uploaded by

gdfbdfgfgfdgdf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views2 pages

Untitled Document 1

The document contains shader source code for geometry, fragment, vertex, and texture shaders. It also contains code defining mesh data structures and color arrays.

Uploaded by

gdfbdfgfgfdgdf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

const char *geometryShaderSource = "#version 150\n"

"layout (points) in;\n"


"layout (line_strip, max_vertices = 2) out;\n"
"uniform mat4 transform;\n"
"uniform float unimax;\n"
"uniform int unistr;\n"
"uniform int unilenz;\n"
"uniform float uniws;\n"
"uniform int unic;\n"
"uniform int uniccc;\n"
"uniform float uniwac;\n"
"uniform int uniglow;\n"
"uniform int uniJJ;\n"
"int iid;\n"
"float ee;\n"
"void main()\n"
"{\n"
"iid=gl_PrimitiveIDIn+uniJJ;\n"
"ee = (gl_in[0].gl_Position.x*(uniws/8)/unimax)/(1+uniglow);\n"
"gl_Position = transform*vec4(-uniws/2+(uniws*(unic*iid+uniccc))/(unilenz-
unistr-1),uniwac,0.0,1.0);\n"
"EmitVertex();\n"
"gl_Position = transform*vec4(-uniws/2+(uniws*(unic*iid+uniccc))/(unilenz-
unistr-1),ee+uniwac,0.0,1.0);\n"
"EmitVertex();\n"
"EndPrimitive();\n"
"}\n\0";

const char *fragmentShaderSource = "#version 150\n"


"in vec4 fcolour;\n"
"out vec4 fragColour;\n"
"void main()\n"
"{\n"
"fragColour = vec4(1.0,1.0,0.7,1.0);\n"
"}\n\0";

const char *vertexShaderSourceshape = "#version 150\n"


"in vec2 vPosition;\n"
"uniform mat4 transform;\n"
"void main()\n"
"{\n"
"gl_Position = transform*vec4(vPosition.x,vPosition.y,0.0,1.0);\n"
"}\n\0";

const char *fragmentShaderSourceshape = "#version 150\n"


"out vec4 fragColour;\n"
"uniform vec4 unicolour;\n"
"void main()\n"
"{\n"
"fragColour = unicolour;\n"
"}\n\0";

const char *vertexShaderSourcetexv = "#version 330 core\n"


"layout (location = 0) in vec4 vPosition;\n"
"out vec2 TexCoords;\n"
"uniform mat4 transform;\n"
"void main()\n"
"{\n"
"gl_Position = transform * vec4(vPosition.xy, 0.0, 1.0);\n"
"TexCoords = vPosition.zw;\n"
"}\n\0";

const char *fragmentShaderSourcetexv = "#version 330 core\n"


"in vec2 TexCoords;\n"
"out vec4 color;\n"
"uniform sampler2D text;\n"
"uniform vec4 unitextcolour;\n"
"void main()\n"
"{\n"
"vec4 sampled = vec4(1.0, 1.0, 1.0, texture2D(text, TexCoords).r);\n"
"color = unitextcolour * sampled;\n"
"}\n\0";

//endvibb*/

int qe=0;
int ju = -1;
int meshj = 7;
int meshi[10000][2][2]; // 1 2 4 7
float mesh[10000][4][2];
int meshcount[2];
float ooxx=0;
float ooyy=0;
GLfloat hues[][3] = {
1.0f, 1.8f, 0.7f, //yellow 0
0.0f, 1.0f, 0.0f, //green 1
0.0f, 0.0f, 1.0f, //blue 2
1.0f, 0.0f, 0.0f, //red 3
1.0f, 1.0f, 1.0f, //white 4
0.5f, 0.2f, 0.8f, //pink 5
0.0f, 0.0f, 0.0f, //black 6
0.5f, 0.81f,0.95f, //light blue - background 7
1.0f, 0.95f,0.86f, //redorange functions 8
0.8f, 0.9f, 0.99f, //purple marktext 9
0.65f,0.75f,1.0, //dark purple 10
1.0f, 0.9f, 0.0f

You might also like