-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
34 lines (27 loc) · 1.08 KB
/
Main.java
File metadata and controls
34 lines (27 loc) · 1.08 KB
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
public class Main {
public static void main(String[] args) {
System.out.println("Hello world");
Display display = new Display(800,600,"hhh");
RenderContext target = display.GetFrameBuffer();
long previousTime = System.nanoTime();
StarField stars = new StarField(406, 64.0f, 30.0f);
vertex ymin = new vertex(50,150);
vertex ymid = new vertex(120, 100);
vertex ymax = new vertex(150, 50);
while (true) {
long currentTime = System.nanoTime();
int count=0;
// float delta = (float)((currentTime - previousTime)/1000000000.0);
//stars.UpdateAndRender(target, delta);
target.clear((byte)0x00);
previousTime=currentTime;
target.drawTriangle(ymin,ymax,ymid);
// for (int i = 100; i < 200; i++) {
// target.DrawScanBuffer(i,300-i,300+i);
//
// }
// target.fillShape(100,200);
display.swapBuffers();
}
}
}