Commit 8b8fc5fd authored by Johannes Braun's avatar Johannes Braun
Browse files

Improved everything a bit. Modernized splash screen.

parent 4257c19c
No preview for this file type
......@@ -3,10 +3,10 @@
<item name="sound" value="/audio/swoosh.wav"/>
<item name="background">
<!--<gradient-horizontal start="#0277BD" end="#293a92"/>-->
<gradient-vertical start="#4" end="#f"/>
<gradient-vertical start="#f" end="#f"/>
<!-- <color value="#0277BD"/> -->
<color value="#3"/>
<texture src="/textures/bricky.png" scale="100"/>
<color value="#f"/>
<texture src="/textures/bricky.png" scale="512"/>
</item>
<item name="duration" value="500"/>
</splash>
assets/textures/bricky.png

527 Bytes | W: | H:

assets/textures/bricky.png

5.83 MB | W: | H:

assets/textures/bricky.png
assets/textures/bricky.png
assets/textures/bricky.png
assets/textures/bricky.png
  • 2-up
  • Swipe
  • Onion skin
assets/textures/ryfjallet/negx.jpg

1.23 MB | W: | H:

assets/textures/ryfjallet/negx.jpg

337 KB | W: | H:

assets/textures/ryfjallet/negx.jpg
assets/textures/ryfjallet/negx.jpg
assets/textures/ryfjallet/negx.jpg
assets/textures/ryfjallet/negx.jpg
  • 2-up
  • Swipe
  • Onion skin
assets/textures/ryfjallet/negy.jpg

1.97 MB | W: | H:

assets/textures/ryfjallet/negy.jpg

368 KB | W: | H:

assets/textures/ryfjallet/negy.jpg
assets/textures/ryfjallet/negy.jpg
assets/textures/ryfjallet/negy.jpg
assets/textures/ryfjallet/negy.jpg
  • 2-up
  • Swipe
  • Onion skin
assets/textures/ryfjallet/negz.jpg

981 KB | W: | H:

assets/textures/ryfjallet/negz.jpg

369 KB | W: | H:

assets/textures/ryfjallet/negz.jpg
assets/textures/ryfjallet/negz.jpg
assets/textures/ryfjallet/negz.jpg
assets/textures/ryfjallet/negz.jpg
  • 2-up
  • Swipe
  • Onion skin
assets/textures/ryfjallet/posx.jpg

1.26 MB | W: | H:

assets/textures/ryfjallet/posx.jpg

319 KB | W: | H:

assets/textures/ryfjallet/posx.jpg
assets/textures/ryfjallet/posx.jpg
assets/textures/ryfjallet/posx.jpg
assets/textures/ryfjallet/posx.jpg
  • 2-up
  • Swipe
  • Onion skin
assets/textures/ryfjallet/posy.jpg

566 KB | W: | H:

assets/textures/ryfjallet/posy.jpg

103 KB | W: | H:

assets/textures/ryfjallet/posy.jpg
assets/textures/ryfjallet/posy.jpg
assets/textures/ryfjallet/posy.jpg
assets/textures/ryfjallet/posy.jpg
  • 2-up
  • Swipe
  • Onion skin
assets/textures/ryfjallet/posz.jpg

1.39 MB | W: | H:

assets/textures/ryfjallet/posz.jpg

333 KB | W: | H:

assets/textures/ryfjallet/posz.jpg
assets/textures/ryfjallet/posz.jpg
assets/textures/ryfjallet/posz.jpg
assets/textures/ryfjallet/posz.jpg
  • 2-up
  • Swipe
  • Onion skin
assets/textures/splash.png

66.1 KB | W: | H:

assets/textures/splash.png

17.8 KB | W: | H:

assets/textures/splash.png
assets/textures/splash.png
assets/textures/splash.png
assets/textures/splash.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -3,15 +3,16 @@
#include <core/objects/skybox.h>
#include <core/rendering/batch_renderer.h>
#include <components/PlayerController.h>
#include <components/PlayerController.h>
#include <core/objects/camera.h>
#include "imgui/imgui.h"
#include "imgui/imgui_glfw.h"
#include "util/files.h"
using namespace glare;
void gui();
void gui(std::vector<std::string> extensions, std::function<void(const fs::path& file)> file_callback);
int main(int argc, char* argv[])
{
......@@ -25,36 +26,55 @@ int main(int argc, char* argv[])
// Render the scene with the pathtracer
core::state::mainLoop([]() {
gui();
gui({".png", ".hdr", ".glsl"}, [](const fs::path& p)
{
});
});
}
void gui()
void gui(std::vector<std::string> extensions, std::function<void(const fs::path& file)> file_callback)
{
static int current_tab = 0;
ImGui::BeginTabbed("Settings", std::array<std::string, 2>{ "First Tab", "Second Tab" }, current_tab, ImVec4(0.4f, 0.3f, 0.1f, 1.f));
ImGui::Begin("Files");
static auto root = files::asset("screenshots");
std::sort(extensions.begin(), extensions.end());
/*ImGui::BeginSelectableTree("My tree");
if(ImGui::SelectableTreeNode("My tree", "Node 0"))
ImGui::BeginChild("full_path", ImVec2(0, 40), false, ImGuiWindowFlags_HorizontalScrollbar);
fs::path curr;
for(auto&& part : root)
{
if (ImGui::SelectableTreeNode("My tree", "Node 342"))
curr /= part;
if(ImGui::Button(part.string().c_str()))
{
if (ImGui::SelectableTreeNode("My tree", "Node 555"))
{
root = curr;
break;
}
ImGui::SameLine();
}
ImGui::EndChild();
ImGui::TreePop();
}
ImGui::Separator();
ImGui::TreePop();
}
if (ImGui::SelectableTreeNode("My tree", "Node 23"))
{
ImGui::BeginChild("files", ImVec2(0, 0));
int i = 0;
for (auto& p : fs::directory_iterator(root)) {
fs::path path = p;
ImGui::TreePop();
bool extended = std::binary_search(extensions.begin(), extensions.end(), path.extension().string());
// Either draw directory button or...
if (is_directory(path) && ImGui::Button(path.filename().string().c_str(), ImVec2(ImGui::GetContentRegionAvailWidth()/(5-(i%5)), 32)))
root = path;
// ... draw a button which loads a dae file.
else if (extended && ImGui::FeatureButton(path.filename().string().c_str(), ImVec2(ImGui::GetContentRegionAvailWidth() / (5 - (i % 5)), 32)))
{
file_callback(path);
}
ImGui::TreePop();
if (i % 5 != 4)
ImGui::SameLine();
i += int(is_directory(path) || extended);
}
ImGui::EndSelectableTree();*/
ImGui::EndTabbed();
ImGui::EndChild();
ImGui::End();
}
\ No newline at end of file
......@@ -31,7 +31,7 @@ enum class RenderMode
// Default paths for easy change access
const fs::path engine_settings_path = files::asset("/preferences/default.xml");
const fs::path pathtracer_settings_path = files::asset("/preferences/pathtracer_default.xml");
const fs::path skybox_files_path = files::asset("/textures/ryfjallet/");
const fs::path skybox_files_path = files::asset("/textures/lycksele2/");
const fs::path env_audio_path = files::asset("/audio/env.wav");
const fs::path startup_scene_path = files::asset("/meshes/scenery/TY_Plane.dae");
......
......@@ -3,6 +3,7 @@
#include <core/time.h>
#include <util/log.h>
#include <imgui/imgui_glfw.h>
#include <string>
namespace glare::component
{
......@@ -30,4 +31,4 @@ namespace glare::component
ImGui::Text((build_type + std::to_string(fps) + "fps | " + std::to_string(frametime) + "ms/Frame").c_str());
ImGui::End();
}
}
\ No newline at end of file
}
......@@ -15,21 +15,21 @@ namespace glare::core
void resetState();
private:
int m_last_program;
int m_last_texture;
int m_last_array_buffer;
int m_last_element_array_buffer;
int m_last_vertex_array;
int m_last_blend_src;
int m_last_blend_dst;
int m_last_blend_equation_rgb;
int m_last_blend_equation_alpha;
int m_last_viewport[4];
float m_last_clear_color[4];
bool m_last_enable_blend;
bool m_last_enable_cull_face;
bool m_last_enable_depth_test;
bool m_last_enable_scissor_test;
int m_last_program = 0;
int m_last_texture = 0;
int m_last_array_buffer = 0;
int m_last_element_array_buffer = 0;
int m_last_vertex_array = 0;
int m_last_blend_src = 0;
int m_last_blend_dst = 0;
int m_last_blend_equation_rgb = 0;
int m_last_blend_equation_alpha = 0;
int m_last_viewport[4] = {0};
float m_last_clear_color[4] = { 0 };
bool m_last_enable_blend = false;
bool m_last_enable_cull_face = false;
bool m_last_enable_depth_test = false;
bool m_last_enable_scissor_test = false;
};
}
......
#ifndef INCLUDE_SHADER_PROGRAM_H
#define INCLUDE_SHADER_PROGRAM_H
#include <cinttypes>
#include <map>
#include <string>
......
......@@ -5,7 +5,6 @@
#include "shader_system.h"
#include <gl/glew.h>
#include <GLFW/glfw3.h>
namespace glare::core
......
......@@ -7,7 +7,6 @@
#include <util/files.h>
#include <util/console.h>
#include <gl/glew.h>
#include "GLFW/glfw3.h"
namespace glare::core
......
......@@ -3,7 +3,6 @@
#include <util/log.h>
#include <core/message_tags.h>
#include <core/time.h>
#include <imgui/imgui_glfw.h>
namespace glare::core
......
......@@ -7,6 +7,7 @@
#include "mesh.h"
#include <core/rendering/batch_render_list.h>
#include <core/rendering/batch_drawable.h>
#include <util/files.h>
namespace glare::core
{
......
......@@ -135,10 +135,10 @@ namespace glare::core
struct LightParameters
{
LightType light_type;
LightType light_type = LightType::ePoint;
LightData data = { 0,0 };
LightParameters() {}
LightParameters() = default;
LightParameters(LightType type, LightData data = { 0, 0 })
: light_type(type), data(data)
......
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