UWP works

This commit is contained in:
BADIM-PC\Vadim 2018-02-21 20:07:07 +03:00
parent f7da6b7f51
commit 551d333511
13 changed files with 357 additions and 134 deletions

7
.gitignore vendored
View File

@ -115,3 +115,10 @@ build/windows/sdl-gpu/Debug/
build/windows/sdl-gpu/Debug Pro/ build/windows/sdl-gpu/Debug Pro/
build/windows/sdl-gpu/Release/ build/windows/sdl-gpu/Release/
build/windows/sdl-gpu/Release Pro/ build/windows/sdl-gpu/Release Pro/
build/uwp/sdl-gpu/Debug/
build/uwp/sdl-gpu/Debug Pro/
build/uwp/sdl-gpu/Release/
build/uwp/sdl-gpu/Release Pro/
build/uwp/sdl-gpu/ARM/
build/uwp/sdl-gpu/x64/
build/uwp/tic/packages/

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ANGLE.WindowsStore" version="2.1.13" targetFramework="native" />
</packages>

View File

@ -0,0 +1,241 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\3rd-party\sdl-gpu\src\externals\stb_image\stb_image.c" />
<ClCompile Include="..\..\..\3rd-party\sdl-gpu\src\externals\stb_image_write\stb_image_write.c" />
<ClCompile Include="..\..\..\3rd-party\sdl-gpu\src\renderer_GLES_2.c" />
<ClCompile Include="..\..\..\3rd-party\sdl-gpu\src\SDL_gpu.c" />
<ClCompile Include="..\..\..\3rd-party\sdl-gpu\src\SDL_gpu_matrix.c" />
<ClCompile Include="..\..\..\3rd-party\sdl-gpu\src\SDL_gpu_renderer.c" />
<ClCompile Include="..\..\..\3rd-party\sdl-gpu\src\SDL_gpu_shapes.c" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\3rd-party\SDL2-2.0.7\VisualC-WinRT\UWP_VS2015\SDL-UWP.vcxproj">
<Project>{89e9b32e-a86a-47c3-a948-d2b1622925ce}</Project>
</ProjectReference>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{3d303f81-f49f-4d63-be32-370c07e271b7}</ProjectGuid>
<Keyword>DynamicLibrary</Keyword>
<RootNamespace>sdl_gpu</RootNamespace>
<DefaultLanguage>en-US</DefaultLanguage>
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
<AppContainerApplication>true</AppContainerApplication>
<ApplicationType>Windows Store</ApplicationType>
<WindowsTargetPlatformVersion>10.0.14393.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion>10.0.14393.0</WindowsTargetPlatformMinVersion>
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<CompileAsWinRT>false</CompileAsWinRT>
<PreprocessorDefinitions>_WINDOWS;GLEW_STATIC;SDL_GPU_DISABLE_GLES_1;SDL_GPU_DISABLE_GLES_3;SDL_GPU_DISABLE_OPENGL;STBI_FAILURE_USERMSG;SDL_GPU_USE_BUFFER_RESET;GL_GLEXT_PROTOTYPES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\..\3rd-party\SDL2-2.0.7\include;..\..\..\3rd-party\sdl-gpu\include;..\..\..\3rd-party\sdl-gpu\src;..\..\..\3rd-party\sdl-gpu\src\externals\glew;..\..\..\3rd-party\sdl-gpu\src\externals\glew\GL;..\..\..\3rd-party\sdl-gpu\src\externals\stb_image;..\..\..\3rd-party\sdl-gpu\src\externals\stb_image_write;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<SDLCheck>false</SDLCheck>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
<AdditionalDependencies>WindowsApp.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<CompileAsWinRT>false</CompileAsWinRT>
<PreprocessorDefinitions>_WINDOWS;GLEW_STATIC;SDL_GPU_DISABLE_GLES_1;SDL_GPU_DISABLE_GLES_3;SDL_GPU_DISABLE_OPENGL;STBI_FAILURE_USERMSG;SDL_GPU_USE_BUFFER_RESET;GL_GLEXT_PROTOTYPES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\..\3rd-party\SDL2-2.0.7\include;..\..\..\3rd-party\sdl-gpu\include;..\..\..\3rd-party\sdl-gpu\src;..\..\..\3rd-party\sdl-gpu\src\externals\glew;..\..\..\3rd-party\sdl-gpu\src\externals\glew\GL;..\..\..\3rd-party\sdl-gpu\src\externals\stb_image;..\..\..\3rd-party\sdl-gpu\src\externals\stb_image_write;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<SDLCheck>false</SDLCheck>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
<AdditionalDependencies>WindowsApp.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|arm'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<CompileAsWinRT>false</CompileAsWinRT>
<PreprocessorDefinitions>_WINDOWS;GLEW_STATIC;SDL_GPU_DISABLE_GLES_1;SDL_GPU_DISABLE_GLES_3;SDL_GPU_DISABLE_OPENGL;STBI_FAILURE_USERMSG;SDL_GPU_USE_BUFFER_RESET;GL_GLEXT_PROTOTYPES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\..\3rd-party\SDL2-2.0.7\include;..\..\..\3rd-party\sdl-gpu\include;..\..\..\3rd-party\sdl-gpu\src;..\..\..\3rd-party\sdl-gpu\src\externals\glew;..\..\..\3rd-party\sdl-gpu\src\externals\glew\GL;..\..\..\3rd-party\sdl-gpu\src\externals\stb_image;..\..\..\3rd-party\sdl-gpu\src\externals\stb_image_write;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<SDLCheck>false</SDLCheck>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
<AdditionalDependencies>WindowsApp.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|arm'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<CompileAsWinRT>false</CompileAsWinRT>
<PreprocessorDefinitions>_WINDOWS;GLEW_STATIC;SDL_GPU_DISABLE_GLES_1;SDL_GPU_DISABLE_GLES_3;SDL_GPU_DISABLE_OPENGL;STBI_FAILURE_USERMSG;SDL_GPU_USE_BUFFER_RESET;GL_GLEXT_PROTOTYPES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\..\3rd-party\SDL2-2.0.7\include;..\..\..\3rd-party\sdl-gpu\include;..\..\..\3rd-party\sdl-gpu\src;..\..\..\3rd-party\sdl-gpu\src\externals\glew;..\..\..\3rd-party\sdl-gpu\src\externals\glew\GL;..\..\..\3rd-party\sdl-gpu\src\externals\stb_image;..\..\..\3rd-party\sdl-gpu\src\externals\stb_image_write;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<SDLCheck>false</SDLCheck>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
<AdditionalDependencies>WindowsApp.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<CompileAsWinRT>false</CompileAsWinRT>
<PreprocessorDefinitions>_WINDOWS;GLEW_STATIC;SDL_GPU_DISABLE_GLES_1;SDL_GPU_DISABLE_GLES_3;SDL_GPU_DISABLE_OPENGL;STBI_FAILURE_USERMSG;SDL_GPU_USE_BUFFER_RESET;GL_GLEXT_PROTOTYPES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\..\3rd-party\SDL2-2.0.7\include;..\..\..\3rd-party\sdl-gpu\include;..\..\..\3rd-party\sdl-gpu\src;..\..\..\3rd-party\sdl-gpu\src\externals\glew;..\..\..\3rd-party\sdl-gpu\src\externals\glew\GL;..\..\..\3rd-party\sdl-gpu\src\externals\stb_image;..\..\..\3rd-party\sdl-gpu\src\externals\stb_image_write;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<SDLCheck>false</SDLCheck>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
<AdditionalDependencies>WindowsApp.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<CompileAsWinRT>false</CompileAsWinRT>
<PreprocessorDefinitions>_WINDOWS;GLEW_STATIC;SDL_GPU_DISABLE_GLES_1;SDL_GPU_DISABLE_GLES_3;SDL_GPU_DISABLE_OPENGL;STBI_FAILURE_USERMSG;SDL_GPU_USE_BUFFER_RESET;GL_GLEXT_PROTOTYPES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\..\3rd-party\SDL2-2.0.7\include;..\..\..\3rd-party\sdl-gpu\include;..\..\..\3rd-party\sdl-gpu\src;..\..\..\3rd-party\sdl-gpu\src\externals\glew;..\..\..\3rd-party\sdl-gpu\src\externals\glew\GL;..\..\..\3rd-party\sdl-gpu\src\externals\stb_image;..\..\..\3rd-party\sdl-gpu\src\externals\stb_image_write;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<SDLCheck>false</SDLCheck>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
<AdditionalDependencies>WindowsApp.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\tic\packages\ANGLE.WindowsStore.2.1.13\build\native\ANGLE.WindowsStore.targets" Condition="Exists('..\tic\packages\ANGLE.WindowsStore.2.1.13\build\native\ANGLE.WindowsStore.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\tic\packages\ANGLE.WindowsStore.2.1.13\build\native\ANGLE.WindowsStore.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\tic\packages\ANGLE.WindowsStore.2.1.13\build\native\ANGLE.WindowsStore.targets'))" />
</Target>
</Project>

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="src">
<UniqueIdentifier>{d9d32195-021b-46b4-8ea0-ab03b10402b7}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\3rd-party\sdl-gpu\src\externals\stb_image_write\stb_image_write.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\3rd-party\sdl-gpu\src\externals\stb_image\stb_image.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\3rd-party\sdl-gpu\src\SDL_gpu_shapes.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\3rd-party\sdl-gpu\src\SDL_gpu.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\3rd-party\sdl-gpu\src\SDL_gpu_matrix.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\3rd-party\sdl-gpu\src\SDL_gpu_renderer.c">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\3rd-party\sdl-gpu\src\renderer_GLES_2.c">
<Filter>src</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
</Project>

View File

@ -19,6 +19,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wren", "..\wren\wren.vcxpro
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "studio", "..\studio\studio.vcxproj", "{6A22403A-6CF5-49F2-A012-EC04C9496306}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "studio", "..\studio\studio.vcxproj", "{6A22403A-6CF5-49F2-A012-EC04C9496306}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sdl-gpu", "..\sdl-gpu\sdl-gpu.vcxproj", "{3D303F81-F49F-4D63-BE32-370C07E271B7}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM = Debug|ARM Debug|ARM = Debug|ARM
@ -131,6 +133,18 @@ Global
{6A22403A-6CF5-49F2-A012-EC04C9496306}.Release|x64.Build.0 = Release|x64 {6A22403A-6CF5-49F2-A012-EC04C9496306}.Release|x64.Build.0 = Release|x64
{6A22403A-6CF5-49F2-A012-EC04C9496306}.Release|x86.ActiveCfg = Release|Win32 {6A22403A-6CF5-49F2-A012-EC04C9496306}.Release|x86.ActiveCfg = Release|Win32
{6A22403A-6CF5-49F2-A012-EC04C9496306}.Release|x86.Build.0 = Release|Win32 {6A22403A-6CF5-49F2-A012-EC04C9496306}.Release|x86.Build.0 = Release|Win32
{3D303F81-F49F-4D63-BE32-370C07E271B7}.Debug|ARM.ActiveCfg = Debug|ARM
{3D303F81-F49F-4D63-BE32-370C07E271B7}.Debug|ARM.Build.0 = Debug|ARM
{3D303F81-F49F-4D63-BE32-370C07E271B7}.Debug|x64.ActiveCfg = Debug|x64
{3D303F81-F49F-4D63-BE32-370C07E271B7}.Debug|x64.Build.0 = Debug|x64
{3D303F81-F49F-4D63-BE32-370C07E271B7}.Debug|x86.ActiveCfg = Debug|Win32
{3D303F81-F49F-4D63-BE32-370C07E271B7}.Debug|x86.Build.0 = Debug|Win32
{3D303F81-F49F-4D63-BE32-370C07E271B7}.Release|ARM.ActiveCfg = Release|ARM
{3D303F81-F49F-4D63-BE32-370C07E271B7}.Release|ARM.Build.0 = Release|ARM
{3D303F81-F49F-4D63-BE32-370C07E271B7}.Release|x64.ActiveCfg = Release|x64
{3D303F81-F49F-4D63-BE32-370C07E271B7}.Release|x64.Build.0 = Release|x64
{3D303F81-F49F-4D63-BE32-370C07E271B7}.Release|x86.ActiveCfg = Release|Win32
{3D303F81-F49F-4D63-BE32-370C07E271B7}.Release|x86.Build.0 = Release|Win32
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

View File

@ -109,7 +109,7 @@
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings> <DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
<CompileAsWinRT>false</CompileAsWinRT> <CompileAsWinRT>false</CompileAsWinRT>
<PrecompiledHeader>NotUsing</PrecompiledHeader> <PrecompiledHeader>NotUsing</PrecompiledHeader>
<AdditionalIncludeDirectories>..\include;..\..\..\include;..\..\..\3rd-party\lua-5.3.1\src;..\..\..\3rd-party\giflib-5.1.4\lib;..\..\..\3rd-party\SDL2-2.0.7\include;..\..\..\3rd-party\zlib-1.2.8;..\..\..\3rd-party\SDL2_net-2.0.1;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\include;..\..\..\include;..\..\..\3rd-party\lua-5.3.1\src;..\..\..\3rd-party\giflib-5.1.4\lib;..\..\..\3rd-party\SDL2-2.0.7\include;..\..\..\3rd-party\sdl-gpu\include;..\..\..\3rd-party\zlib-1.2.8;..\..\..\3rd-party\SDL2_net-2.0.1;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<BufferSecurityCheck> <BufferSecurityCheck>
</BufferSecurityCheck> </BufferSecurityCheck>
<PreprocessorDefinitions>_WINSOCK_DEPRECATED_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_5_2;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_WINSOCK_DEPRECATED_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_5_2;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions)</PreprocessorDefinitions>
@ -125,7 +125,7 @@
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings> <DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
<CompileAsWinRT>false</CompileAsWinRT> <CompileAsWinRT>false</CompileAsWinRT>
<PrecompiledHeader>NotUsing</PrecompiledHeader> <PrecompiledHeader>NotUsing</PrecompiledHeader>
<AdditionalIncludeDirectories>..\include;..\..\..\include;..\..\..\3rd-party\lua-5.3.1\src;..\..\..\3rd-party\giflib-5.1.4\lib;..\..\..\3rd-party\SDL2-2.0.7\include;..\..\..\3rd-party\zlib-1.2.8;..\..\..\3rd-party\SDL2_net-2.0.1;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\include;..\..\..\include;..\..\..\3rd-party\lua-5.3.1\src;..\..\..\3rd-party\giflib-5.1.4\lib;..\..\..\3rd-party\SDL2-2.0.7\include;..\..\..\3rd-party\sdl-gpu\include;..\..\..\3rd-party\zlib-1.2.8;..\..\..\3rd-party\SDL2_net-2.0.1;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<BufferSecurityCheck> <BufferSecurityCheck>
</BufferSecurityCheck> </BufferSecurityCheck>
<PreprocessorDefinitions>_WINSOCK_DEPRECATED_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_5_2;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_WINSOCK_DEPRECATED_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_5_2;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions)</PreprocessorDefinitions>
@ -141,7 +141,7 @@
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings> <DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
<CompileAsWinRT>false</CompileAsWinRT> <CompileAsWinRT>false</CompileAsWinRT>
<PrecompiledHeader>NotUsing</PrecompiledHeader> <PrecompiledHeader>NotUsing</PrecompiledHeader>
<AdditionalIncludeDirectories>..\include;..\..\..\include;..\..\..\3rd-party\lua-5.3.1\src;..\..\..\3rd-party\giflib-5.1.4\lib;..\..\..\3rd-party\SDL2-2.0.7\include;..\..\..\3rd-party\zlib-1.2.8;..\..\..\3rd-party\SDL2_net-2.0.1;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\include;..\..\..\include;..\..\..\3rd-party\lua-5.3.1\src;..\..\..\3rd-party\giflib-5.1.4\lib;..\..\..\3rd-party\SDL2-2.0.7\include;..\..\..\3rd-party\sdl-gpu\include;..\..\..\3rd-party\zlib-1.2.8;..\..\..\3rd-party\SDL2_net-2.0.1;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<BufferSecurityCheck> <BufferSecurityCheck>
</BufferSecurityCheck> </BufferSecurityCheck>
<PreprocessorDefinitions>_WINSOCK_DEPRECATED_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_5_2;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_WINSOCK_DEPRECATED_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_5_2;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@ -157,7 +157,7 @@
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings> <DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
<CompileAsWinRT>false</CompileAsWinRT> <CompileAsWinRT>false</CompileAsWinRT>
<PrecompiledHeader>NotUsing</PrecompiledHeader> <PrecompiledHeader>NotUsing</PrecompiledHeader>
<AdditionalIncludeDirectories>..\include;..\..\..\include;..\..\..\3rd-party\lua-5.3.1\src;..\..\..\3rd-party\giflib-5.1.4\lib;..\..\..\3rd-party\SDL2-2.0.7\include;..\..\..\3rd-party\zlib-1.2.8;..\..\..\3rd-party\SDL2_net-2.0.1;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\include;..\..\..\include;..\..\..\3rd-party\lua-5.3.1\src;..\..\..\3rd-party\giflib-5.1.4\lib;..\..\..\3rd-party\SDL2-2.0.7\include;..\..\..\3rd-party\sdl-gpu\include;..\..\..\3rd-party\zlib-1.2.8;..\..\..\3rd-party\SDL2_net-2.0.1;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<BufferSecurityCheck> <BufferSecurityCheck>
</BufferSecurityCheck> </BufferSecurityCheck>
<PreprocessorDefinitions>_WINSOCK_DEPRECATED_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_5_2;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_WINSOCK_DEPRECATED_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_5_2;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@ -173,7 +173,7 @@
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings> <DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
<CompileAsWinRT>false</CompileAsWinRT> <CompileAsWinRT>false</CompileAsWinRT>
<PrecompiledHeader>NotUsing</PrecompiledHeader> <PrecompiledHeader>NotUsing</PrecompiledHeader>
<AdditionalIncludeDirectories>..\include;..\..\..\include;..\..\..\3rd-party\lua-5.3.1\src;..\..\..\3rd-party\giflib-5.1.4\lib;..\..\..\3rd-party\SDL2-2.0.7\include;..\..\..\3rd-party\zlib-1.2.8;..\..\..\3rd-party\SDL2_net-2.0.1;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\include;..\..\..\include;..\..\..\3rd-party\lua-5.3.1\src;..\..\..\3rd-party\giflib-5.1.4\lib;..\..\..\3rd-party\SDL2-2.0.7\include;..\..\..\3rd-party\sdl-gpu\include;..\..\..\3rd-party\zlib-1.2.8;..\..\..\3rd-party\SDL2_net-2.0.1;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<BufferSecurityCheck> <BufferSecurityCheck>
</BufferSecurityCheck> </BufferSecurityCheck>
<PreprocessorDefinitions>_WINSOCK_DEPRECATED_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_5_2;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_WINSOCK_DEPRECATED_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_5_2;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@ -189,7 +189,7 @@
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings> <DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
<CompileAsWinRT>false</CompileAsWinRT> <CompileAsWinRT>false</CompileAsWinRT>
<PrecompiledHeader>NotUsing</PrecompiledHeader> <PrecompiledHeader>NotUsing</PrecompiledHeader>
<AdditionalIncludeDirectories>..\include;..\..\..\include;..\..\..\3rd-party\lua-5.3.1\src;..\..\..\3rd-party\giflib-5.1.4\lib;..\..\..\3rd-party\SDL2-2.0.7\include;..\..\..\3rd-party\zlib-1.2.8;..\..\..\3rd-party\SDL2_net-2.0.1;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\include;..\..\..\include;..\..\..\3rd-party\lua-5.3.1\src;..\..\..\3rd-party\giflib-5.1.4\lib;..\..\..\3rd-party\SDL2-2.0.7\include;..\..\..\3rd-party\sdl-gpu\include;..\..\..\3rd-party\zlib-1.2.8;..\..\..\3rd-party\SDL2_net-2.0.1;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<BufferSecurityCheck> <BufferSecurityCheck>
</BufferSecurityCheck> </BufferSecurityCheck>
<PreprocessorDefinitions>_WINSOCK_DEPRECATED_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_5_2;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_WINSOCK_DEPRECATED_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_5_2;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@ -219,6 +219,9 @@
<ProjectReference Include="..\..\..\3rd-party\SDL2-2.0.7\VisualC-WinRT\UWP_VS2015\SDL-UWP.vcxproj"> <ProjectReference Include="..\..\..\3rd-party\SDL2-2.0.7\VisualC-WinRT\UWP_VS2015\SDL-UWP.vcxproj">
<Project>{89e9b32e-a86a-47c3-a948-d2b1622925ce}</Project> <Project>{89e9b32e-a86a-47c3-a948-d2b1622925ce}</Project>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\sdl-gpu\sdl-gpu.vcxproj">
<Project>{3d303f81-f49f-4d63-be32-370c07e271b7}</Project>
</ProjectReference>
<ProjectReference Include="..\studio\studio.vcxproj"> <ProjectReference Include="..\studio\studio.vcxproj">
<Project>{6a22403a-6cf5-49f2-a012-ec04c9496306}</Project> <Project>{6a22403a-6cf5-49f2-a012-ec04c9496306}</Project>
</ProjectReference> </ProjectReference>

View File

@ -11,7 +11,7 @@
<DebuggerMachineName>XboxOne</DebuggerMachineName> <DebuggerMachineName>XboxOne</DebuggerMachineName>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<DebuggerFlavor>UWPRemoteDebugger</DebuggerFlavor> <DebuggerFlavor>WindowsDeviceDebugger</DebuggerFlavor>
<DebuggerMachineName>XboxOne</DebuggerMachineName> <DebuggerMachineName>XboxOne</DebuggerMachineName>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">

View File

@ -1,11 +0,0 @@
in vec4 color;
in vec2 texCoord;
out vec4 fragColor;
uniform sampler2D tex;
void main(void)
{
fragColor = texture2D(tex, texCoord) * color;
}

View File

@ -1,23 +0,0 @@
#define distortion 0.08
in vec2 texCoord;
out vec4 fragColor;
uniform sampler2D tex;
vec2 radialDistortion(vec2 coord) {
vec2 cc = coord - vec2(0.5);
float dist = dot(cc, cc) * distortion;
return coord + cc * (1.0 - dist) * dist;
}
void main(void) {
vec4 rgba = texture2D(tex, radialDistortion(texCoord));
vec4 intensity = fract(gl_FragCoord.y * (0.5 * 4.0 / 3.0)) > 0.5
? vec4(0)
: smoothstep(0.2, 0.8, rgba) + normalize(rgba);
fragColor = intensity * -0.25 + rgba * 1.1;
}

View File

@ -1,15 +0,0 @@
in vec2 texCoord;
out vec4 fragColor;
uniform sampler2D tex;
void main(void)
{
vec4 rgba = texture2D(tex, texCoord);
vec4 intensity = fract(gl_FragCoord.y * (0.5 * 4.0 / 3.0)) > 0.5
? vec4(0)
: smoothstep(0.2, 0.8, rgba) + normalize(rgba);
fragColor = intensity * -0.25 + rgba * 1.1;
}

View File

@ -1,14 +1,20 @@
attribute vec3 gpu_Vertex; CODE(
#version 100\n
precision highp float;
precision mediump int;
attribute vec2 gpu_Vertex;
attribute vec2 gpu_TexCoord; attribute vec2 gpu_TexCoord;
attribute vec4 gpu_Color; attribute mediump vec4 gpu_Color;
uniform mat4 gpu_ModelViewProjectionMatrix; uniform mat4 gpu_ModelViewProjectionMatrix;
varying vec4 color; varying mediump vec4 color;
varying vec2 texCoord; varying vec2 texCoord;
void main(void) void main(void)
{ {
color = gpu_Color; color = gpu_Color;
texCoord = vec2(gpu_TexCoord); texCoord = vec2(gpu_TexCoord);
gl_Position = gpu_ModelViewProjectionMatrix * vec4(gpu_Vertex, 1.0); gl_Position = gpu_ModelViewProjectionMatrix * vec4(gpu_Vertex, 0.0, 1.0);
} })

View File

@ -1,5 +1,11 @@
in vec2 texCoord; CODE(
out vec4 fragColor;
#version 100\n
precision highp float;
precision mediump int;
varying vec2 texCoord;
//vec4 fragColor;
uniform sampler2D tex; uniform sampler2D tex;
uniform float trg_w; uniform float trg_w;
@ -120,7 +126,8 @@ void main()
{ {
// maskDark=maskLight; // maskDark=maskLight;
vec2 pos=Warp(gl_FragCoord.xy/trg); vec2 pos=Warp(gl_FragCoord.xy/trg);
vec4 fragColor;
fragColor.rgb=Tri(vec2(pos.s, 1.0 - pos.t))*Mask(gl_FragCoord.xy); fragColor.rgb=Tri(vec2(pos.s, 1.0 - pos.t))*Mask(gl_FragCoord.xy);
fragColor.a=1.0; fragColor.a=1.0;
fragColor = vec4(ToSrgb(fragColor.rgb), fragColor.a); gl_FragColor = vec4(ToSrgb(fragColor.rgb), fragColor.a);
} })

View File

@ -1060,87 +1060,44 @@ static void emstick()
#endif #endif
Uint32 load_shader(GPU_ShaderEnum shader_type, const char* filename) #define CODE(...) #__VA_ARGS__
{
SDL_RWops* rwops;
Uint32 shader;
char* source;
int header_size, file_size;
const char* header = "";
GPU_Renderer* renderer = GPU_GetCurrentRenderer();
// Open file
rwops = SDL_RWFromFile(filename, "rb");
if(rwops == NULL)
{
GPU_PushErrorCode("load_shader", GPU_ERROR_FILE_NOT_FOUND, "Shader file \"%s\" not found", filename);
return 0;
}
// Get file size
file_size = SDL_RWseek(rwops, 0, SEEK_END);
SDL_RWseek(rwops, 0, SEEK_SET);
// Get size from header
if(renderer->shader_language == GPU_LANGUAGE_GLSL)
{
if(renderer->max_shader_version >= 120)
header = "#version 120\n";
else
header = "#version 110\n"; // Maybe this is good enough?
}
else if(renderer->shader_language == GPU_LANGUAGE_GLSLES)
header = "#version 100\nprecision mediump int;\nprecision mediump float;\n";
header_size = strlen(header);
// Allocate source buffer
source = (char*)malloc(sizeof(char)*(header_size + file_size + 1));
// Prepend header
strcpy(source, header);
// Read in source code
SDL_RWread(rwops, source + strlen(source), 1, file_size);
source[header_size + file_size] = '\0';
// Compile the shader
shader = GPU_CompileShader(shader_type, source);
// Clean up
free(source);
SDL_RWclose(rwops);
return shader;
}
GPU_ShaderBlock load_shader_program(Uint32* p, const char* vertex_shader_file, const char* fragment_shader_file) u32 load_shader_program()
{ {
Uint32 v, f; Uint32 v, f;
v = load_shader(GPU_VERTEX_SHADER, vertex_shader_file);
static const char* VertexShader =
#include "ext/shader/common.vert"
;
v = GPU_CompileShader(GPU_VERTEX_SHADER, VertexShader);
if(!v) if(!v)
GPU_LogError("Failed to load vertex shader (%s): %s\n", vertex_shader_file, GPU_GetShaderMessage()); GPU_LogError("Failed to load vertex shader: %s\n", GPU_GetShaderMessage());
f = load_shader(GPU_PIXEL_SHADER, fragment_shader_file); static const char* PixelShader =
#include "ext/shader/crt-lottes.frag"
;
f = GPU_CompileShader(GPU_PIXEL_SHADER, PixelShader);
if(!f) if(!f)
GPU_LogError("Failed to load fragment shader (%s): %s\n", fragment_shader_file, GPU_GetShaderMessage()); GPU_LogError("Failed to load fragment shader: %s\n", GPU_GetShaderMessage());
*p = GPU_LinkShaders(v, f); u32 p = GPU_LinkShaders(v, f);
if(!*p) if(!p)
{ {
GPU_ShaderBlock b = {-1, -1, -1, -1}; GPU_ShaderBlock b = {-1, -1, -1, -1};
GPU_LogError("Failed to link shader program (%s + %s): %s\n", vertex_shader_file, fragment_shader_file, GPU_GetShaderMessage()); GPU_LogError("Failed to link shader program: %s\n", GPU_GetShaderMessage());
return b; return p;
} }
{ {
GPU_ShaderBlock block = GPU_LoadShaderBlock(*p, "gpu_Vertex", "gpu_TexCoord", "gpu_Color", "gpu_ModelViewProjectionMatrix"); GPU_ShaderBlock block = GPU_LoadShaderBlock(p, "gpu_Vertex", "gpu_TexCoord", "gpu_Color", "gpu_ModelViewProjectionMatrix");
GPU_ActivateShaderProgram(*p, &block); GPU_ActivateShaderProgram(p, &block);
return block; return p;
} }
} }
@ -1176,12 +1133,11 @@ static s32 start(s32 argc, char **argv, const char* folder)
GPU_Target* screen = GPU_Init(Width, Height, GPU_INIT_DISABLE_VSYNC); GPU_Target* screen = GPU_Init(Width, Height, GPU_INIT_DISABLE_VSYNC);
GPU_Image* texture = GPU_CreateImage(TIC80_FULLWIDTH, TIC80_FULLHEIGHT, GPU_FORMAT_BGRA); GPU_Image* texture = GPU_CreateImage(TIC80_FULLWIDTH, TIC80_FULLHEIGHT, GPU_FORMAT_RGBA);// GPU_FORMAT_BGRA);
GPU_SetAnchor(texture, 0, 0); GPU_SetAnchor(texture, 0, 0);
GPU_SetImageFilter(texture, GPU_FILTER_NEAREST); GPU_SetImageFilter(texture, GPU_FILTER_NEAREST);
u32 crt_shader = 0; u32 crt_shader = load_shader_program(&crt_shader);
load_shader_program(&crt_shader, "data/shaders/common.vert", "data/shaders/crt-lottes.frag");
{ {
u64 nextTick = SDL_GetPerformanceCounter(); u64 nextTick = SDL_GetPerformanceCounter();