Clean up file structure, standardize naming conventions, remove cute.
|
@ -1,5 +1,5 @@
|
|||
cmake_minimum_required(VERSION 3.12)
|
||||
project(GlProject)
|
||||
project(src)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
|
||||
|
@ -16,9 +16,9 @@ find_package(glfw3 REQUIRED)
|
|||
|
||||
link_directories(Libraries/glew/lib)
|
||||
|
||||
add_executable(GlProject GlProject/Main.cpp GlProject/engine/graphics/Mesh.cpp GlProject/engine/graphics/Mesh.h GlProject/engine/PerlinNoise.cpp GlProject/engine/PerlinNoise.h GlProject/engine/Entity.cpp GlProject/engine/Entity.h GlProject/engine/graphics/Shader.cpp GlProject/engine/graphics/Shader.h GlProject/engine/Window.cpp GlProject/engine/Window.h GlProject/engine/Camera.cpp GlProject/engine/Camera.h GlProject/engine/graphics/Texture.cpp GlProject/engine/graphics/Texture.h GlProject/mesh/MeshGenerator.cpp GlProject/mesh/MeshGenerator.h GlProject/engine/Timer.cpp GlProject/engine/Timer.h GlProject/blocks/BlockAtlas.cpp GlProject/blocks/BlockAtlas.h GlProject/blocks/BlockDef.cpp GlProject/blocks/BlockDef.h GlProject/mesh/MeshPart.cpp GlProject/mesh/MeshPart.h GlProject/mesh/MeshMod.h GlProject/mesh/Vertex.cpp GlProject/mesh/Vertex.h GlProject/mesh/BlockModel.cpp GlProject/mesh/BlockModel.h GlProject/engine/TextureAtlas.cpp GlProject/engine/TextureAtlas.h GlProject/world/World.cpp GlProject/world/World.h GlProject/world/BlockChunk.cpp GlProject/world/BlockChunk.h GlProject/engine/helpers/ArrayTrans3D.h GlProject/world/MeshChunk.cpp GlProject/world/MeshChunk.h)
|
||||
add_executable(src src/Main.cpp src/engine/graphics/Mesh.cpp src/engine/graphics/Mesh.h src/engine/PerlinNoise.cpp src/engine/PerlinNoise.h src/engine/Entity.cpp src/engine/Entity.h src/engine/graphics/Shader.cpp src/engine/graphics/Shader.h src/engine/Window.cpp src/engine/Window.h src/engine/Camera.cpp src/engine/Camera.h src/engine/graphics/Texture.cpp src/engine/graphics/Texture.h src/mesh/MeshGenerator.cpp src/mesh/MeshGenerator.h src/engine/Timer.cpp src/engine/Timer.h src/blocks/BlockAtlas.cpp src/blocks/BlockAtlas.h src/blocks/BlockDef.cpp src/blocks/BlockDef.h src/mesh/MeshPart.cpp src/mesh/MeshPart.h src/mesh/MeshMod.h src/mesh/Vertex.cpp src/mesh/Vertex.h src/mesh/BlockModel.cpp src/mesh/BlockModel.h src/engine/TextureAtlas.cpp src/engine/TextureAtlas.h src/world/World.cpp src/world/World.h src/world/BlockChunk.cpp src/world/BlockChunk.h src/engine/helpers/ArrayTrans3D.h src/world/MeshChunk.cpp src/world/MeshChunk.h)
|
||||
|
||||
target_link_libraries(GlProject
|
||||
target_link_libraries(src
|
||||
${OPENGL_gl_LIBRARY}
|
||||
glfw
|
||||
libGLEW.so
|
||||
|
|
|
@ -123,7 +123,7 @@ int main(int argc, char* argv[]) {
|
|||
|
||||
camera = new Camera(glm::vec3(0.0f, 16.0f, 0.0f), glm::vec3(0, 1, 0), -90.0f, -45.0f, 10.0f, 0.1f);
|
||||
|
||||
textureAtlas = new TextureAtlas("../Textures");
|
||||
textureAtlas = new TextureAtlas("../tex");
|
||||
blockAtlas = new BlockAtlas(textureAtlas);
|
||||
registerBlocks();
|
||||
|
||||
|
@ -131,7 +131,7 @@ int main(int argc, char* argv[]) {
|
|||
genChunks(world);
|
||||
|
||||
shader = new Shader();
|
||||
shader->createFromFile("../GlProject/shader/world.vs", "../GlProject/shader/world.fs");
|
||||
shader->createFromFile("../src/shader/world.vs", "../src/shader/world.fs");
|
||||
|
||||
glm::mat4 projectionMatrix = glm::perspective(45.0f, window->getBufferWidth() / window->getBufferHeight(), 0.1f, 1000.0f);
|
||||
|
|
@ -45,7 +45,7 @@ TextureAtlas::TextureAtlas(const char* directory) {
|
|||
|
||||
//Load Missing Texture
|
||||
auto msg = TextureRef();
|
||||
strcpy(msg.path, "../Textures/_missing.png");
|
||||
strcpy(msg.path, "../tex/_missing.png");
|
||||
strcpy(msg.name, "_missing.png");
|
||||
msg.texData = stbi_load(msg.path, &msg.width, &msg.height, &msg.bitDepth, 4);
|
||||
textureRefs.push_back(msg);
|
Before Width: | Height: | Size: 133 B After Width: | Height: | Size: 133 B |
Before Width: | Height: | Size: 607 B After Width: | Height: | Size: 607 B |
Before Width: | Height: | Size: 858 B After Width: | Height: | Size: 858 B |
Before Width: | Height: | Size: 841 B After Width: | Height: | Size: 841 B |
Before Width: | Height: | Size: 672 B After Width: | Height: | Size: 672 B |
Before Width: | Height: | Size: 857 B After Width: | Height: | Size: 857 B |
Before Width: | Height: | Size: 690 B After Width: | Height: | Size: 690 B |
Before Width: | Height: | Size: 931 B After Width: | Height: | Size: 931 B |
Before Width: | Height: | Size: 884 B After Width: | Height: | Size: 884 B |
Before Width: | Height: | Size: 857 B After Width: | Height: | Size: 857 B |
Before Width: | Height: | Size: 674 B After Width: | Height: | Size: 674 B |
Before Width: | Height: | Size: 620 B After Width: | Height: | Size: 620 B |
Before Width: | Height: | Size: 812 B After Width: | Height: | Size: 812 B |
Before Width: | Height: | Size: 739 B After Width: | Height: | Size: 739 B |
Before Width: | Height: | Size: 739 B After Width: | Height: | Size: 739 B |
Before Width: | Height: | Size: 740 B After Width: | Height: | Size: 740 B |
Before Width: | Height: | Size: 746 B After Width: | Height: | Size: 746 B |
Before Width: | Height: | Size: 792 B After Width: | Height: | Size: 792 B |
Before Width: | Height: | Size: 700 B After Width: | Height: | Size: 700 B |
Before Width: | Height: | Size: 664 B After Width: | Height: | Size: 664 B |
Before Width: | Height: | Size: 631 B After Width: | Height: | Size: 631 B |
Before Width: | Height: | Size: 813 B After Width: | Height: | Size: 813 B |
Before Width: | Height: | Size: 706 B After Width: | Height: | Size: 706 B |
Before Width: | Height: | Size: 648 B After Width: | Height: | Size: 648 B |
Before Width: | Height: | Size: 532 B After Width: | Height: | Size: 532 B |
Before Width: | Height: | Size: 670 B After Width: | Height: | Size: 670 B |
Before Width: | Height: | Size: 715 B After Width: | Height: | Size: 715 B |
Before Width: | Height: | Size: 724 B After Width: | Height: | Size: 724 B |
Before Width: | Height: | Size: 848 B After Width: | Height: | Size: 848 B |
Before Width: | Height: | Size: 400 B After Width: | Height: | Size: 400 B |
Before Width: | Height: | Size: 545 B After Width: | Height: | Size: 545 B |
Before Width: | Height: | Size: 712 B After Width: | Height: | Size: 712 B |
Before Width: | Height: | Size: 534 B After Width: | Height: | Size: 534 B |
Before Width: | Height: | Size: 814 B After Width: | Height: | Size: 814 B |
Before Width: | Height: | Size: 760 B After Width: | Height: | Size: 760 B |
Before Width: | Height: | Size: 804 B After Width: | Height: | Size: 804 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 774 B After Width: | Height: | Size: 774 B |
Before Width: | Height: | Size: 742 B After Width: | Height: | Size: 742 B |
Before Width: | Height: | Size: 638 B After Width: | Height: | Size: 638 B |
Before Width: | Height: | Size: 718 B After Width: | Height: | Size: 718 B |
Before Width: | Height: | Size: 523 B After Width: | Height: | Size: 523 B |
Before Width: | Height: | Size: 766 B After Width: | Height: | Size: 766 B |
Before Width: | Height: | Size: 655 B After Width: | Height: | Size: 655 B |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 684 B After Width: | Height: | Size: 684 B |
Before Width: | Height: | Size: 818 B After Width: | Height: | Size: 818 B |
Before Width: | Height: | Size: 750 B After Width: | Height: | Size: 750 B |
Before Width: | Height: | Size: 666 B After Width: | Height: | Size: 666 B |
Before Width: | Height: | Size: 767 B After Width: | Height: | Size: 767 B |
Before Width: | Height: | Size: 553 B After Width: | Height: | Size: 553 B |
Before Width: | Height: | Size: 745 B After Width: | Height: | Size: 745 B |
Before Width: | Height: | Size: 771 B After Width: | Height: | Size: 771 B |
Before Width: | Height: | Size: 753 B After Width: | Height: | Size: 753 B |
Before Width: | Height: | Size: 740 B After Width: | Height: | Size: 740 B |
Before Width: | Height: | Size: 746 B After Width: | Height: | Size: 746 B |
Before Width: | Height: | Size: 789 B After Width: | Height: | Size: 789 B |