Skip to content

Commit 4a61040

Browse files
committed
Added 15 version 1, modified 13
1 parent 4b6aa70 commit 4a61040

File tree

12 files changed

+162
-59
lines changed

12 files changed

+162
-59
lines changed

examples/13_cmake_compilation/config/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
// *************** TEST CASES *****************
1717
{
18-
"title" : "Run cube program hw4",
18+
"title" : "Test Output",
1919
"command" : "./a.out",
2020
"points" : 6,
2121
"validation" :
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
Hello world. This was compiled using cmake.
22
Hello! I am a simple object which was created using a .h and .cpp.
3-
These were included in the cmakelists.txt file. My name is Jan
3+
These were included in the cmakelists.txt file. My name is Submitty

examples/13_cmake_compilation/submissions/CMakeLists.txt

Lines changed: 0 additions & 16 deletions
This file was deleted.

examples/13_cmake_compilation/submissions/SimpleObject.cpp

Lines changed: 0 additions & 18 deletions
This file was deleted.

examples/13_cmake_compilation/submissions/SimpleObject.h

Lines changed: 0 additions & 11 deletions
This file was deleted.

examples/13_cmake_compilation/submissions/main.cpp

Lines changed: 0 additions & 12 deletions
This file was deleted.
Binary file not shown.
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
{
2+
"max_submission_size" : 1000000,
3+
"testcases" : [
4+
5+
// *************** COMPILATION *****************
6+
{
7+
"type" : "Compilation",
8+
"title" : "Compilation",
9+
//Note the two step compilation.
10+
"command" : ["cmake .", "make"],
11+
"executable_name" : "a.out",
12+
"points" : 1
13+
},
14+
// *************** TEST CASES *****************
15+
{
16+
"title" : "Graphics program 1",
17+
"command" : "./a.out -input sierpinski_triangle.txt -size 400 -iters 0 -cubes",
18+
//*************** Actions *********************
19+
//Actions allow you to interface GUI programs
20+
//via submitty. Note that in order to run such
21+
//applications, it is required that you have
22+
//set up a "Submitty with a screen;" a machine
23+
//running submitty with a monitor. This machine
24+
//must also run only one grading thread at a
25+
//time. For more information, please visit the
26+
//submitty wiki.
27+
"actions" : [
28+
//It is recommended that the first action be a delay to allow student
29+
//programs additional time to initialize. Actions are taken beginning
30+
//at window load time. Note that all actions are padded with a .1 sec
31+
//delay.
32+
"delay 1",
33+
//The click and drag delta command moves a specific distance from the
34+
//current mouse position. For additional information about actions
35+
//and their syntax, please view the submitty wiki.
36+
"click and drag delta 100 0",
37+
//This program uses many unecessarily delays. Experiment by removing
38+
//them.
39+
"delay 1",
40+
"click and drag delta -100 0",
41+
"delay 1",
42+
"click and drag delta 0 100",
43+
"delay 1",
44+
"click and drag delta 0 -100",
45+
"delay 1",
46+
"click and drag delta 1000 0",
47+
"delay 1",
48+
"click and drag delta -1000 0",
49+
"delay 1",
50+
"click and drag delta 0 160",
51+
"delay 1",
52+
"click and drag delta 0 -160",
53+
"delay 1",
54+
"click and drag delta 300 300",
55+
"delay 1",
56+
//moves the mouse to 0,0 (upper left) on the window.
57+
"origin",
58+
"delay 1",
59+
//Centers the mouse on the screen
60+
"center",
61+
"delay 1",
62+
"mouse move 10 200",
63+
"delay 1",
64+
"click and drag 10 10 150 150",
65+
"delay 1",
66+
"click and drag 160 160",
67+
//takes a screenshot, labeled sequentially starting from 0.
68+
"screenshot",
69+
//In the provided application, q indicates a program quit.
70+
"type 'q'"],
71+
"points" : 1,
72+
"validation": [
73+
{
74+
//In this validation example, we merely check that the screenshot
75+
//taken above exists.
76+
"actual_file": "0.png",
77+
"description": "screenshot a",
78+
"method": "fileExists",
79+
"show_actual": "always",
80+
"show_message": "always"
81+
}
82+
]
83+
},
84+
{
85+
"title" : "Graphics program 1",
86+
"command" : "./a.out -input sierpinski_triangle.txt -size 400 -iters 0 -cubes",
87+
"actions" : [
88+
"type 'm'",
89+
"click and drag delta 50 -125",
90+
"delay 1",
91+
"screenshot",
92+
"type 'q'"
93+
],
94+
"points" : 1,
95+
"validation": [
96+
{
97+
"actual_file": "0.png",
98+
"description": "screenshot a",
99+
"method": "fileExists",
100+
"show_actual": "always",
101+
"show_message": "always"
102+
}
103+
]
104+
}
105+
]
106+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#version 330 core
2+
3+
// data flows in from the vertex shader
4+
in vec4 ex_color;
5+
6+
// data flows out to produce the final rendering
7+
out vec4 out_color;
8+
9+
void main() {
10+
11+
// just use the data from the vertex shader
12+
out_color = ex_color;
13+
14+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#version 330 core
2+
3+
// data flows in from the C++ program
4+
layout(location = 0) in vec4 in_position;
5+
layout(location = 1) in vec4 in_color;
6+
7+
// data flows out to the fragment shader
8+
out vec4 ex_color;
9+
10+
// the transformation matrix is constant (not varying)
11+
// when applied to this unit of geometry
12+
uniform mat4 MVP;
13+
14+
void main(){
15+
16+
// apply the transformation
17+
gl_Position = MVP * in_position;
18+
19+
// just pass the color to the fragment shader
20+
ex_color = in_color;
21+
22+
}
23+

0 commit comments

Comments
 (0)