LibCarna Version 3.4.0
Loading...
Searching...
No Matches
glew.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2010 - 2016 Leonid Kostrykin
3 *
4 * Chair of Medical Engineering (mediTEC)
5 * RWTH Aachen University
6 * Pauwelsstr. 20
7 * 52074 Aachen
8 * Germany
9 *
10 *
11 * Copyright (C) 2021 - 2025 Leonid Kostrykin
12 *
13 */
14
15#ifndef GLEW_H_6014714286
16#define GLEW_H_6014714286
17
23#include <LibCarna/base/Log.hpp>
24
25#ifdef _WIN32
26# include <windows.h>
27#endif
28
29#include <LibCarna/base/GL/glew.h>
30
31
32
33// ----------------------------------------------------------------------------------
34// LIBCARNA_GLEW_INIT
35// ----------------------------------------------------------------------------------
36
40#define LIBCARNA_GLEW_INIT \
41 { \
42 const GLenum glew_state = glewInit(); \
43 const auto glew_ok = ( glew_state == GLEW_OK ); \
44 if( glew_ok ) \
45 { \
46 LibCarna::base::Log::instance().record( LibCarna::base::Log::debug, "GLEW initialized successfully." ); \
47 } \
48 else \
49 { \
50 LIBCARNA_FAIL( "GLEW initialization failed (" << glewGetErrorString( glew_state ) << ", Code: " << glew_state << ")" ); \
51 } \
52 }
53
54
55
56#endif // GLEW_H_6014714286
Defines LibCarna::base::Log.