mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-07 19:58:32 +09:00
[Chore] (MG_Test): add missing includes in tests
This commit is contained in:
+3
-1
@@ -6,7 +6,9 @@
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#define NOMINMAX // prevent Windows.h from defining min and max macros
|
||||
# ifndef NOMINMAX
|
||||
#define NOMINMAX 1 // prevent Windows.h from defining min and max macros
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// ================== MobileGL definitions and macros =================== //
|
||||
|
||||
+3
-1
@@ -63,7 +63,9 @@
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN 1
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#include <processthreadsapi.h>
|
||||
#endif
|
||||
|
||||
@@ -4,6 +4,10 @@
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "Includes.h"
|
||||
#include <MG_State/GLState/Core.h>
|
||||
|
||||
#include <MG_Impl/GLImpl/Buffer/GL_Buffer.h>
|
||||
#include <MG_Impl/GLImpl/Getter/GL_Getter.h>
|
||||
|
||||
using namespace MobileGL;
|
||||
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "Includes.h"
|
||||
#include <MG_Util/Converters/GLToStr/GLEnumConverter.h>
|
||||
#include <MG_Util/ShaderTranspiler/ShaderCompiler.h>
|
||||
#include <MG_Util/ShaderTranspiler/Types.h>
|
||||
using namespace MobileGL;
|
||||
|
||||
class ProgramUtilTest : public ::testing::Test {
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include "Includes.h"
|
||||
#include <MG_Impl/GLImpl/Buffer/GL_Buffer.h>
|
||||
#include <MG_Impl/GLImpl/Getter/GL_Getter.h>
|
||||
#include <MG_Impl/GLImpl/VertexArray/GL_VertexArray.h>
|
||||
#include <MG_State/GLState/Core.h>
|
||||
|
||||
using namespace MobileGL;
|
||||
|
||||
|
||||
@@ -21,13 +21,13 @@ namespace MobileGL {
|
||||
|
||||
std::string GetThreadName() {
|
||||
char buffer[64] = { 0 };
|
||||
#if defined(_WIN32)
|
||||
#if defined(_WIN32) && !defined(__MINGW32__)
|
||||
PWSTR desc = nullptr;
|
||||
if (SUCCEEDED(GetThreadDescription(GetCurrentThread(), &desc))) {
|
||||
WideCharToMultiByte(CP_UTF8, 0, desc, -1, buffer, sizeof(buffer), nullptr, nullptr);
|
||||
LocalFree(desc);
|
||||
}
|
||||
#elif defined(__ANDROID__) || defined(__linux__) || defined(__APPLE__)
|
||||
#elif defined(__ANDROID__) || defined(__linux__) || defined(__APPLE__) || defined(__MINGW32__)
|
||||
pthread_getname_np(pthread_self(), buffer, sizeof(buffer));
|
||||
#endif
|
||||
return buffer[0] ? buffer : "UnknownThread";
|
||||
|
||||
Reference in New Issue
Block a user