File: Triangle.cs

package info (click to toggle)
gtkglarea-sharp 0.0.17-3
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,144 kB
  • ctags: 492
  • sloc: sh: 3,376; cs: 2,633; makefile: 421; xml: 126
file content (18 lines) | stat: -rw-r--r-- 470 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

namespace GtkGL {
    using System;
    
    using gl=Tao.OpenGl.Gl;
    
    public class Triangle : GtkGL.GLObjectBase,GtkGL.IGLObject{

		protected override void DrawObject()
		{
			gl.glBegin(gl.GL_TRIANGLES);					// Drawing Using Triangles
				gl.glVertex3f( 0.0f, 1.0f, 0.0f);			// Top
				gl.glVertex3f(-1.0f,-1.0f, 0.0f);			// Bottom Left
				gl.glVertex3f( 1.0f,-1.0f, 0.0f);			// Bottom Right
			gl.glEnd();										// Finished Drawing The Triangle
		}
	}
}