mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-11 21:58:31 +09:00
[Chore] (MG_Test): add missing includes in tests
This commit is contained in:
+3
-1
@@ -6,7 +6,9 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#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
|
#endif
|
||||||
|
|
||||||
// ================== MobileGL definitions and macros =================== //
|
// ================== MobileGL definitions and macros =================== //
|
||||||
|
|||||||
+3
-1
@@ -63,7 +63,9 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
#define WIN32_LEAN_AND_MEAN 1
|
||||||
|
#endif
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <processthreadsapi.h>
|
#include <processthreadsapi.h>
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -4,6 +4,10 @@
|
|||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
#include "Includes.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;
|
using namespace MobileGL;
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,9 @@
|
|||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
#include "Includes.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;
|
using namespace MobileGL;
|
||||||
|
|
||||||
class ProgramUtilTest : public ::testing::Test {
|
class ProgramUtilTest : public ::testing::Test {
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include "Includes.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;
|
using namespace MobileGL;
|
||||||
|
|
||||||
|
|||||||
@@ -21,13 +21,13 @@ namespace MobileGL {
|
|||||||
|
|
||||||
std::string GetThreadName() {
|
std::string GetThreadName() {
|
||||||
char buffer[64] = { 0 };
|
char buffer[64] = { 0 };
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32) && !defined(__MINGW32__)
|
||||||
PWSTR desc = nullptr;
|
PWSTR desc = nullptr;
|
||||||
if (SUCCEEDED(GetThreadDescription(GetCurrentThread(), &desc))) {
|
if (SUCCEEDED(GetThreadDescription(GetCurrentThread(), &desc))) {
|
||||||
WideCharToMultiByte(CP_UTF8, 0, desc, -1, buffer, sizeof(buffer), nullptr, nullptr);
|
WideCharToMultiByte(CP_UTF8, 0, desc, -1, buffer, sizeof(buffer), nullptr, nullptr);
|
||||||
LocalFree(desc);
|
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));
|
pthread_getname_np(pthread_self(), buffer, sizeof(buffer));
|
||||||
#endif
|
#endif
|
||||||
return buffer[0] ? buffer : "UnknownThread";
|
return buffer[0] ? buffer : "UnknownThread";
|
||||||
|
|||||||
Reference in New Issue
Block a user