Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added docs #3

Merged
merged 6 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@ CMakeFiles/
**.a
**.dll
**.so
**.exe
**.exe

.idea
.cmake
Testing
20 changes: 14 additions & 6 deletions INSTALLATION.md → docs/docs/INSTALLATION.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# Linux
You have to have X11, OpenGL, CMake and a C compiler installed.
## X11
---
hide:
- navigation
---

# Installation

## Linux
You have to have X11-dev-packages, CMake and a C compiler installed.

### X11
On Debian and derivates like Ubuntu and Linux Mint the xorg-dev meta-package pulls in the development packages for all of X11.
```bash
sudo apt install xorg-dev
Expand All @@ -18,17 +26,17 @@ pkg install xorgproto

On Cygwin the libXcursor-devel, libXi-devel, libXinerama-devel, libXrandr-devel and libXrender-devel packages in the Libs section of the GUI installer will install all the headers and other development related files GLFW requires for X11.

# Mac
## Mac
You have to have Xcode command line tools and CMake inatalled.
## Xcode
```bash
xcode-select --install
```

# Windows
## Windows
You have to have CMake and a C compiler installed. You can also use WSL, if so follow the Linux instructions.

# Building Vuelto
## Building Vuelto
Clone the repository
```bash
git clone --recurse-submodules https://github.com/dimkauzh/vuelto.git
Expand Down
49 changes: 49 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
hide:
- navigation
- toc
---


<h1 align="center">
<p align="center">
<img width="1400" alt="banner" src="https://github.com/dimkauzh/vuelto/assets/106883655/2363d776-2669-41f2-b31f-a235de8bea82">

<h1 align="center">A Game Engine build with GLFW and OpenGL with support for C/C++.</h1>

<p align="center">
<a href="https://github.com/dimkauzh/vuelto"><img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/dimkauzh/vuelto"></a>
<a href="https://github.com/dimkauzh/vuelto"><img alt="GitHub license" src="https://img.shields.io/github/license/dimkauzh/vuelto"></a>
<a href="https://github.com/dimkauzh/vuelto"><img alt="Lines of code" src="https://tokei.rs/b1/github/dimkauzh/vuelto?category=lines"></a>
</p>

</h1>

## Welcome
Welcome to Vuelto's website! Here you can find more about the engine, or you can find some docs about the engine. If you want to contribute to the engine, you can find the source code on [GitHub](https://github.com/dimkauzh/vuelto).

## Table of Contents
- [Installation](docs/INSTALLATION.md)
- [Todo/Changelog](todo/index.md)
- [Usage](#usage)
- [Contributing](#contributing)
- [License](#license)
- [About](#about)


## Usage
There are a couple ways to use vuelto with your project, but I recommend using it as a submodule.
Use the following things to achieve good usage with vuelto:

- [CMake](https://cmake.org/)
- [Git](https://git-scm.com/)
- [Git submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules)

## Contributing
We are fully open to contributions, but I will check and test your code before merging it into the dev branch. All your code thats accepted will only be merged into the dev branch, and will be later released with the next release to the master branch.

## License
Vuelto is licensed under the [GPLv3 Licence](https://github.com/dimkauzh/vuelto/blob/master/LICENSE).

## About
Vuelto is a game engine built with GLFW and OpenGL using C. My goal is to achieve a good and easy to use game engine for everyone. I am currently working on the engine, and I am not planning to releasing Vuelto (its not ready). I am planning to release a website for the engine that contains a documentation for the engine and a roadmap/changelog. I am also planning to release a couple of tutorials on how to use vuelto. I hope you will enjoy using vuelto. Have fun!
File renamed without changes
Binary file added docs/logo/icon-no-bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
46 changes: 46 additions & 0 deletions docs/todo/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
hide:
- navigation
- toc
---

## V1
- [x] Application
- [x] Window
- [x] Input
- [ ] Renderer
- [x] OpenGL
- [x] Rects
- [x] Images
- [ ] Animations
- [ ] Physics Engine
- [ ] Collision
- [ ] Gravity
- [ ] Forces
- [ ] Audio
- [ ] Sound
- [ ] Music
- [ ] Math
- [ ] Vectors
- [ ] Docs
- [x] Website
- [ ] Tutorials
- [ ] Docs

## V2
- [ ] GUI
- [ ] Buttons
- [ ] Text
- [ ] Images
- [ ] Networking
- [ ] TCP
- [ ] UDP

- [ ] Vuelto Editor
- [ ] Full blown editor
- [ ] Scripting
- [ ] Plugins
- [ ] Customization
- [ ] Exporting
- [ ] Importing
- [ ] Project management
1 change: 1 addition & 0 deletions include/vuelto/vuelto/core/app.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "../tools/definitions.h"
#include "structs.h"

void vueltoInit();
void vueltoInitMultipleWindows();
Expand Down
1 change: 1 addition & 0 deletions include/vuelto/vuelto/core/renderer.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "../tools/definitions.h"
#include "structs.h"

void vueltoDrawRect(float x, float y, float width, float height, float r, float g, float b);
void vueltoSetBackgroundColor(float color1, float color2, float color3);
Expand Down
15 changes: 15 additions & 0 deletions include/vuelto/vuelto/core/structs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#pragma once

#include <GLFW/glfw3.h>

typedef struct {
GLFWwindow *window;
int width;
int height;
const char *title;
} Vuelto_Window;

typedef struct {
float width, height, x, y;
GLuint texture;
} Vuelto_Image;
2 changes: 1 addition & 1 deletion include/vuelto/vuelto/event/event.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "../core/app.h"
#include "../core/structs.h"
#include "../tools/definitions.h"

void vueltoPollEvents();
Expand Down
12 changes: 0 additions & 12 deletions include/vuelto/vuelto/tools/definitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,3 @@
#include <GLFW/glfw3.h>
#include <stdbool.h>
#include <stdio.h>

typedef struct {
GLFWwindow *window;
int width;
int height;
const char *title;
} Vuelto_Window;

typedef struct {
float width, height, x, y;
GLuint texture;
} Vuelto_Image;
37 changes: 37 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
site_name: Vuelto
site_description: A Game Engine build with GLFW and OpenGL with support for C/C++!

repo_name: dimkauzh/vuelto
repo_url: https://github.com/dimkauzh/vuelto

nav:
- Home: "index.md"
# - Wiki: "wiki/index.md"
# - Tutorial: "tutorials/index.md"

theme:
name: material

logo: logo/icon-no-bg.png
favicon: logo/icon-no-bg.png

features:
- navigation.path
- navigation.tabs
- navigation.tabs.sticky
- navigation.top
- toc.follow
- navigation.expand

palette:
- media: "(prefers-color-scheme: light)"
scheme: default
toggle:
icon: material/brightness-7
name: Switch to dark mode

- media: "(prefers-color-scheme: dark)"
scheme: slate
toggle:
icon: material/brightness-4
name: Switch to light mode
5 changes: 4 additions & 1 deletion src/vuelto/core/app.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "app.h"

#include "../tools/definitions.h"
#include "renderer.h"

bool MultipleWindowsEnabled = false;
Expand Down Expand Up @@ -60,6 +59,10 @@ bool vueltoWindowShouldClose(Vuelto_Window win) {
return true;
}

void vueltoWindowSetRezisable(Vuelto_Window win, bool resizable) {
glfwSetWindowAttrib(win.window, GLFW_RESIZABLE, resizable);
}

void vueltoMakeContextCurrent(Vuelto_Window win) { glfwMakeContextCurrent(win.window); }

void vueltoRefresh(Vuelto_Window win) {
Expand Down
2 changes: 2 additions & 0 deletions src/vuelto/core/app.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "../tools/definitions.h"
#include "structs.h"

void vueltoInit();
void vueltoInitMultipleWindows();
Expand All @@ -9,3 +10,4 @@ void vueltoTerminate();
bool vueltoWindowShouldClose(Vuelto_Window win);
void vueltoRefresh(Vuelto_Window win);
void vueltoMakeContextCurrent(Vuelto_Window win);
void vueltoWindowSetRezisable(Vuelto_Window win, bool resizable);
1 change: 1 addition & 0 deletions src/vuelto/core/renderer.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "../tools/definitions.h"
#include "structs.h"

void vueltoDrawRect(float x, float y, float width, float height, float r, float g, float b);
void vueltoSetBackgroundColor(float color1, float color2, float color3);
Expand Down
15 changes: 15 additions & 0 deletions src/vuelto/core/structs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#pragma once

#include <GLFW/glfw3.h>

typedef struct {
GLFWwindow *window;
int width;
int height;
const char *title;
} Vuelto_Window;

typedef struct {
float width, height, x, y;
GLuint texture;
} Vuelto_Image;
2 changes: 0 additions & 2 deletions src/vuelto/event/event.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#include "event.h"

#include "../tools/definitions.h"

void vueltoPollEvents() { glfwPollEvents(); }

bool vueltoKeyPressed(Vuelto_Window window, int keyCode) { return (glfwGetKey(window.window, keyCode) == GLFW_PRESS); }
Expand Down
2 changes: 1 addition & 1 deletion src/vuelto/event/event.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "../core/app.h"
#include "../core/structs.h"
#include "../tools/definitions.h"

void vueltoPollEvents();
Expand Down
12 changes: 0 additions & 12 deletions src/vuelto/tools/definitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,3 @@
#include <GLFW/glfw3.h>
#include <stdbool.h>
#include <stdio.h>

typedef struct {
GLFWwindow *window;
int width;
int height;
const char *title;
} Vuelto_Window;

typedef struct {
float width, height, x, y;
GLuint texture;
} Vuelto_Image;
Loading