Commit e4b7a5e6 authored by Denis Salem's avatar Denis Salem

update dev env

parent 81c1cfc7
......@@ -2,11 +2,14 @@ cmake_minimum_required (VERSION 3.7)
project (UNIVERSE)
include_directories ("${PROJECT_SOURCE_DIR}/ProceduralEngine")
add_subdirectory(ProceduralEngine)
add_subdirectory(gl3w)
add_subdirectory(unit-tests)
set(EXTERNAL_DEPENDENCIES "-lGL -ldl -lglfw")
add_executable(UNIVERSE main.cpp)
#add_executable(UNIVERSE main.cpp)
target_link_libraries (UNIVERSE gl3w ${EXTERNAL_DEPENDENCIES})
#target_link_libraries (UNIVERSE gl3w ${EXTERNAL_DEPENDENCIES})
cmake_minimum_required (VERSION 3.7)
project(ProceduralEngine)
add_library(ProceduralEngine HeightmapBrushes.cpp)
#include "ProceduralEngine.hpp"
#include "HeightmapBrushes.hpp"
namespace ProceduralEngine {
HeightmapBrushes::HeightmapBrushes(int * seed) {
m_Seed = seed;
m_Scale = HEIGHTMAP_SCALE;
memset( m_VoronoiBrush0, 0, sizeof(float) * HEIGHTMAP_BRUSHES_COUNT * HEIGHTMAP_AREA);
memset( m_VoronoiBrush1, 0, sizeof(float) * HEIGHTMAP_BRUSHES_COUNT * HEIGHTMAP_AREA);
memset( m_VoronoiBrush2, 0, sizeof(float) * HEIGHTMAP_BRUSHES_COUNT * HEIGHTMAP_AREA);
......
#ifndef INC_PROCEDURAL_ENGINE_HEIGHTMAP_BRUSHES
#define INC_PROCEDURAL_ENGINE_DATA_HEIGHTMAP_BRUSHES
#include <cstring>
#include "dataType.hpp"
#include "dataTypes.hpp"
#define HEIGHTMAP_SCALE 512
#define HEIGHTMAP_BRUSHES_COUNT 8
namespace ProceduralEngine {
class HeightmapBrushes {
......@@ -24,7 +32,9 @@ namespace ProceduralEngine {
Heightmap m_PerlinBrush[HEIGHTMAP_BRUSHES_COUNT];
Heightmap m_WarpBrush[HEIGHTMAP_BRUSHES_COUNT];
Heightmap m_TurbulenceBrush[HEIGHTMAP_BRUSHES_COUNT];
int * m_seed;
int m_scale;
int * m_Seed;
int m_Scale;
};
}
#endif
......@@ -2,8 +2,4 @@
#define INC_PROCEDURAL_ENGIN
#define HEIGHTMAP_AREA 262144
#define HEIGHTMAP_SCALE 512
#define HEIGHTMAP_BRUSHES_COUNT 8
#endif
......@@ -2,6 +2,8 @@
#define INC_PROCEDURAL_ENGINE_DATA_TYPE
#define HEIGHTMAP_AREA 262144
namespace ProceduralEngine {
typedef float Heightmap[HEIGHTMAP_AREA];
......
......@@ -2,37 +2,8 @@
#include <GL/gl3w.h>
#include <GLFW/glfw3.h>
int main(int argc, char ** argv) {
GLFWwindow* window;
/* Initialize the library */
if (!glfwInit())
return -1;
/* Create a windowed mode window and its OpenGL context */
window = glfwCreateWindow(640, 480, "Hello World", NULL, NULL);
if (!window)
{
glfwTerminate();
return -1;
}
/* Make the window's context current */
glfwMakeContextCurrent(window);
#include "HeightmapBrushes.hpp"
/* Loop until the user closes the window */
while (!glfwWindowShouldClose(window))
{
/* Render here */
glClear(GL_COLOR_BUFFER_BIT);
/* Swap front and back buffers */
glfwSwapBuffers(window);
/* Poll for and process events */
glfwPollEvents();
}
glfwTerminate();
int main(int argc, char ** argv) {
return 0;
}
cmake_minimum_required (VERSION 3.7)
project (unit-tests)
#include <iostream>
#include <GL/gl3w.h>
#include <GLFW/glfw3.h>
#include <ProceduralEngine/HeightmapBrushes.hpp>
int main(int argc, char ** argv) {
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment