mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 01:19:19 +02:00
file path fixes (again..), don't capture mouse during loading
This commit is contained in:
6
EU07.cpp
6
EU07.cpp
@@ -331,7 +331,6 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
glfwMakeContextCurrent(window);
|
glfwMakeContextCurrent(window);
|
||||||
glfwSwapInterval(Global.VSync ? 1 : 0); //vsync
|
glfwSwapInterval(Global.VSync ? 1 : 0); //vsync
|
||||||
glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_DISABLED); //capture cursor
|
|
||||||
glfwSetCursorPos(window, 0.0, 0.0);
|
glfwSetCursorPos(window, 0.0, 0.0);
|
||||||
glfwSetFramebufferSizeCallback(window, window_resize_callback);
|
glfwSetFramebufferSizeCallback(window, window_resize_callback);
|
||||||
glfwSetCursorPosCallback(window, cursor_pos_callback);
|
glfwSetCursorPosCallback(window, cursor_pos_callback);
|
||||||
@@ -360,6 +359,8 @@ int main(int argc, char *argv[])
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
Global.ControlPicking = true;
|
||||||
|
|
||||||
if ((false == GfxRenderer.Init(window))
|
if ((false == GfxRenderer.Init(window))
|
||||||
|| (false == UILayer.init(window)))
|
|| (false == UILayer.init(window)))
|
||||||
return -1;
|
return -1;
|
||||||
@@ -412,6 +413,9 @@ int main(int argc, char *argv[])
|
|||||||
Console::On(); // włączenie konsoli
|
Console::On(); // włączenie konsoli
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Global.ControlPicking = false;
|
||||||
|
glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_DISABLED); //capture cursor
|
||||||
|
|
||||||
try {
|
try {
|
||||||
while( ( false == glfwWindowShouldClose( window ) )
|
while( ( false == glfwWindowShouldClose( window ) )
|
||||||
&& ( true == World.Update() )
|
&& ( true == World.Update() )
|
||||||
|
|||||||
@@ -81,11 +81,7 @@ TModelsManager::GetModel(std::string const &Name, bool const Dynamic)
|
|||||||
// - wczytanie modelu animowanego - Init() - sprawdzić
|
// - wczytanie modelu animowanego - Init() - sprawdzić
|
||||||
std::string const buftp { Global.asCurrentTexturePath }; // zapamiętanie aktualnej ścieżki do tekstur,
|
std::string const buftp { Global.asCurrentTexturePath }; // zapamiętanie aktualnej ścieżki do tekstur,
|
||||||
std::string filename { Name };
|
std::string filename { Name };
|
||||||
if (Name.find('\\') != std::string::npos)
|
if( Name.find( '/' ) != std::string::npos && !Dynamic ) {
|
||||||
{
|
|
||||||
ErrorLog("internal error: backslash in GetModel: " + Name);
|
|
||||||
}
|
|
||||||
if( Name.find( '/' ) != std::string::npos ) {
|
|
||||||
// pobieranie tekstur z katalogu, w którym jest model
|
// pobieranie tekstur z katalogu, w którym jest model
|
||||||
Global.asCurrentTexturePath += Name;
|
Global.asCurrentTexturePath += Name;
|
||||||
Global.asCurrentTexturePath.erase( Global.asCurrentTexturePath.rfind( "/" ) + 1 );
|
Global.asCurrentTexturePath.erase( Global.asCurrentTexturePath.rfind( "/" ) + 1 );
|
||||||
|
|||||||
Reference in New Issue
Block a user