-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbasic_gl.sg
More file actions
35 lines (28 loc) · 746 Bytes
/
basic_gl.sg
File metadata and controls
35 lines (28 loc) · 746 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
//-------------------------------------------------------------------
//
// SG: Summer Graphic ( GL / DirectX / HTML Canvas ):
//
// Simple OpenGL Example ...
//
// TO SUMMER VERSION: 0.71.0
//
// BY: Francisco - gokernel@hotmail.com
//
//-------------------------------------------------------------------
//
function draw () {
// sgBeginScene();
sgSet2D(); // set 2D projection mode using OpenGL.
glColor3ub(255,130,30); // color orange
// Draw a Rectangle:
glBegin(2); // #define GL_LINE_LOOP 2
glVertex2f(100.0, 100.0);
glVertex2f(100.0, 500.0);
glVertex2f(700.0, 500.0);
glVertex2f(700.0, 100.0);
glEnd();
sgEndScene();
}
sgInit();
draw();
sgRun();