Some minor adjustment
This commit is contained in:
parent
93805a5727
commit
15a2cbe410
2
.gitignore
vendored
2
.gitignore
vendored
@ -330,3 +330,5 @@ ASALocalRun/
|
|||||||
|
|
||||||
# Local History for Visual Studio
|
# Local History for Visual Studio
|
||||||
.localhistory/
|
.localhistory/
|
||||||
|
|
||||||
|
log.txt
|
@ -137,7 +137,7 @@
|
|||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<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>
|
<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>
|
<AdditionalDependencies>libjpeg.lib;libpng.lib;Engine.lib;physfs.lib;loki.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>
|
||||||
</EntryPointSymbol>
|
</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
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
|
|
@ -238,8 +238,8 @@ namespace OpenGL {
|
|||||||
|
|
||||||
if ((mx == w) && (my == h))
|
if ((mx == w) && (my == h))
|
||||||
return;
|
return;
|
||||||
float rot_x = (float(w) - mx) / 100;
|
float rot_x = (float(w) - mx) / 300;
|
||||||
float rot_y = (float(h) - my) / 100;
|
float rot_y = (float(h) - my) / 300;
|
||||||
center.y += rot_y * 8;
|
center.y += rot_y * 8;
|
||||||
if (center.y - eye.y > 15)
|
if (center.y - eye.y > 15)
|
||||||
center.y = eye.y + 15;
|
center.y = eye.y + 15;
|
||||||
|
@ -29,12 +29,13 @@
|
|||||||
|
|
||||||
#include "OpenGTA-win/frgbridge.h"
|
#include "OpenGTA-win/frgbridge.h"
|
||||||
|
|
||||||
|
//Xperimental -- Vladislav Khorev vladislav.khorev@fishrungames.com
|
||||||
namespace OpenGL {
|
namespace OpenGL {
|
||||||
#ifndef DEFAULT_SCREEN_WIDTH
|
#ifndef DEFAULT_SCREEN_WIDTH
|
||||||
#define DEFAULT_SCREEN_WIDTH 640
|
#define DEFAULT_SCREEN_WIDTH (640*2)
|
||||||
#endif
|
#endif
|
||||||
#ifndef DEFAULT_SCREEN_HEIGHT
|
#ifndef DEFAULT_SCREEN_HEIGHT
|
||||||
#define DEFAULT_SCREEN_HEIGHT 480
|
#define DEFAULT_SCREEN_HEIGHT (480*2)
|
||||||
#endif
|
#endif
|
||||||
#ifndef DEFAULT_SCREEN_VSYNC
|
#ifndef DEFAULT_SCREEN_VSYNC
|
||||||
#define DEFAULT_SCREEN_VSYNC 0
|
#define DEFAULT_SCREEN_VSYNC 0
|
||||||
@ -307,10 +308,7 @@ namespace OpenGL {
|
|||||||
|
|
||||||
GL_CHECKERROR;
|
GL_CHECKERROR;
|
||||||
|
|
||||||
//auto vertexShaderText = SE::LoadTextFile("D:\\Work\\TorchProjects\\OpenGTA\\OpenGTA-win\\assets\\gl1SimpleVertexShader.txt");
|
GetShaderManager().AddShader("simple", "assets\\gl1SimpleVertexShader.txt", "assets\\gl1SimpleFragmentShader.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");
|
GetShaderManager().PushShader("simple");
|
||||||
}
|
}
|
||||||
@ -323,7 +321,7 @@ namespace OpenGL {
|
|||||||
h = 1;
|
h = 1;
|
||||||
|
|
||||||
surface = SDL_CreateWindow(
|
surface = SDL_CreateWindow(
|
||||||
"OpenGTA", 0, 0, w, h,
|
"OpenGTA", 40, 40, w, h,
|
||||||
SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE);
|
SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE);
|
||||||
|
|
||||||
// Create an OpenGL context associated with the window.
|
// Create an OpenGL context associated with the window.
|
||||||
|
21
viewer.cpp
21
viewer.cpp
@ -69,7 +69,8 @@ OpenGTA::CityView *city = NULL;
|
|||||||
//OpenGL::DrawableFont* m_font = NULL;
|
//OpenGL::DrawableFont* m_font = NULL;
|
||||||
GUI::Label * fps_label = NULL;
|
GUI::Label * fps_label = NULL;
|
||||||
|
|
||||||
int city_num;
|
//Xperimental -- Vladislav Khorev vladislav.khorev@fishrungames.com
|
||||||
|
int city_num = 2;
|
||||||
|
|
||||||
const char* styles_8[3] = { "STYLE001.GRY", "STYLE002.GRY", "STYLE003.GRY" };
|
const char* styles_8[3] = { "STYLE001.GRY", "STYLE002.GRY", "STYLE003.GRY" };
|
||||||
const char* styles_24[3] = { "STYLE001.G24", "STYLE002.G24", "STYLE003.G24" };
|
const char* styles_24[3] = { "STYLE001.G24", "STYLE002.G24", "STYLE003.G24" };
|
||||||
@ -320,6 +321,8 @@ void parse_args(int argc, char* argv[]) {
|
|||||||
ERROR << "Invalid city number: " << city_num << std::endl;
|
ERROR << "Invalid city number: " << city_num << std::endl;
|
||||||
exit(1);
|
exit(1);
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void run_init(const char* prg_name) {
|
void run_init(const char* prg_name) {
|
||||||
@ -537,6 +540,10 @@ void print_position() {
|
|||||||
|
|
||||||
|
|
||||||
void handleKeyUp(SDL_Keysym* keysym) {
|
void handleKeyUp(SDL_Keysym* keysym) {
|
||||||
|
|
||||||
|
OpenGL::Camera & cam = OpenGL::CameraHolder::Instance();
|
||||||
|
|
||||||
|
|
||||||
switch ( keysym->sym ) {
|
switch ( keysym->sym ) {
|
||||||
case 'j':
|
case 'j':
|
||||||
OpenGTA::LocalPlayer::Instance().getCtrl().releaseTurnLeft();
|
OpenGTA::LocalPlayer::Instance().getCtrl().releaseTurnLeft();
|
||||||
@ -558,6 +565,18 @@ void handleKeyUp(SDL_Keysym* keysym) {
|
|||||||
//OpenGTA::LocalPlayer::Instance().move = 0;
|
//OpenGTA::LocalPlayer::Instance().move = 0;
|
||||||
//OpenGTA::LocalPlayer::Instance().setMove(0);
|
//OpenGTA::LocalPlayer::Instance().setMove(0);
|
||||||
break;
|
break;
|
||||||
|
case 'w':
|
||||||
|
cam.setSpeed(0.0f);
|
||||||
|
break;
|
||||||
|
case 's':
|
||||||
|
cam.setSpeed(0.0f);
|
||||||
|
break;
|
||||||
|
case 'a':
|
||||||
|
|
||||||
|
break;
|
||||||
|
case 'd':
|
||||||
|
|
||||||
|
break;
|
||||||
case SDLK_LCTRL:
|
case SDLK_LCTRL:
|
||||||
OpenGTA::LocalPlayer::Instance().getCtrl().setFireWeapon(false);
|
OpenGTA::LocalPlayer::Instance().getCtrl().setFireWeapon(false);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user