Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
WinRT: implemented SDL_RenderFillRect and SDL_RenderFillRects for the…
Browse files Browse the repository at this point in the history
… D3D 11.1 renderer
  • Loading branch information
DavidLudwig committed Feb 16, 2013
1 parent 5095922 commit 177aa98
Show file tree
Hide file tree
Showing 9 changed files with 199 additions and 92 deletions.
9 changes: 7 additions & 2 deletions VisualC-WinPhone/SDL/SDL_VS2012-WinPhone.vcxproj
Expand Up @@ -378,8 +378,13 @@
</ClCompile>
</ItemGroup>
<ItemGroup>
<FxCompile Include="..\..\src\video\windowsrt\SimplePixelShader.hlsl">
<FileType>Document</FileType>
<FxCompile Include="..\..\src\render\direct3d11\SDL_D3D11_PixelShader_FixedColor.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Pixel</ShaderType>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">Pixel</ShaderType>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Pixel</ShaderType>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Pixel</ShaderType>
</FxCompile>
<FxCompile Include="..\..\src\render\direct3d11\SDL_D3D11_PixelShader_TextureCopy.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Pixel</ShaderType>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">Pixel</ShaderType>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Pixel</ShaderType>
Expand Down
7 changes: 5 additions & 2 deletions VisualC-WinPhone/SDL/SDL_VS2012-WinPhone.vcxproj.filters
Expand Up @@ -598,10 +598,13 @@
</ClCompile>
</ItemGroup>
<ItemGroup>
<FxCompile Include="..\..\src\video\windowsrt\SimplePixelShader.hlsl">
<FxCompile Include="..\..\src\video\windowsrt\SimpleVertexShader.hlsl">
<Filter>GPU Shaders</Filter>
</FxCompile>
<FxCompile Include="..\..\src\video\windowsrt\SimpleVertexShader.hlsl">
<FxCompile Include="..\..\src\render\direct3d11\SDL_D3D11_PixelShader_TextureCopy.hlsl">
<Filter>GPU Shaders</Filter>
</FxCompile>
<FxCompile Include="..\..\src\render\direct3d11\SDL_D3D11_PixelShader_FixedColor.hlsl">
<Filter>GPU Shaders</Filter>
</FxCompile>
</ItemGroup>
Expand Down
11 changes: 9 additions & 2 deletions VisualC-WinRT/SDL/SDL_VS2012-WinRT.vcxproj
Expand Up @@ -281,11 +281,18 @@
<ClInclude Include="..\..\src\video\windowsrt\SDL_winrtvideo.h" />
</ItemGroup>
<ItemGroup>
<FxCompile Include="..\..\src\video\windowsrt\SimplePixelShader.hlsl">
<FileType>Document</FileType>
<FxCompile Include="..\..\src\render\direct3d11\SDL_D3D11_PixelShader_FixedColor.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Pixel</ShaderType>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">Pixel</ShaderType>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Pixel</ShaderType>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Pixel</ShaderType>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Pixel</ShaderType>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Pixel</ShaderType>
</FxCompile>
<FxCompile Include="..\..\src\render\direct3d11\SDL_D3D11_PixelShader_TextureCopy.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Pixel</ShaderType>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">Pixel</ShaderType>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Pixel</ShaderType>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Pixel</ShaderType>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Pixel</ShaderType>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Pixel</ShaderType>
Expand Down
7 changes: 5 additions & 2 deletions VisualC-WinRT/SDL/SDL_VS2012-WinRT.vcxproj.filters
@@ -1,10 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<FxCompile Include="..\..\src\video\windowsrt\SimplePixelShader.hlsl">
<FxCompile Include="..\..\src\video\windowsrt\SimpleVertexShader.hlsl">
<Filter>GPU Shaders</Filter>
</FxCompile>
<FxCompile Include="..\..\src\video\windowsrt\SimpleVertexShader.hlsl">
<FxCompile Include="..\..\src\render\direct3d11\SDL_D3D11_PixelShader_TextureCopy.hlsl">
<Filter>GPU Shaders</Filter>
</FxCompile>
<FxCompile Include="..\..\src\render\direct3d11\SDL_D3D11_PixelShader_FixedColor.hlsl">
<Filter>GPU Shaders</Filter>
</FxCompile>
</ItemGroup>
Expand Down
12 changes: 12 additions & 0 deletions src/render/direct3d11/SDL_D3D11_PixelShader_FixedColor.hlsl
@@ -0,0 +1,12 @@

struct PixelShaderInput
{
float4 pos : SV_POSITION;
float2 tex : TEXCOORD0;
float4 color : COLOR0;
};

float4 main(PixelShaderInput input) : SV_TARGET
{
return input.color;
}
Expand Up @@ -4,12 +4,11 @@ SamplerState theSampler : register(s0);
struct PixelShaderInput
{
float4 pos : SV_POSITION;

float2 tex : TEXCOORD0;
float4 color : COLOR0;
};

float4 main(PixelShaderInput input) : SV_TARGET
{
//return float4(input.color,1.0f);
return theTexture.Sample(theSampler, input.tex);
}

0 comments on commit 177aa98

Please sign in to comment.