Skip to content

Commit

Permalink
Merge pull request #29 from mortennobel/1.0.6
Browse files Browse the repository at this point in the history
1.0.6
  • Loading branch information
mortennobel authored Mar 17, 2018
2 parents 2f880f0 + 0eaaeb3 commit c6b5c15
Show file tree
Hide file tree
Showing 57 changed files with 707 additions and 148 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,5 @@ App_Data/*.mdf
App_Data/*.ldf

.idea/
project/
project/
imgui.ini
2 changes: 1 addition & 1 deletion em-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ fi

source ${EMSDK}/emsdk_env.sh

for FILENAME in multiple-materials multiple-lights imgui-color-test pbr-test custom-mesh-layout-default-values imgui_demo multi-cameras particle-sprite particle-test polygon-offset-example spinning-sphere-cubemap sprite-test static_vertex_attribute texture-test
for FILENAME in benchmark64k-heavy matrix-uniforms custom-mesh-layout-ints multiple-materials multiple-lights imgui-color-test pbr-test custom-mesh-layout-default-values imgui_demo multi-cameras particle-sprite particle-test polygon-offset-example spinning-sphere-cubemap sprite-test static_vertex_attribute texture-test
do
echo $FILENAME
emcc -Iinclude src/imgui/imgui.cpp \
Expand Down
30 changes: 0 additions & 30 deletions imgui.ini

This file was deleted.

2 changes: 1 addition & 1 deletion include/TextEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "imgui.h"

/**
* https://github.com/BalazsJako/ImGuiColorTextEdit
* https://github.com/BalazsJako/ImGuiColorTextEdit (commit 6c69c306da0afb6c0b7ea51ec504aa0aae348aad)
*
* MIT License
*
Expand Down
2 changes: 1 addition & 1 deletion include/sre/BlendType.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SimpleRenderEngine (https://github.com/mortennobel/SimpleRenderEngine)
*
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergnesen.com/ )
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergensen.com/ )
* License: MIT
*/

Expand Down
2 changes: 1 addition & 1 deletion include/sre/Camera.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SimpleRenderEngine (https://github.com/mortennobel/SimpleRenderEngine)
*
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergnesen.com/ )
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergensen.com/ )
* License: MIT
*/

Expand Down
2 changes: 1 addition & 1 deletion include/sre/Color.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SimpleRenderEngine (https://github.com/mortennobel/SimpleRenderEngine)
*
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergnesen.com/ )
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergensen.com/ )
* License: MIT
*/

Expand Down
2 changes: 1 addition & 1 deletion include/sre/Framebuffer.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SimpleRenderEngine (https://github.com/mortennobel/SimpleRenderEngine)
*
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergnesen.com/ )
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergensen.com/ )
* License: MIT
*/

Expand Down
2 changes: 1 addition & 1 deletion include/sre/Inspector.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SimpleRenderEngine (https://github.com/mortennobel/SimpleRenderEngine)
*
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergnesen.com/ )
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergensen.com/ )
* License: MIT
*/

Expand Down
2 changes: 1 addition & 1 deletion include/sre/Light.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SimpleRenderEngine (https://github.com/mortennobel/SimpleRenderEngine)
*
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergnesen.com/ )
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergensen.com/ )
* License: MIT
*/

Expand Down
2 changes: 1 addition & 1 deletion include/sre/LightType.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SimpleRenderEngine (https://github.com/mortennobel/SimpleRenderEngine)
*
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergnesen.com/ )
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergensen.com/ )
* License: MIT
*/

Expand Down
2 changes: 1 addition & 1 deletion include/sre/Log.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SimpleRenderEngine (https://github.com/mortennobel/SimpleRenderEngine)
*
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergnesen.com/ )
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergensen.com/ )
* License: MIT
*/
#pragma once
Expand Down
8 changes: 6 additions & 2 deletions include/sre/Material.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SimpleRenderEngine (https://github.com/mortennobel/SimpleRenderEngine)
*
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergnesen.com/ )
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergensen.com/ )
* License: MIT
*/

Expand Down Expand Up @@ -78,7 +78,9 @@ namespace sre {

bool set(std::string uniformName, glm::vec4 value);
bool set(std::string uniformName, float value);
bool set(std::string uniformName, std::shared_ptr<sre::Texture>);
bool set(std::string uniformName, std::shared_ptr<sre::Texture> value);
bool set(std::string uniformName, std::shared_ptr<std::vector<glm::mat3>> value);
bool set(std::string uniformName, std::shared_ptr<std::vector<glm::mat4>> value);
bool set(std::string uniformName, Color value);

template<typename T>
Expand All @@ -98,6 +100,8 @@ namespace sre {

std::vector<Uniform<std::shared_ptr<sre::Texture>>> textureValues;
std::vector<Uniform<glm::vec4>> vectorValues;
std::vector<Uniform<std::shared_ptr<std::vector<glm::mat4>>>> mat4Values;
std::vector<Uniform<std::shared_ptr<std::vector<glm::mat3>>>> mat3Values;
std::vector<Uniform<float>> floatValues;

friend class Shader;
Expand Down
6 changes: 4 additions & 2 deletions include/sre/Mesh.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SimpleRenderEngine (https://github.com/mortennobel/SimpleRenderEngine)
*
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergnesen.com/ )
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergensen.com/ )
* License: MIT
*/

Expand Down Expand Up @@ -65,7 +65,7 @@ namespace sre {
MeshBuilder& withAttribute(std::string name, const std::vector<glm::vec2> &values); // Set a named vertex attribute of vec2
MeshBuilder& withAttribute(std::string name, const std::vector<glm::vec3> &values); // Set a named vertex attribute of vec3
MeshBuilder& withAttribute(std::string name, const std::vector<glm::vec4> &values); // Set a named vertex attribute of vec4
MeshBuilder& withAttribute(std::string name, const std::vector<glm::i32vec4> &values);// Set a named vertex attribute of i32vec4
MeshBuilder& withAttribute(std::string name, const std::vector<glm::i32vec4> &values);// Set a named vertex attribute of i32vec4. On platforms not supporting i32vec4 the values are converted to vec4

// other
MeshBuilder& withName(const std::string& name); // Defines the name of the mesh
Expand Down Expand Up @@ -165,6 +165,8 @@ namespace sre {

friend class RenderPass;
friend class Inspector;

bool hasAttribute(std::string name);
};

template<>
Expand Down
2 changes: 1 addition & 1 deletion include/sre/MeshTopology.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SimpleRenderEngine (https://github.com/mortennobel/SimpleRenderEngine)
*
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergnesen.com/ )
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergensen.com/ )
* License: MIT
*/

Expand Down
2 changes: 1 addition & 1 deletion include/sre/ModelImporter.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SimpleRenderEngine (https://github.com/mortennobel/SimpleRenderEngine)
*
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergnesen.com/ )
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergensen.com/ )
* License: MIT
*/

Expand Down
2 changes: 1 addition & 1 deletion include/sre/RenderPass.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SimpleRenderEngine (https://github.com/mortennobel/SimpleRenderEngine)
*
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergnesen.com/ )
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergensen.com/ )
* License: MIT
*/

Expand Down
2 changes: 1 addition & 1 deletion include/sre/RenderStats.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SimpleRenderEngine (https://github.com/mortennobel/SimpleRenderEngine)
*
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergnesen.com/ )
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergensen.com/ )
* License: MIT
*/

Expand Down
6 changes: 3 additions & 3 deletions include/sre/Renderer.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SimpleRenderEngine (https://github.com/mortennobel/SimpleRenderEngine)
*
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergnesen.com/ )
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergensen.com/ )
* License: MIT
*/

Expand Down Expand Up @@ -71,7 +71,7 @@ namespace sre {
~Renderer();
static constexpr int sre_version_major = 1;
static constexpr int sre_version_minor = 0;
static constexpr int sre_version_point = 5;
static constexpr int sre_version_point = 6;

glm::ivec2 getWindowSize(); // Return the current size of the window

Expand All @@ -89,7 +89,7 @@ namespace sre {

int getMaxSceneLights(); // Get maximum amout of scenelights per object

DEPRECATED("Use sre::renderInfo() instead of getRenderInfo()")
DEPRECATED("Use sre::renderInfo() instead of Renderer::getRenderInfo()")
const RenderInfo& getRenderInfo(); // Get info about the renderer
private:
int maxSceneLights = 4; // Maximum of scene lights
Expand Down
4 changes: 3 additions & 1 deletion include/sre/SDLRenderer.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SimpleRenderEngine (https://github.com/mortennobel/SimpleRenderEngine)
*
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergnesen.com/ )
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergensen.com/ )
* License: MIT
*/

Expand Down Expand Up @@ -101,6 +101,8 @@ class DllExport SDLRenderer {
SDL_Window *getSDLWindow(); // Get a pointer to SDL_Window

static SDLRenderer* instance; // Singleton reference to the engine after initialization.

glm::vec3 getLastFrameStats(); // Returns delta time for last frame wrt event, update and render
private:
void frame(float deltaTimeSec);
Renderer* r;
Expand Down
3 changes: 2 additions & 1 deletion include/sre/Shader.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SimpleRenderEngine (https://github.com/mortennobel/SimpleRenderEngine)
*
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergnesen.com/ )
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergensen.com/ )
* License: MIT
*/

Expand Down Expand Up @@ -35,6 +35,7 @@ namespace sre {
Mat4,
Vec3,
Vec4,
IVec4,
Texture,
TextureCube,
Invalid
Expand Down
2 changes: 1 addition & 1 deletion include/sre/Sprite.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SimpleRenderEngine (https://github.com/mortennobel/SimpleRenderEngine)
*
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergnesen.com/ )
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergensen.com/ )
* License: MIT
*/

Expand Down
2 changes: 1 addition & 1 deletion include/sre/SpriteAtlas.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SimpleRenderEngine (https://github.com/mortennobel/SimpleRenderEngine)
*
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergnesen.com/ )
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergensen.com/ )
* License: MIT
*/

Expand Down
2 changes: 1 addition & 1 deletion include/sre/SpriteBatch.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SimpleRenderEngine (https://github.com/mortennobel/SimpleRenderEngine)
*
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergnesen.com/ )
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergensen.com/ )
* License: MIT
*/

Expand Down
2 changes: 1 addition & 1 deletion include/sre/Texture.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SimpleRenderEngine (https://github.com/mortennobel/SimpleRenderEngine)
*
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergnesen.com/ )
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergensen.com/ )
* License: MIT
*/

Expand Down
2 changes: 1 addition & 1 deletion include/sre/VR.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SimpleRenderEngine (https://github.com/mortennobel/SimpleRenderEngine)
*
* Created by Morten Nobel-J�rgensen ( http://www.nobel-joergensen.com/ )
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergensen.com/ )
* License: MIT
*/

Expand Down
2 changes: 1 addition & 1 deletion include/sre/WorldLights.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SimpleRenderEngine (https://github.com/mortennobel/SimpleRenderEngine)
*
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergnesen.com/ )
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergensen.com/ )
* License: MIT
*/

Expand Down
2 changes: 1 addition & 1 deletion include/sre/imgui_sre.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SimpleRenderEngine (https://github.com/mortennobel/SimpleRenderEngine)
*
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergnesen.com/ )
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergensen.com/ )
* License: MIT
*/

Expand Down
2 changes: 1 addition & 1 deletion include/sre/impl/CPPShim.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SimpleRenderEngine (https://github.com/mortennobel/SimpleRenderEngine)
*
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergnesen.com/ )
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergensen.com/ )
* License: MIT
*/

Expand Down
2 changes: 1 addition & 1 deletion include/sre/impl/Export.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SimpleRenderEngine (https://github.com/mortennobel/SimpleRenderEngine)
*
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergnesen.com/ )
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergensen.com/ )
* License: MIT
*/

Expand Down
2 changes: 1 addition & 1 deletion include/sre/impl/GL.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SimpleRenderEngine (https://github.com/mortennobel/SimpleRenderEngine)
*
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergnesen.com/ )
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergensen.com/ )
* License: MIT
*/

Expand Down
4 changes: 2 additions & 2 deletions include/sre/impl/GL.inl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SimpleRenderEngine
* SimpleRenderEngine (https://github.com/mortennobel/SimpleRenderEngine)
*
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergnesen.com/ )
* Created by Morten Nobel-Jørgensen ( http://www.nobel-joergensen.com/ )
* License: MIT
*/

Expand Down
Loading

0 comments on commit c6b5c15

Please sign in to comment.