Changeset View
Changeset View
Standalone View
Standalone View
intern/ghost/intern/GHOST_Context.cpp
| /* SPDX-License-Identifier: GPL-2.0-or-later | /* SPDX-License-Identifier: GPL-2.0-or-later | ||||
| * Copyright 2013 Blender Foundation. All rights reserved. */ | * Copyright 2013 Blender Foundation. All rights reserved. */ | ||||
| /** \file | /** \file | ||||
| * \ingroup GHOST | * \ingroup GHOST | ||||
| * | * | ||||
| * Definition of GHOST_Context class. | * Definition of GHOST_Context class. | ||||
| */ | */ | ||||
| #include "GHOST_Context.h" | #include "GHOST_Context.h" | ||||
| #ifdef _WIN32 | #ifdef _WIN32 | ||||
| # include <GL/wglew.h> // only for symbolic constants, do not use API functions | # include <epoxy/wgl.h> | ||||
| # include <tchar.h> | # include <tchar.h> | ||||
| # | # | ||||
| # ifndef ERROR_PROFILE_DOES_NOT_MATCH_DEVICE | # ifndef ERROR_PROFILE_DOES_NOT_MATCH_DEVICE | ||||
| # define ERROR_PROFILE_DOES_NOT_MATCH_DEVICE 0x7E7 | # define ERROR_PROFILE_DOES_NOT_MATCH_DEVICE 0x7E7 | ||||
| # endif | # endif | ||||
| #endif | #endif | ||||
| #include <cstdio> | #include <cstdio> | ||||
| ▲ Show 20 Lines • Show All 96 Lines • ▼ Show 20 Lines | # endif | ||||
| } | } | ||||
| } | } | ||||
| return result; | return result; | ||||
| } | } | ||||
| #endif // _WIN32 | #endif // _WIN32 | ||||
| void GHOST_Context::initContextGLEW() | |||||
| { | |||||
| GLEW_CHK(glewInit()); | |||||
| } | |||||
| void GHOST_Context::initClearGL() | void GHOST_Context::initClearGL() | ||||
| { | { | ||||
| glClearColor(0.294, 0.294, 0.294, 0.000); | glClearColor(0.294, 0.294, 0.294, 0.000); | ||||
| glClear(GL_COLOR_BUFFER_BIT); | glClear(GL_COLOR_BUFFER_BIT); | ||||
| glClearColor(0.000, 0.000, 0.000, 0.000); | glClearColor(0.000, 0.000, 0.000, 0.000); | ||||
| } | } | ||||