Ace-0 / MineCube

A Cool Voxel Editor Based on OpenGL 3.3+ !

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

titlebar

MineCube

A sample voxel editor based on OpenGL 3.3+, inspired by MagicaVoxel.

Support Windows 10 currently.

A final project originally of 5 undergraduate students for the course Computer Graphics, SYSU.

A good OpenGL learning example for the green hand in Computer Graphics, while maybe not the best practice in the related field.

Create any small stuff you like!

presentation

More Image Examples

Mastersword

warrior

diglett

Dependences

  1. OpenGL 3.3+
  2. GLAD

From LearnOpenGL:

Go to the web service, make sure the language is set to C++ and in the API section, select an OpenGL version of at least 3.3 (which is what we'll be using for this repo; higher versions may be fine as well). Also make sure the profile is set to Core and that the Generate a loader option is ticked. Ignore the extensions (for now) and click Generate to produce the resulting library files.

Chinese Version: 打开GLAD的在线服务,将语言(Language)设置为C/C++,在API选项中,选择3.3以上的OpenGL(gl)版本(本仓库中将使用3.3版本,但更新的版本应该也能正常工作)。之后将模式(Profile)设置为Core,并且保证生成加载器(Generate a loader)的选项是选中的。现在可以先(暂时)忽略拓展(Extensions)中的内容。都选择完之后,点击生成(Generate)按钮来生成库文件。

  1. GLFW Master 3.2.1 GLFW Master branch
  2. GLM 0.9.8.5
  3. imgui v1.60
  4. nlohmann::json v3.1.2 , 只需要下载 json.hpp 的 release 文件。
  5. freetype 2.9.1 , 建议下载 ft291.zip 并解压 , 然后将 freetype-2.9.1 文件夹更名为 freetype 添加至 3rd_party

How to Run Demo

1. Download the Binary File in Release

Release List

2. Build from the Source

  1. Create a new directory 3rd_party at root directory.
  2. Download and unzip glad, glfw, glm, imgui dependences following the URL above.
  3. Rename all the dependences' directories without certain version number.
  4. Download nlohmann/json.hpp file from the URL above.
  5. Follow the steps above to add freetype library.

Now your 3rd_party looks like:

3rd_party/
----glad/
----glfw/
----glm/
----imgui/
----nlohmann/json.hpp
----freetype
  1. Use Cmake to generate your project file.

2.1 Windows (Visual Studio 2015 or higher)

  1. Use Cmake-gui to generate the build/ dir.
  2. Open it in Visual Studio, set MineCube as Startup Project.
  3. Compile it and run the program.

You might need to modify the shaders' path in demo.cpp

2.2 Mac OS

Still need to be developed.

2.3 Linux(Ubuntu)

Still need to be developed.

Contributors

More about MineCube

Read wiki for more technical details.

Bugs Report

Feel free to new issues.

About

A Cool Voxel Editor Based on OpenGL 3.3+ !

License:MIT License


Languages

Language:C 61.5%Language:C++ 37.0%Language:GLSL 1.2%Language:CMake 0.3%