source: trunk/src/gl/gl_names.cc @ 36

Last change on this file since 36 was 36, checked in by epyon, 12 years ago
  • gl_program added
File size: 787 bytes
Line 
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
4
5#include "nv/gl/gl_names.hh"
6
7#include "nv/lib/gl.hh"
8
9using namespace nv;
10
11gl_texture_name::gl_texture_name()
12{
13        glGenTextures( 1, &m_value );
14}
15
16gl_texture_name::~gl_texture_name()
17{
18        if ( m_value != 0 )
19        {
20                glDeleteTextures( 1, &m_value );
21        }
22}
23
24gl_shader_name::gl_shader_name()
25{
26        m_value = glCreateProgram();
27}
28
29gl_shader_name::~gl_shader_name()
30{
31        if ( m_value != 0 )
32        {
33                glDeleteProgram( m_value );
34        }
35}
36
37gl_buffer_name::gl_buffer_name()
38{
39        glGenBuffers( 1, &m_value );
40}
41
42gl_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.