editorconfig fixes

This commit is contained in:
Alexander Popov 2022-04-03 23:15:29 +03:00
parent c3c02fdedd
commit 065577f5e2
Signed by: iiiypuk
GPG Key ID: 3F76816AEE08F908
5 changed files with 14 additions and 20 deletions

View File

@ -8,7 +8,6 @@ charset = utf-8
trim_trailing_whitespace = true trim_trailing_whitespace = true
insert_final_newline = true insert_final_newline = true
# C
[{*.c,*.h}] [{*.c,*.h}]
indent_style = space indent_style = space
indent_size = 2 indent_size = 2

7
.gitignore vendored
View File

@ -1,6 +1 @@
# windows binary bin/
*.exe
# unix binary
fps_counter
rotate_cube

View File

@ -3,7 +3,7 @@ CC=tcc
all: fps_counter rotate_cube all: fps_counter rotate_cube
fps_counter: fps_counter:
$(CC) src/fps_counter/fps_counter.c -lglfw -lGL -o fps_counter $(CC) src/fps_counter/fps_counter.c -lglfw -lGL -o ./bin/fps_counter
rotate_cube: rotate_cube:
$(CC) src/rotate_cube/rotate_cube.c -lglfw -lGL -o rotate_cube $(CC) src/rotate_cube/rotate_cube.c -lglfw -lGL -o ./bin/rotate_cube

View File

@ -13,10 +13,10 @@ GLFW Examples
Примеры Примеры
------- -------
### Вращающийся куб ### Вращающийся куб
[[Ссылка](rotate_cube/)] [[Ссылка](rotate_cube/)]
![Preview](src/rotate_cube/rotate_cube.png) ![Preview](src/rotate_cube/rotate_cube.png)
### Счётчик FPS в заголовке окна ### Счётчик FPS в заголовке окна
[[Ссылка](fps_counter/)] [[Ссылка](fps_counter/)]
![Preview](src/fps_counter/fps_counter.png) ![Preview](src/fps_counter/fps_counter.png)

View File

@ -29,7 +29,7 @@ int main(int argc, char const *argv[])
glfwWindowHint(GLFW_RESIZABLE, GL_FALSE); glfwWindowHint(GLFW_RESIZABLE, GL_FALSE);
window = glfwCreateWindow(320, 320, "Rorate Cube", NULL, NULL); window = glfwCreateWindow(320, 320, "Rorate Cube", NULL, NULL);
if (!window) if (!window)
{ {
glfwTerminate(); glfwTerminate();
@ -48,10 +48,10 @@ int main(int argc, char const *argv[])
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity(); glLoadIdentity();
glRotatef(rotate_x, 1.0, 0.0, 0.0); glRotatef(rotate_x, 1.0, 0.0, 0.0);
glRotatef(rotate_y, 0.0, 1.0, 0.0); glRotatef(rotate_y, 0.0, 1.0, 0.0);
glBegin(GL_POLYGON); // Yellow side - FRONT glBegin(GL_POLYGON); // Yellow side - FRONT
glColor3f(1.0, 1.0, 0.0); glColor3f(1.0, 1.0, 0.0);
glVertex3f( 0.5, -0.5, -0.5); glVertex3f( 0.5, -0.5, -0.5);
@ -59,7 +59,7 @@ int main(int argc, char const *argv[])
glVertex3f(-0.5, 0.5, -0.5); glVertex3f(-0.5, 0.5, -0.5);
glVertex3f(-0.5, -0.5, -0.5); glVertex3f(-0.5, -0.5, -0.5);
glEnd(); glEnd();
glBegin(GL_POLYGON); // White side - BACK glBegin(GL_POLYGON); // White side - BACK
glColor3f(1.0, 1.0, 1.0); glColor3f(1.0, 1.0, 1.0);
glVertex3f( 0.5, -0.5, 0.5); glVertex3f( 0.5, -0.5, 0.5);
@ -67,7 +67,7 @@ int main(int argc, char const *argv[])
glVertex3f(-0.5, 0.5, 0.5); glVertex3f(-0.5, 0.5, 0.5);
glVertex3f(-0.5, -0.5, 0.5); glVertex3f(-0.5, -0.5, 0.5);
glEnd(); glEnd();
glBegin(GL_POLYGON); // Purple side - RIGHT glBegin(GL_POLYGON); // Purple side - RIGHT
glColor3f(1.0, 0.0, 1.0); glColor3f(1.0, 0.0, 1.0);
glVertex3f(0.5, -0.5, -0.5); glVertex3f(0.5, -0.5, -0.5);
@ -75,7 +75,7 @@ int main(int argc, char const *argv[])
glVertex3f(0.5, 0.5, 0.5); glVertex3f(0.5, 0.5, 0.5);
glVertex3f(0.5, -0.5, 0.5); glVertex3f(0.5, -0.5, 0.5);
glEnd(); glEnd();
glBegin(GL_POLYGON); // Green side - LEFT glBegin(GL_POLYGON); // Green side - LEFT
glColor3f(0.0, 1.0, 0.0); glColor3f(0.0, 1.0, 0.0);
glVertex3f(-0.5, -0.5, 0.5); glVertex3f(-0.5, -0.5, 0.5);
@ -83,7 +83,7 @@ int main(int argc, char const *argv[])
glVertex3f(-0.5, 0.5, -0.5); glVertex3f(-0.5, 0.5, -0.5);
glVertex3f(-0.5, -0.5, -0.5); glVertex3f(-0.5, -0.5, -0.5);
glEnd(); glEnd();
glBegin(GL_POLYGON); // Blue side - TOP glBegin(GL_POLYGON); // Blue side - TOP
glColor3f(0.0, 0.0, 1.0); glColor3f(0.0, 0.0, 1.0);
glVertex3f( 0.5, 0.5, 0.5); glVertex3f( 0.5, 0.5, 0.5);
@ -91,7 +91,7 @@ int main(int argc, char const *argv[])
glVertex3f(-0.5, 0.5, -0.5); glVertex3f(-0.5, 0.5, -0.5);
glVertex3f(-0.5, 0.5, 0.5); glVertex3f(-0.5, 0.5, 0.5);
glEnd(); glEnd();
glBegin(GL_POLYGON); // Red side - BOTTOM glBegin(GL_POLYGON); // Red side - BOTTOM
glColor3f(1.0, 0.0, 0.0); glColor3f(1.0, 0.0, 0.0);
glVertex3f( 0.5, -0.5, -0.5); glVertex3f( 0.5, -0.5, -0.5);
@ -99,7 +99,7 @@ int main(int argc, char const *argv[])
glVertex3f(-0.5, -0.5, 0.5); glVertex3f(-0.5, -0.5, 0.5);
glVertex3f(-0.5, -0.5, -0.5); glVertex3f(-0.5, -0.5, -0.5);
glEnd(); glEnd();
glfwSwapBuffers(window); glfwSwapBuffers(window);
glfwPollEvents(); glfwPollEvents();
} }