Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ static/
[Oo]bj/
cmake-build-*/
vcpkg_installed/
vc17/

# MSTest test Results
[Tt]est[Rr]esult*/
Expand Down
3 changes: 3 additions & 0 deletions src/framework/graphics/glutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
#pragma once

#ifdef OPENGL_ES
// for static linking
#define GL_APICALL
#define EGLAPI
#include <GLES3/gl3.h>
#else
#ifndef _MSC_VER
Expand Down
10 changes: 5 additions & 5 deletions src/framework/platform/win32window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,11 +320,11 @@ void WIN32Window::internalCreateGLContext()
g_logger.fatal("Unable to initialize EGL");

static int configList[] = {
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
EGL_RED_SIZE, 4,
EGL_GREEN_SIZE, 4,
EGL_BLUE_SIZE, 4,
EGL_ALPHA_SIZE, 4,
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES3_BIT,
EGL_RED_SIZE, 8,
EGL_GREEN_SIZE, 8,
EGL_BLUE_SIZE, 8,
EGL_ALPHA_SIZE, 8,
EGL_NONE
};

Expand Down
18 changes: 12 additions & 6 deletions vc17/otclient.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,24 @@ Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
DirectX|x64 = DirectX|x64
DirectX|x86 = DirectX|x86
OpenGL|x64 = OpenGL|x64
OpenGL|x86 = OpenGL|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{17A8F78F-1FFB-4128-A3B3-59CC6C19D89A}.Debug|x64.ActiveCfg = Debug|x64
{17A8F78F-1FFB-4128-A3B3-59CC6C19D89A}.Debug|x64.Build.0 = Debug|x64
{17A8F78F-1FFB-4128-A3B3-59CC6C19D89A}.Debug|x86.ActiveCfg = Debug|Win32
{17A8F78F-1FFB-4128-A3B3-59CC6C19D89A}.Debug|x86.Build.0 = Debug|Win32
{17A8F78F-1FFB-4128-A3B3-59CC6C19D89A}.Release|x64.ActiveCfg = Release|x64
{17A8F78F-1FFB-4128-A3B3-59CC6C19D89A}.Release|x64.Build.0 = Release|x64
{17A8F78F-1FFB-4128-A3B3-59CC6C19D89A}.Release|x86.ActiveCfg = Release|Win32
{17A8F78F-1FFB-4128-A3B3-59CC6C19D89A}.Release|x86.Build.0 = Release|Win32
{17A8F78F-1FFB-4128-A3B3-59CC6C19D89A}.DirectX|x64.ActiveCfg = DirectX|x64
{17A8F78F-1FFB-4128-A3B3-59CC6C19D89A}.DirectX|x64.Build.0 = DirectX|x64
{17A8F78F-1FFB-4128-A3B3-59CC6C19D89A}.DirectX|x86.ActiveCfg = DirectX|Win32
{17A8F78F-1FFB-4128-A3B3-59CC6C19D89A}.DirectX|x86.Build.0 = DirectX|Win32
{17A8F78F-1FFB-4128-A3B3-59CC6C19D89A}.OpenGL|x64.ActiveCfg = OpenGL|x64
{17A8F78F-1FFB-4128-A3B3-59CC6C19D89A}.OpenGL|x64.Build.0 = OpenGL|x64
{17A8F78F-1FFB-4128-A3B3-59CC6C19D89A}.OpenGL|x86.ActiveCfg = OpenGL|Win32
{17A8F78F-1FFB-4128-A3B3-59CC6C19D89A}.OpenGL|x86.Build.0 = OpenGL|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
137 changes: 122 additions & 15 deletions vc17/otclient.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,20 @@
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<ProjectConfiguration Include="DirectX|Win32">
<Configuration>DirectX</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<ProjectConfiguration Include="DirectX|x64">
<Configuration>DirectX</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="OpenGL|Win32">
<Configuration>OpenGL</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="OpenGL|x64">
<Configuration>OpenGL</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
Expand All @@ -37,13 +45,25 @@
<PlatformToolset>v143</PlatformToolset>
<EnableUnitySupport>true</EnableUnitySupport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='OpenGL|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<EnableUnitySupport>true</EnableUnitySupport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DirectX|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<EnableUnitySupport>true</EnableUnitySupport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='OpenGL|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<EnableUnitySupport>true</EnableUnitySupport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DirectX|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
Expand All @@ -63,12 +83,22 @@
<Import Project="arch32.props" />
<Import Project="debug.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='OpenGL|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="arch32.props" />
<Import Project="release.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='DirectX|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="arch32.props" />
<Import Project="release.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='OpenGL|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="arch32.props" />
<Import Project="release.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='DirectX|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="arch32.props" />
<Import Project="release.props" />
Expand All @@ -84,20 +114,39 @@
<SourcePath>$(VC_SourcePath);$(ProjectDir)../src;</SourcePath>
<TargetName>$(ProjectName)_x64-dbg</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='OpenGL|Win32'">
<IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);../src;</IncludePath>
<TargetName>$(ProjectName)_gl</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DirectX|Win32'">
<IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);../src;</IncludePath>
<TargetName>$(ProjectName)_x64</TargetName>
<TargetName>$(ProjectName)_dx</TargetName>
</PropertyGroup>
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='OpenGL|x64'">
<IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);../src;</IncludePath>
<TargetName>$(ProjectName)_gl_x64</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DirectX|x64'">
<IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);../src;</IncludePath>
<TargetName>$(ProjectName)_dx_x64</TargetName>
</PropertyGroup>
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='OpenGL|Win32'">
<VcpkgHostTriplet>
</VcpkgHostTriplet>
<VcpkgTriplet>x86-windows-static</VcpkgTriplet>
<VcpkgConfiguration>Release</VcpkgConfiguration>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Vcpkg">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DirectX|Win32'" Label="Vcpkg">
<VcpkgHostTriplet />
<VcpkgTriplet>x86-windows-static</VcpkgTriplet>
<VcpkgConfiguration>Release</VcpkgConfiguration>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='OpenGL|x64'" Label="Vcpkg">
<VcpkgHostTriplet />
<VcpkgTriplet>x64-windows-static</VcpkgTriplet>
<VcpkgConfiguration>Release</VcpkgConfiguration>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DirectX|x64'" Label="Vcpkg">
<VcpkgHostTriplet />
<VcpkgTriplet>x64-windows-static</VcpkgTriplet>
<VcpkgConfiguration>Release</VcpkgConfiguration>
Expand Down Expand Up @@ -154,7 +203,7 @@ cmd /c "start ../vcpkg_installed\$(VcpkgTriplet)\$(VcpkgTriplet)\tools\protobuf\
)</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='OpenGL|Win32'">
<ClCompile>
<PreprocessorDefinitions>$(PREPROCESSOR_DEFS);NDEBUG</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
Expand Down Expand Up @@ -183,7 +232,37 @@ cmd /c "start ../vcpkg_installed\$(VcpkgTriplet)\$(VcpkgTriplet)\tools\protobuf\
</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DirectX|Win32'">
<ClCompile>
<PreprocessorDefinitions>$(PREPROCESSOR_DEFS);NDEBUG;OPENGL_ES</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
<AdditionalIncludeDirectories>$(VcpkgRoot)\installed\$(VcpkgTriplet)\include\luajit;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp20</LanguageStandard>
<LanguageStandard_C>Default</LanguageStandard_C>
<DisableSpecificWarnings>4244;4251;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<CombineFilesOnlyFromTheSameFolder>true</CombineFilesOnlyFromTheSameFolder>
<FloatingPointModel>Fast</FloatingPointModel>
<WarningLevel>Level4</WarningLevel>
</ClCompile>
<Link>
<TargetMachine>MachineX86</TargetMachine>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>false</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>libEGL.lib;libGLESv2.lib;dxgi.lib;d3d9.lib;d3d11.lib;dxguid.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PreBuildEvent>
<Command>if NOT EXIST "../src/protobuf/appearances.pb.cc" (
cmd /c "start ../vcpkg_installed\$(VcpkgTriplet)\$(VcpkgTriplet)\tools\protobuf\protoc" --cpp_out=../src/protobuf/ --proto_path=../src/protobuf/ appearances.proto
)
</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='OpenGL|x64'">
<ClCompile>
<PreprocessorDefinitions>$(PREPROCESSOR_DEFS);NDEBUG</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
Expand All @@ -207,6 +286,34 @@ cmd /c "start ../vcpkg_installed\$(VcpkgTriplet)\$(VcpkgTriplet)\tools\protobuf\
<PreBuildEvent>
<Command>if NOT EXIST "../src/protobuf/appearances.pb.cc" (
cmd /c "start ../vcpkg_installed\$(VcpkgTriplet)\$(VcpkgTriplet)\tools\protobuf\protoc" --cpp_out=../src/protobuf/ --proto_path=../src/protobuf/ appearances.proto
)</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DirectX|x64'">
<ClCompile>
<PreprocessorDefinitions>$(PREPROCESSOR_DEFS);NDEBUG;OPENGL_ES</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<EnableEnhancedInstructionSet>AdvancedVectorExtensions</EnableEnhancedInstructionSet>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
<AdditionalIncludeDirectories>$(VcpkgRoot)\installed\$(VcpkgTriplet)\include\luajit;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp20</LanguageStandard>
<LanguageStandard_C>Default</LanguageStandard_C>
<DisableSpecificWarnings>4244;4251;4996;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<CombineFilesOnlyFromTheSameFolder>true</CombineFilesOnlyFromTheSameFolder>
<FloatingPointModel>Fast</FloatingPointModel>
<WarningLevel>Level3</WarningLevel>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>libEGL.lib;libGLESv2.lib;dxgi.lib;d3d9.lib;d3d11.lib;dxguid.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PreBuildEvent>
<Command>if NOT EXIST "../src/protobuf/appearances.pb.cc" (
cmd /c "start ../vcpkg_installed\$(VcpkgTriplet)\$(VcpkgTriplet)\tools\protobuf\protoc" --cpp_out=../src/protobuf/ --proto_path=../src/protobuf/ appearances.proto
)</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
Expand Down
4 changes: 4 additions & 0 deletions vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
{
"name": "glew",
"platform": "windows | osx"
},
{
"name": "angle",
"platform": "windows"
}
],
"builtin-baseline":"01f602195983451bc83e72f4214af2cbc495aa94"
Expand Down