xref: /haiku/src/apps/haiku3d/Texture.cpp (revision 7a74a5df454197933bc6e80a542102362ee98703)
1  /*
2   * Copyright 2008, Haiku Inc. All rights reserved.
3   * Distributed under the terms of the MIT License.
4   *
5   * Authors:
6   * 		Alexandre Deckner <alex@zappotek.com>
7   */
8  
9  #include "Texture.h"
10  
11  #include <GL/gl.h>
12  
13  
14  Texture::Texture()
15  	:
16  	fId(0)
17  {
18  }
19  
20  
21  Texture::~Texture()
22  {
23  	if (glIsTexture(fId)) {
24  		GLuint ids[1] = {fId};
25  		glDeleteTextures(1, ids);
26  	}
27  }
28  
29  
30  GLuint
31  Texture::Id()
32  {
33  	return fId;
34  }
35  
36  
37  void
38  Texture::Update(float dt)
39  {
40  }
41