Skip to content

Commit

Permalink
added color controls
Browse files Browse the repository at this point in the history
  • Loading branch information
yugansharora01 committed Sep 30, 2021
1 parent f221fec commit adfa01c
Show file tree
Hide file tree
Showing 33 changed files with 95 additions and 283 deletions.
18 changes: 6 additions & 12 deletions Aurora/Aurora.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@
<ClInclude Include="src\Aurora\AuroraMath.h" />
<ClInclude Include="src\Aurora\Core.h" />
<ClInclude Include="src\Aurora\Core\AuTimer.h" />
<ClInclude Include="src\Aurora\Drawables\Drawable.h" />
<ClInclude Include="src\Aurora\Drawables\Geometry\Cone.h" />
<ClInclude Include="src\Aurora\Drawables\Geometry\Cube.h" />
<ClInclude Include="src\Aurora\Drawables\Geometry\IndexedTriangleList.h" />
Expand All @@ -157,7 +156,6 @@
<ClInclude Include="src\Aurora\Renderer\ConstantBuffers.h" />
<ClInclude Include="src\Aurora\Renderer\Shader.h" />
<ClInclude Include="src\Aurora\Renderer\Texture.h" />
<ClInclude Include="src\Platform\DirectX\Bindable.h" />
<ClInclude Include="src\Aurora\Renderer\BindableBase.h" />
<ClInclude Include="src\Platform\DirectX\D3D11ConstantBuffers.h" />
<ClInclude Include="src\Platform\DirectX\D3D11IndexBuffer.h" />
Expand All @@ -167,7 +165,6 @@
<ClInclude Include="src\Platform\DirectX\D3D11Surface.h" />
<ClInclude Include="src\Platform\DirectX\D3D11Texture.h" />
<ClInclude Include="src\Platform\DirectX\D3D11Topology.h" />
<ClInclude Include="src\Platform\DirectX\D3D11TransformCbuf.h" />
<ClInclude Include="src\Platform\DirectX\D3D11VertexBuffer.h" />
<ClInclude Include="src\Platform\DirectX\D3D11VertexShader.h" />
<ClInclude Include="src\Aurora\EditorLayer.h" />
Expand All @@ -192,7 +189,6 @@
<ItemGroup>
<ClCompile Include="src\Aurora\Application.cpp" />
<ClCompile Include="src\Aurora\Core\AuTimer.cpp" />
<ClCompile Include="src\Aurora\Drawables\Drawable.cpp" />
<ClCompile Include="src\Aurora\Imgui\Imguibulid.cpp" />
<ClCompile Include="src\Aurora\Imgui\ImguiLayer.cpp" />
<ClCompile Include="src\Aurora\Layer.cpp" />
Expand All @@ -203,15 +199,13 @@
<ClCompile Include="src\Aurora\Renderer\ConstantBuffers.cpp" />
<ClCompile Include="src\Aurora\Renderer\Shader.cpp" />
<ClCompile Include="src\Aurora\Renderer\Texture.cpp" />
<ClCompile Include="src\Platform\DirectX\Bindable.cpp" />
<ClCompile Include="src\Platform\DirectX\D3D11IndexBuffer.cpp" />
<ClCompile Include="src\Platform\DirectX\D3D11InputLayout.cpp" />
<ClCompile Include="src\Platform\DirectX\D3D11PixelShader.cpp" />
<ClCompile Include="src\Platform\DirectX\D3D11Sampler.cpp" />
<ClCompile Include="src\Platform\DirectX\D3D11Surface.cpp" />
<ClCompile Include="src\Platform\DirectX\D3D11Texture.cpp" />
<ClCompile Include="src\Platform\DirectX\D3D11Topology.cpp" />
<ClCompile Include="src\Platform\DirectX\D3D11TransformCbuf.cpp" />
<ClCompile Include="src\Platform\DirectX\D3D11VertexBuffer.cpp" />
<ClCompile Include="src\Platform\DirectX\D3D11VertexShader.cpp" />
<ClCompile Include="src\Aurora\EditorLayer.cpp" />
Expand All @@ -229,47 +223,47 @@
</ClCompile>
</ItemGroup>
<ItemGroup>
<FxCompile Include="src\Aurora\shaders\ColorBlendPS.hlsl">
<FxCompile Include="src\Platform\DirectX\shaders\ColorBlendPS.hlsl">
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">4.0</ShaderModel>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Dist|x64'">4.0</ShaderModel>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">4.0</ShaderModel>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Pixel</ShaderType>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Dist|x64'">Pixel</ShaderType>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Pixel</ShaderType>
</FxCompile>
<FxCompile Include="src\Aurora\shaders\ColorBlendVS.hlsl">
<FxCompile Include="src\Platform\DirectX\shaders\ColorBlendVS.hlsl">
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">4.0</ShaderModel>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Dist|x64'">4.0</ShaderModel>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">4.0</ShaderModel>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Vertex</ShaderType>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Dist|x64'">Vertex</ShaderType>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Vertex</ShaderType>
</FxCompile>
<FxCompile Include="src\Aurora\shaders\ColorIndexPS.hlsl">
<FxCompile Include="src\Platform\DirectX\shaders\ColorIndexPS.hlsl">
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">4.0</ShaderModel>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Dist|x64'">4.0</ShaderModel>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">4.0</ShaderModel>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Pixel</ShaderType>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Dist|x64'">Pixel</ShaderType>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Pixel</ShaderType>
</FxCompile>
<FxCompile Include="src\Aurora\shaders\ColorIndexVS.hlsl">
<FxCompile Include="src\Platform\DirectX\shaders\ColorIndexVS.hlsl">
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">4.0</ShaderModel>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Dist|x64'">4.0</ShaderModel>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">4.0</ShaderModel>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Vertex</ShaderType>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Dist|x64'">Vertex</ShaderType>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Vertex</ShaderType>
</FxCompile>
<FxCompile Include="src\Aurora\shaders\TexturePS.hlsl">
<FxCompile Include="src\Platform\DirectX\shaders\TexturePS.hlsl">
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">4.0</ShaderModel>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Dist|x64'">4.0</ShaderModel>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">4.0</ShaderModel>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Pixel</ShaderType>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Dist|x64'">Pixel</ShaderType>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Pixel</ShaderType>
</FxCompile>
<FxCompile Include="src\Aurora\shaders\TextureVS.hlsl">
<FxCompile Include="src\Platform\DirectX\shaders\TextureVS.hlsl">
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">4.0</ShaderModel>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Dist|x64'">4.0</ShaderModel>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">4.0</ShaderModel>
Expand Down
26 changes: 6 additions & 20 deletions Aurora/Aurora.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,6 @@
<ClInclude Include="src\Aurora\Log.h">
<Filter>Aurora</Filter>
</ClInclude>
<ClInclude Include="src\Platform\DirectX\Bindable.h">
<Filter>Aurora\Renderer</Filter>
</ClInclude>
<ClInclude Include="src\Aurora\Renderer\BindableBase.h">
<Filter>Aurora\Renderer</Filter>
</ClInclude>
Expand Down Expand Up @@ -109,9 +106,6 @@
<ClInclude Include="src\Platform\DirectX\D3D11Topology.h">
<Filter>Aurora\Renderer</Filter>
</ClInclude>
<ClInclude Include="src\Platform\DirectX\D3D11TransformCbuf.h">
<Filter>Aurora\Renderer</Filter>
</ClInclude>
<ClInclude Include="src\Platform\DirectX\D3D11VertexBuffer.h">
<Filter>Aurora\Renderer</Filter>
</ClInclude>
Expand Down Expand Up @@ -173,7 +167,6 @@
<ClInclude Include="src\Aurora\Renderer\Bindables.h" />
<ClInclude Include="src\Aurora\Renderer\ConstantBuffers.h" />
<ClInclude Include="src\Aurora\Renderer\Texture.h" />
<ClInclude Include="src\Aurora\Drawables\Drawable.h" />
<ClInclude Include="src\Aurora\Drawables\Geometry\Cone.h" />
<ClInclude Include="src\Aurora\Drawables\Geometry\Cube.h" />
<ClInclude Include="src\Aurora\Drawables\Geometry\Plane.h" />
Expand All @@ -200,9 +193,6 @@
<ClCompile Include="src\Aurora\Log.cpp">
<Filter>Aurora</Filter>
</ClCompile>
<ClCompile Include="src\Platform\DirectX\Bindable.cpp">
<Filter>Aurora\Renderer</Filter>
</ClCompile>
<ClCompile Include="src\Platform\DirectX\D3D11IndexBuffer.cpp">
<Filter>Aurora\Renderer</Filter>
</ClCompile>
Expand All @@ -224,9 +214,6 @@
<ClCompile Include="src\Platform\DirectX\D3D11Topology.cpp">
<Filter>Aurora\Renderer</Filter>
</ClCompile>
<ClCompile Include="src\Platform\DirectX\D3D11TransformCbuf.cpp">
<Filter>Aurora\Renderer</Filter>
</ClCompile>
<ClCompile Include="src\Platform\DirectX\D3D11VertexBuffer.cpp">
<Filter>Aurora\Renderer</Filter>
</ClCompile>
Expand Down Expand Up @@ -268,25 +255,24 @@
<ClCompile Include="src\Aurora\Renderer\Bindables.cpp" />
<ClCompile Include="src\Aurora\Renderer\ConstantBuffers.cpp" />
<ClCompile Include="src\Aurora\Renderer\Texture.cpp" />
<ClCompile Include="src\Aurora\Drawables\Drawable.cpp" />
</ItemGroup>
<ItemGroup>
<FxCompile Include="src\Aurora\shaders\ColorBlendPS.hlsl">
<FxCompile Include="src\Platform\DirectX\shaders\ColorBlendPS.hlsl">
<Filter>Aurora\shaders</Filter>
</FxCompile>
<FxCompile Include="src\Aurora\shaders\ColorBlendVS.hlsl">
<FxCompile Include="src\Platform\DirectX\shaders\ColorBlendVS.hlsl">
<Filter>Aurora\shaders</Filter>
</FxCompile>
<FxCompile Include="src\Aurora\shaders\ColorIndexPS.hlsl">
<FxCompile Include="src\Platform\DirectX\shaders\ColorIndexPS.hlsl">
<Filter>Aurora\shaders</Filter>
</FxCompile>
<FxCompile Include="src\Aurora\shaders\ColorIndexVS.hlsl">
<FxCompile Include="src\Platform\DirectX\shaders\ColorIndexVS.hlsl">
<Filter>Aurora\shaders</Filter>
</FxCompile>
<FxCompile Include="src\Aurora\shaders\TexturePS.hlsl">
<FxCompile Include="src\Platform\DirectX\shaders\TexturePS.hlsl">
<Filter>Aurora\shaders</Filter>
</FxCompile>
<FxCompile Include="src\Aurora\shaders\TextureVS.hlsl">
<FxCompile Include="src\Platform\DirectX\shaders\TextureVS.hlsl">
<Filter>Aurora\shaders</Filter>
</FxCompile>
</ItemGroup>
Expand Down
13 changes: 9 additions & 4 deletions Aurora/imgui.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,18 @@ Size=550,680
Collapsed=0

[Window][Background Colors]
Pos=60,60
Size=75,123
Pos=0,0
Size=160,150
Collapsed=0

[Window][Pos]
Pos=60,60
Size=47,100
Pos=0,150
Size=160,150
Collapsed=0

[Window][box]
Pos=393,75
Size=355,194
Collapsed=0

[Docking][Data]
Expand Down
32 changes: 0 additions & 32 deletions Aurora/src/Aurora/Drawables/Drawable.cpp

This file was deleted.

32 changes: 0 additions & 32 deletions Aurora/src/Aurora/Drawables/Drawable.h

This file was deleted.

11 changes: 3 additions & 8 deletions Aurora/src/Aurora/EditorLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ namespace Aurora {

static ImVec4 color = {};

ImGui::SetNextWindowPos(ImVec2(lastwindowposition.x, lastwindowposition.y),ImGuiCond_Once);
ImGui::SetNextWindowPos(ImVec2((float)lastwindowposition.x, (float)lastwindowposition.y),ImGuiCond_Once);

lastwindowposition.z -= lastwindowposition.x; //Full screen width
lastwindowposition.z /= 5; //20% of full width
Expand All @@ -84,15 +84,10 @@ namespace Aurora {



ImGui::SetNextWindowPos(ImVec2(lastwindowposition.x , lastwindowposition.y + lastwindowposition.w), ImGuiCond_Once);
//ImGui::SetNextWindowPos(ImVec2(lastwindowposition.x , lastwindowposition.y + lastwindowposition.w), ImGuiCond_Once);

ImGui::SetNextWindowSize(ImVec2(lastwindowposition.z, lastwindowposition.w), ImGuiCond_Once);
//ImGui::SetNextWindowSize(ImVec2(lastwindowposition.z, lastwindowposition.w), ImGuiCond_Once);


ImGui::Begin("Pos");
ImGui::SliderFloat("x", &x, -100.0f, 100.0f);
ImGui::SliderFloat("y", &y, -100.0f, 100.0f);
ImGui::SliderFloat("z", &z, -100.0f, 100.0f);
ImGui::End();
}
}
2 changes: 1 addition & 1 deletion Aurora/src/Aurora/Renderer/ConstantBuffers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Aurora {


std::shared_ptr<PixelConstantBuffer> PixelConstantBuffer::Create(std::array<DirectX::XMFLOAT3, 8> facecolors)
std::shared_ptr<PixelConstantBuffer> PixelConstantBuffer::Create(std::array<DirectX::XMFLOAT4, 8> facecolors)
{
return std::make_shared<D3D11PixelConstantBuffer>(facecolors);
}
Expand Down
14 changes: 2 additions & 12 deletions Aurora/src/Aurora/Renderer/ConstantBuffers.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Aurora {
virtual void Unbind() = 0;


static std::shared_ptr<PixelConstantBuffer> Create(std::array<DirectX::XMFLOAT3, 8> facecolors);
static std::shared_ptr<PixelConstantBuffer> Create(std::array<DirectX::XMFLOAT4, 8> facecolors);

};

Expand All @@ -28,15 +28,5 @@ namespace Aurora {
static std::shared_ptr<VertexConstantBuffer> Create(DirectX::XMMATRIX mat);
};

/*class TransformCBuf : public Bindables
{
public:
virtual ~VertexConstantBuffer() = default;
virtual void Bind() = 0;
virtual void Unbind() = 0;
static std::shared_ptr<VertexConstantBuffer> Create(DirectX::XMMATRIX mat);
};*/

}
5 changes: 5 additions & 0 deletions Aurora/src/Aurora/Renderer/Shader.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

namespace Aurora {

class Shader : Bindables
{

};

class PixelShader : public Bindables
{
public:
Expand Down
25 changes: 0 additions & 25 deletions Aurora/src/Platform/DirectX/Bindable.cpp

This file was deleted.

19 changes: 0 additions & 19 deletions Aurora/src/Platform/DirectX/Bindable.h

This file was deleted.

Loading

0 comments on commit adfa01c

Please sign in to comment.