Last change
on this file since 35 was
35,
checked in by epyon, 12 years ago
|
- gl_enum helper functions
- gl_names GL name handling
|
File size:
786 bytes
|
Line | |
---|
1 | // Copyright (C) 2012 Kornel Kisielewicz
|
---|
2 | // This file is part of NOVA Libraries.
|
---|
3 | // For conditions of distribution and use, see copyright notice in nova.hh
|
---|
4 |
|
---|
5 | #include "nv/gl/gl_names.hh"
|
---|
6 |
|
---|
7 | #include "nv/lib/gl.hh"
|
---|
8 |
|
---|
9 | using namespace nv;
|
---|
10 |
|
---|
11 | gl_texture_name::gl_texture_name()
|
---|
12 | {
|
---|
13 | glGenTextures( 1, &m_value );
|
---|
14 | }
|
---|
15 |
|
---|
16 | gl_texture_name::~gl_texture_name()
|
---|
17 | {
|
---|
18 | if ( m_value != 0 )
|
---|
19 | {
|
---|
20 | glDeleteTextures( 1, &m_value );
|
---|
21 | }
|
---|
22 | }
|
---|
23 |
|
---|
24 | gl_shader_name::gl_shader_name()
|
---|
25 | {
|
---|
26 | m_value = glCreateProgram();
|
---|
27 | }
|
---|
28 |
|
---|
29 | gl_shader_name::~gl_shader_name()
|
---|
30 | {
|
---|
31 | if ( m_value != 0 )
|
---|
32 | {
|
---|
33 | glDeleteProgram( m_value );
|
---|
34 | }
|
---|
35 | }
|
---|
36 |
|
---|
37 | gl_buffer_name::gl_buffer_name()
|
---|
38 | {
|
---|
39 | glGenBuffers( 1, &m_value );
|
---|
40 | }
|
---|
41 |
|
---|
42 | gl_buffer_name::~gl_buffer_name()
|
---|
43 | {
|
---|
44 | if ( m_value != 0 )
|
---|
45 | {
|
---|
46 | glDeleteBuffers( 1, &m_value );
|
---|
47 | }
|
---|
48 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.