cgv
gl.h
1
#pragma once
2
6
#include <GL/glew.h>
7
8
#include "lib_begin.h"
9
10
namespace
cgv
{
11
namespace
render {
12
namespace
gl {
13
15
template
<
typename
T>
16
struct
gl_traits
{
static
const
unsigned
type = GL_FALSE;
static
const
bool
valid_index =
false
; };
17
template
<>
18
struct
gl_traits
<unsigned char> {
static
const
unsigned
type = GL_UNSIGNED_BYTE;
static
const
bool
valid_index =
true
; };
19
template
<>
20
struct
gl_traits<char> {
static
const
unsigned
type = GL_BYTE;
static
const
bool
valid_index =
false
; };
21
template
<>
22
struct
gl_traits<unsigned short> {
static
const
unsigned
type = GL_UNSIGNED_SHORT;
static
const
bool
valid_index =
true
; };
23
template
<>
24
struct
gl_traits<short> {
static
const
unsigned
type = GL_SHORT;
static
const
bool
valid_index =
false
; };
25
template
<>
26
struct
gl_traits<unsigned int> {
static
const
unsigned
type = GL_UNSIGNED_INT;
static
const
bool
valid_index =
true
; };
27
template
<>
28
struct
gl_traits<int> {
static
const
unsigned
type = GL_INT;
static
const
bool
valid_index =
false
; };
29
template
<>
30
struct
gl_traits<float> {
static
const
unsigned
type = GL_FLOAT;
static
const
bool
valid_index =
false
; };
31
template
<>
32
struct
gl_traits<double> {
static
const
unsigned
type = GL_DOUBLE;
static
const
bool
valid_index =
false
; };
33
34
36
extern
CGV_API
bool
ensure_glew_initialized
();
37
extern
CGV_API
bool
is_glew_initialized();
38
39
}
40
}
41
}
42
43
#include <cgv/config/lib_end.h>
44
cgv::render::gl::ensure_glew_initialized
bool ensure_glew_initialized()
initialize glew in the first call to this function and always return whether this was successful
Definition:
gl.cxx:19
cgv::render::gl::gl_traits
Definition:
gl.h:16
cgv
the cgv namespace
Definition:
vr_calib.cxx:9
projects
git
cgv
libs
cgv_gl
gl
gl.h
Generated by
1.8.18