Rev | Line | |
---|
[36] | 1 | // Copyright (C) 2012-2013 Kornel Kisielewicz
|
---|
| 2 | // This file is part of NV Libraries.
|
---|
| 3 | // For conditions of distribution and use, see copyright notice in nv.hh
|
---|
[35] | 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.