Adding FRG Engine
This commit is contained in:
parent
70cf2b9543
commit
93805a5727
@ -92,15 +92,15 @@
|
||||
<Optimization>Disabled</Optimization>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>..\;..\math;..\coldet\;..\util;..\..\SDL2-2.0.8\include;..\..\physfs-3.0.1\build\install\include;..\..\loki-0.1.7\include\loki;..\opensteer\include</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CONSOLE;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>../../libs/boost-gil-extension;../../tes-engine;../../eigen;../../boost_1_67_0/;../../libs/jpeg-9;../../libs/jpeg-9/vc10;../../libs/lpng1510;..\;..\math;..\coldet\;..\util;..\..\SDL2-2.0.8\include;..\..\physfs-3.0.1\build\install\include;..\..\loki-0.1.7\include\loki;..\opensteer\include</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_WINDOWS;TARGET_WIN32;_WIN32_WINNT=0x0501;WIN32_LEAN_AND_MEAN;EIGEN_DONT_ALIGN_STATICALLY;_CONSOLE;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<CompileAsWinRT>false</CompileAsWinRT>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<AdditionalLibraryDirectories>..\..\SDL2-2.0.8\lib\x64;..\..\loki-0.1.7\lib;..\..\physfs-3.0.1\build\install\lib</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>physfs.lib;loki_D.lib;SDL2.lib;SDL2main.lib;opengl32.lib;glu32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>../../tes-engine/windows/Engine/x64/Debug;../../boost_1_67_0/stage/lib;..\..\SDL2-2.0.8\lib\x64;..\..\loki-0.1.7\lib;..\..\physfs-3.0.1\build\install\lib</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>libjpeg.lib;libpng.lib;Engine.lib;physfs.lib;loki_D.lib;SDL2.lib;SDL2main.lib;opengl32.lib;glu32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<EntryPointSymbol>
|
||||
</EntryPointSymbol>
|
||||
</Link>
|
||||
@ -128,16 +128,16 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>..\;..\math;..\coldet\;..\util;..\..\SDL2-2.0.8\include;..\..\physfs-3.0.1\build\install\include;..\..\loki-0.1.7\include\loki;..\opensteer\include</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>../../libs/boost-gil-extension;../../tes-engine;../../eigen;../../boost_1_67_0/;../../libs/jpeg-9;../../libs/jpeg-9/vc10;../../libs/lpng1510;..\;..\math;..\coldet\;..\util;..\..\SDL2-2.0.8\include;..\..\physfs-3.0.1\build\install\include;..\..\loki-0.1.7\include\loki;..\opensteer\include</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;TARGET_WIN32;_WIN32_WINNT=0x0501;WIN32_LEAN_AND_MEAN;EIGEN_DONT_ALIGN_STATICALLY;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<CompileAsWinRT>false</CompileAsWinRT>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<AdditionalLibraryDirectories>..\..\SDL2-2.0.8\lib\x64;..\..\loki-0.1.7\lib;..\..\physfs-3.0.1\build\install\lib</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>physfs.lib;loki_D.lib;SDL2.lib;opengl32.lib;glu32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>../../tes-engine/windows/Engine/x64/Release;../../boost_1_67_0/stage/lib;..\..\SDL2-2.0.8\lib\x64;..\..\loki-0.1.7\lib;..\..\physfs-3.0.1\build\install\lib</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>libjpeg.lib;libpng.lib;Engine.lib;physfs.lib;loki_D.lib;SDL2.lib;opengl32.lib;glu32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<EntryPointSymbol>
|
||||
</EntryPointSymbol>
|
||||
</Link>
|
||||
@ -201,6 +201,7 @@
|
||||
<ClCompile Include="..\util\sound_system.cpp" />
|
||||
<ClCompile Include="..\util\timer.cpp" />
|
||||
<ClCompile Include="..\viewer.cpp" />
|
||||
<ClCompile Include="frgbridge.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\ai.h" />
|
||||
@ -267,6 +268,7 @@
|
||||
<ClInclude Include="..\util\sound_resample2.h" />
|
||||
<ClInclude Include="..\util\sound_system.h" />
|
||||
<ClInclude Include="..\util\timer.h" />
|
||||
<ClInclude Include="frgbridge.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\Doxyfile" />
|
||||
|
@ -204,6 +204,9 @@
|
||||
<ClCompile Include="..\main2.cpp">
|
||||
<Filter>Source Files\ogta</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="frgbridge.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\read_ini.h">
|
||||
@ -398,6 +401,9 @@
|
||||
<ClInclude Include="..\coldet\math3d.h">
|
||||
<Filter>Source Files\coldet</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="frgbridge.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\Doxyfile">
|
||||
|
13
OpenGTA-win/assets/gl1SimpleFragmentShader.txt
Executable file
13
OpenGTA-win/assets/gl1SimpleFragmentShader.txt
Executable file
@ -0,0 +1,13 @@
|
||||
precision mediump float;
|
||||
varying vec2 TexCoord;
|
||||
|
||||
uniform sampler2D Texture;
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
vec4 texColor = texture2D(Texture, TexCoord).rgba;
|
||||
//gl_FragColor = texColor;
|
||||
gl_FragColor = vec4(texColor.rgb*2.0 + vec3(0.2, 0.2, 0.2), texColor.a);
|
||||
//gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
|
||||
}
|
9
OpenGTA-win/assets/gl1SimpleVertexShader.txt
Executable file
9
OpenGTA-win/assets/gl1SimpleVertexShader.txt
Executable file
@ -0,0 +1,9 @@
|
||||
varying vec2 TexCoord;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = gl_ModelViewProjectionMatrix * vec4(gl_Vertex.xyz,1.0);
|
||||
|
||||
TexCoord = gl_MultiTexCoord0.st;
|
||||
|
||||
}
|
22
OpenGTA-win/frgbridge.cpp
Executable file
22
OpenGTA-win/frgbridge.cpp
Executable file
@ -0,0 +1,22 @@
|
||||
#include "frgbridge.h"
|
||||
|
||||
#include "include/Engine.h"
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
|
||||
|
||||
std::unique_ptr<SE::TShaderManager> shaderManager;
|
||||
|
||||
|
||||
SE::TShaderManager& GetShaderManager()
|
||||
{
|
||||
static std::once_flag onceFlag;
|
||||
|
||||
std::call_once(onceFlag,
|
||||
[] {
|
||||
shaderManager = std::make_unique<SE::TShaderManager>();
|
||||
});
|
||||
|
||||
return *shaderManager.get();
|
||||
}
|
||||
|
13
OpenGTA-win/frgbridge.h
Executable file
13
OpenGTA-win/frgbridge.h
Executable file
@ -0,0 +1,13 @@
|
||||
#ifndef FRGBRIDGE_H_INCLUDED
|
||||
#define FRGBRIDGE_H_INCLUDED
|
||||
|
||||
|
||||
#include "include/Engine.h"
|
||||
|
||||
|
||||
|
||||
SE::TShaderManager& GetShaderManager();
|
||||
|
||||
|
||||
|
||||
#endif //FRGBRIDGE_H_INCLUDED
|
16
OpenGTA-win/log.txt
Executable file
16
OpenGTA-win/log.txt
Executable file
@ -0,0 +1,16 @@
|
||||
2018-Sep-23 02:22:34: Render::OpenGL glVersion = 4.5.0 - Build 23.20.16.4973
|
||||
2018-Sep-23 02:22:34: Render::OpenGL glVersion above 2.0 ok
|
||||
2018-Sep-23 02:22:34: Render::OpenGL GL_ARB_framebuffer_object supported ok
|
||||
2018-Sep-23 02:22:34: Render::OpenGL GL_ARB_uniform_buffer_object supported ok
|
||||
2018-Sep-23 02:22:34: Prepare to add shader simple
|
||||
2018-Sep-23 02:22:34: ResourceManager::ShaderManager::Shader WARNING: 0:1: '' : #version directive missing
|
||||
|
||||
|
||||
2018-Sep-23 02:22:34: ResourceManager::ShaderManager::Shader WARNING: 0:1: '' : #version directive missing
|
||||
WARNING: 0:1: 'precision' : symbol not available in current GLSL version
|
||||
WARNING: 0:1: 'mediump' : symbol not available in current GLSL version
|
||||
|
||||
|
||||
2018-Sep-23 02:22:34: Shader program is - 3
|
||||
2018-Sep-23 02:22:34: ResourceManager::ShaderManager::Shader
|
||||
2018-Sep-23 02:22:34: ResourceManager::ShaderManager shader loaded: simple
|
@ -27,6 +27,7 @@
|
||||
#include "m_exceptions.h"
|
||||
#include "image_loader.h"
|
||||
|
||||
#include "OpenGTA-win/frgbridge.h"
|
||||
|
||||
namespace OpenGL {
|
||||
#ifndef DEFAULT_SCREEN_WIDTH
|
||||
@ -305,6 +306,13 @@ namespace OpenGL {
|
||||
}
|
||||
|
||||
GL_CHECKERROR;
|
||||
|
||||
//auto vertexShaderText = SE::LoadTextFile("D:\\Work\\TorchProjects\\OpenGTA\\OpenGTA-win\\assets\\gl1SimpleVertexShader.txt");
|
||||
//auto fragmentShaderText = SE::LoadTextFile("D:\\Work\\TorchProjects\\OpenGTA\\OpenGTA-win\\assets\\gl1SimpleFragmentShader.txt");
|
||||
|
||||
GetShaderManager().AddShader("simple", "D:\\Work\\TorchProjects\\OpenGTA\\OpenGTA-win\\assets\\gl1SimpleVertexShader.txt", "D:\\Work\\TorchProjects\\OpenGTA\\OpenGTA-win\\assets\\gl1SimpleFragmentShader.txt");
|
||||
|
||||
GetShaderManager().PushShader("simple");
|
||||
}
|
||||
|
||||
void Screen::resize(Uint32 w, Uint32 h) {
|
||||
|
Loading…
Reference in New Issue
Block a user