Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/ghost/intern/GHOST_Context.cpp')
-rw-r--r--intern/ghost/intern/GHOST_Context.cpp27
1 files changed, 9 insertions, 18 deletions
diff --git a/intern/ghost/intern/GHOST_Context.cpp b/intern/ghost/intern/GHOST_Context.cpp
index f9aa80dc13d..17ee39d952c 100644
--- a/intern/ghost/intern/GHOST_Context.cpp
+++ b/intern/ghost/intern/GHOST_Context.cpp
@@ -10,7 +10,7 @@
#include "GHOST_Context.h"
#ifdef _WIN32
-# include <GL/wglew.h> // only for symbolic constants, do not use API functions
+# include <epoxy/wgl.h>
# include <tchar.h>
#
# ifndef ERROR_PROFILE_DOES_NOT_MATCH_DEVICE
@@ -35,7 +35,7 @@ bool win32_silent_chk(bool result)
bool win32_chk(bool result, const char *file, int line, const char *text)
{
if (!result) {
- LPTSTR formattedMsg = NULL;
+ LPTSTR formattedMsg = nullptr;
DWORD error = GetLastError();
@@ -87,12 +87,12 @@ bool win32_chk(bool result, const char *file, int line, const char *text)
default: {
count = FormatMessage((FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS),
- NULL,
+ nullptr,
error,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR)(&formattedMsg),
0,
- NULL);
+ nullptr);
msg = count > 0 ? formattedMsg : "<no system message>\n";
break;
@@ -100,21 +100,17 @@ bool win32_chk(bool result, const char *file, int line, const char *text)
}
# ifndef NDEBUG
- _ftprintf(stderr,
- "%s(%d):[%s] -> Win32 Error# (%lu): %s",
- file,
- line,
- text,
- (unsigned long)error,
- msg);
+ _ftprintf(
+ stderr, "%s(%d):[%s] -> Win32 Error# (%lu): %s", file, line, text, ulong(error), msg);
# else
- _ftprintf(stderr, "Win32 Error# (%lu): %s", (unsigned long)error, msg);
+ _ftprintf(stderr, "Win32 Error# (%lu): %s", ulong(error), msg);
# endif
SetLastError(NO_ERROR);
- if (count != 0)
+ if (count != 0) {
LocalFree(formattedMsg);
+ }
}
return result;
@@ -122,11 +118,6 @@ bool win32_chk(bool result, const char *file, int line, const char *text)
#endif // _WIN32
-void GHOST_Context::initContextGLEW()
-{
- GLEW_CHK(glewInit());
-}
-
void GHOST_Context::initClearGL()
{
glClearColor(0.294, 0.294, 0.294, 0.000);