aboutsummaryrefslogtreecommitdiff
path: root/Gem/examples/10.glsl/tri2fan.geom
diff options
context:
space:
mode:
authorTravis CI <zmoelnig@travis-ci.umlaeute.mur.at>2015-03-17 22:38:45 +0000
committerTravis CI <zmoelnig@travis-ci.umlaeute.mur.at>2015-03-17 22:38:45 +0000
commit356f94fc355f36c16e48555d10c2377dff4b7554 (patch)
tree4b825dc642cb6eb9a060e54bf8d69288fbee4904 /Gem/examples/10.glsl/tri2fan.geom
parent5c694f159b012d1d94bf15bfe580dec52e4fe797 (diff)
Gem 096ed6ef786b7a9d6e11a437ff8526619c89a1fd osx/x86_64
built 'coverity_scan:096ed6ef786b7a9d6e11a437ff8526619c89a1fd' for osx/x86_64
Diffstat (limited to 'Gem/examples/10.glsl/tri2fan.geom')
-rw-r--r--Gem/examples/10.glsl/tri2fan.geom51
1 files changed, 0 insertions, 51 deletions
diff --git a/Gem/examples/10.glsl/tri2fan.geom b/Gem/examples/10.glsl/tri2fan.geom
deleted file mode 100644
index 45961e2..0000000
--- a/Gem/examples/10.glsl/tri2fan.geom
+++ /dev/null
@@ -1,51 +0,0 @@
-// Cyrille Henry 2010
-
-#version 120
-#extension GL_EXT_geometry_shader4 : enable
-
-void main(void)
-{
-
- int i; //increment variable
- vec4 pos1,pos2, pos3, pos4, pos5; // tmp
- vec3 high;
-
- for(i=0; i< gl_VerticesIn; i += 3){ // for all triangles
- pos1 = gl_PositionIn[i];
- pos2 = gl_PositionIn[i+1];
- pos3 = gl_PositionIn[i+2];
- pos4 = (pos1 + pos2 + pos3) / 3.; // center of the triangle
-
- high = 10.*cross(pos2.xyz-pos1.xyz,pos3.xyz-pos2.xyz);
- // hight and orientation of the piramide
-
- high = normalize(high);
- high *= length(pos2-pos1);
- pos5 = pos4 ;
- pos5.xyz += high;
-
- gl_Position = gl_ModelViewProjectionMatrix * pos1;
- EmitVertex();
- gl_Position = gl_ModelViewProjectionMatrix * pos4;
- EmitVertex();
- gl_Position = gl_ModelViewProjectionMatrix * pos5;
- EmitVertex();
- gl_Position = gl_ModelViewProjectionMatrix * pos2;
- EmitVertex();
- gl_Position = gl_ModelViewProjectionMatrix * pos4;
- EmitVertex();
- gl_Position = gl_ModelViewProjectionMatrix * pos5;
- EmitVertex();
- gl_Position = gl_ModelViewProjectionMatrix * pos3;
- EmitVertex();
- gl_Position = gl_ModelViewProjectionMatrix * pos4;
- EmitVertex();
- gl_Position = gl_ModelViewProjectionMatrix * pos5;
- EmitVertex();
-
- EndPrimitive();
- // new primitive
- }
-
-}
-