1bee3c7a9SAlexandre Deckner /* 2bee3c7a9SAlexandre Deckner * Copyright 2008, Haiku Inc. All rights reserved. 3bee3c7a9SAlexandre Deckner * Distributed under the terms of the MIT License. 4bee3c7a9SAlexandre Deckner * 5bee3c7a9SAlexandre Deckner * Authors: 6bee3c7a9SAlexandre Deckner * Alexandre Deckner <alex@zappotek.com> 7bee3c7a9SAlexandre Deckner */ 8bee3c7a9SAlexandre Deckner 9bee3c7a9SAlexandre Deckner #include "Texture.h" 10bee3c7a9SAlexandre Deckner 11*8e4cdaaeSAlexander von Gluck IV #include <GL/gl.h> 12bee3c7a9SAlexandre Deckner 13bee3c7a9SAlexandre Deckner Texture()14bee3c7a9SAlexandre DecknerTexture::Texture() 15bee3c7a9SAlexandre Deckner : 16bee3c7a9SAlexandre Deckner fId(0) 17bee3c7a9SAlexandre Deckner { 18bee3c7a9SAlexandre Deckner } 19bee3c7a9SAlexandre Deckner 20bee3c7a9SAlexandre Deckner ~Texture()21bee3c7a9SAlexandre DecknerTexture::~Texture() 22bee3c7a9SAlexandre Deckner { 23bee3c7a9SAlexandre Deckner if (glIsTexture(fId)) { 24bee3c7a9SAlexandre Deckner GLuint ids[1] = {fId}; 25bee3c7a9SAlexandre Deckner glDeleteTextures(1, ids); 26bee3c7a9SAlexandre Deckner } 27bee3c7a9SAlexandre Deckner } 28bee3c7a9SAlexandre Deckner 29bee3c7a9SAlexandre Deckner 30bee3c7a9SAlexandre Deckner GLuint Id()31bee3c7a9SAlexandre DecknerTexture::Id() 32bee3c7a9SAlexandre Deckner { 33bee3c7a9SAlexandre Deckner return fId; 34bee3c7a9SAlexandre Deckner } 353d65021dSAlexandre Deckner 363d65021dSAlexandre Deckner 373d65021dSAlexandre Deckner void Update(float dt)383d65021dSAlexandre DecknerTexture::Update(float dt) 393d65021dSAlexandre Deckner { 403d65021dSAlexandre Deckner } 41