Arnas Puidokas

Graphics Programmer Portfolio

🏠 Home ⭐ Best Project 📁 All Projects 📰 All Blogs
DEVELOPMENT BLOG

// Dev Blog #1 - Hyperion: Initial Start

An introduction to Hyperion and its initial steps in setting up the project.

19.11.2026 7 MIN READ
C++ DirectX 11 Graphics Programming Engine Development

Introduction

This will be the first development blog of my personal project Hyperion. The goal of these development blogs is to document my thought process when working on the created systems, and challenges encountered along the way.


Initial Goal Change

Initially the goal of the project was to present a volumetric lighting system at GradEx, which is a showcase of student works my university hosts every year to industry people. However, as I developing in preparation for the showcase, this project felt perfect to upkeep my skills across multiple areas of programming, with graphics and engine being the primary focus.


Initial Steps

While I already had a project based on volumetric lighting in place, it needed a lot of work to be presentable for GradEx, and to that I restarted the project from scratch. Main reason being there was a lot of conflict while working on the project previously, this was due to using a preexisting framework and building the volumetric lighting system on top when that wasn’t the intended purpose of the framework.


Windows Creation and DirectX 11 Setup

To do this task I had around two weeks to build up a framework from scratch and make an entirely new volumetric lighting system. To begin I took this step by step with a window creation using Chris Hecker’s guide[1] from 2013. Followed by setting up DirectX 11 as the engine’s main graphics API due to my experiences with it, and potential for other graphics APIs to be set up down the line.

Originally, it would be set to just return the DirectX 11 renderer, but later on I added an option to choose which graphics API you want.

"Application.cpp"
m_renderer = BaseRenderer::CreateRendererObject();
result = m_renderer->Initialise(windowHandle);

"BaseRenderer.cpp"
BaseRenderer* BaseRenderer::CreateRendererObject()
{
    return new DX11Renderer();
}
"Application.cpp"
m_renderer = BaseRenderer::CreateRendererObject(BaseRenderer::API::DX11);
result = m_renderer->Initialise(windowHandle);

"BaseRenderer.cpp"
BaseRenderer* BaseRenderer::CreateRendererObject(API api)
{
    if (api == API::DX11)
    {
        return new DX11Renderer();
    }
    else if (api == API::DX12)
    {
        return new DX12Renderer();
    }

    return nullptr;
}


Figure 1: This was the result of the initial pop up window with DirectX 11 clearing the screen to a blue colour. (Figure is clickable).


ImGui and Object Loader

Following that I set up more basics like ImGui[2] so I can interact with the application, an object loader[3] to load in models, and a DDS texture loader[4] so that those models can be textured. While this wasn’t difficult to do I noticed problems with the texture not matching correctly to the UV texture.


Figure 2: Had objects loading, but noticed the textures not matching to the UV texture correctly. (Figure is clickable).


Scene Management

Before moving on, I wanted to improve the current scene management of the project, since currently the application would load the game object through Scene, which handled the ownership of any created game objects. Followed by the Renderer creating a DDS texture and applying it to any object on screen.

"Application.cpp"
m_scene->LoadGameObjectFromOBJ("Assets/cat.obj", m_renderer->GetDevice());

"DX11Renderer.cpp"
hr = DirectX::CreateDDSTextureFromFile(m_d3dDevice, L"Assets\\Textures\\catColour.dds", nullptr, &texture);
LogHR("CreateDDSTextureFromFile(catColour)", hr);

m_immediateContext->PSSetShaderResources(0, 1, &texture);


Instead of doing that, the Scene would still manage the creation and ownership of game objects, while Application would now have access to game objects and the ability to change their properties without owning them, through the raw pointer that was returned.

"Application.cpp"
m_buildings = m_scene->LoadGameObjectFromOBJ("Assets/Buildings.obj", m_renderer->GetDevice());
m_buildings->SetPosition({ 5, -25, 50, 1 });
m_buildings->SetRotation({ 0, 0, 0, 1 });
m_buildings->SetScale({ 2, 2, 2, 1 });
m_buildings->GetTexture().diffuse = m_textureManager->LoadTexture("Assets\\Textures\\buildingDiffuse.dds", m_renderer->GetDevice());

"Scene.cpp"
void Scene::Update(float deltaTime)
{
	for (auto& gameObject : m_gameObjects)
	{
		gameObject->Update(deltaTime);
	}
}


At this stage, I was also able to figure out a fix for the textures not being loaded in correctly. This stems from how different graphic APIs use different texture coordinate origins. By flipping the Y texture coordinates when building the mesh, it fixes that problem.

"MeshLoader.cpp"
// Broken for DX11
if (!attrib.texcoords.empty())
{
    v.TexCoord =
    {
        attrib.texcoords[2 * idx.texcoord_index + 0],
        attrib.texcoords[2 * idx.texcoord_index + 1]
    };
}

// Fixed
if (!attrib.texcoords.empty())
{
    v.TexCoord =
    {
        attrib.texcoords[2 * idx.texcoord_index + 0],
        attrib.texcoords[2 * idx.texcoord_index + 1]
    };

    v.TexCoord.y = 1.0f - v.TexCoord.y;
}


Figure 3: Multiple objects rendered and fixed the problem with textures. (Figure is clickable).


What’s Next

This went over a good portion of my initial steps in creating this project, with only a minor hiccup that caused some time figuring as to why it wasn’t working. My next steps were implementing the volumetric lighting system I previously created while also adding any additional features required to showcase the project in a better light for GradEx.


Assets Used

Buildings - Link


References

1. Chris Hecker (2013). Lesson 3: Creating a window. [online] DirectXTutorial.com. Available at: http://www.directxtutorial.com/Lesson.aspx?lessonid=9-1-3.

2. ocornut (2019). Ocornut/Imgui. [online] GitHub. [online] Available at: https://github.com/ocornut/imgui.

3. GitHub. (2024). Tinyobjloader/tinyobjloader. [online] Available at: https://github.com/tinyobjloader/tinyobjloader.

4. Github.com. (2026). Page restricted. [online] Available at: https://github.com/microsoft/DirectXTK/wiki/DDSTextureLoader.


← BACK TO HOME ← BACK TO BLOGS