cscg22-gearboy

CSCG 2022 Challenge 'Gearboy'
git clone https://git.sinitax.com/sinitax/cscg22-gearboy
Log | Files | Refs | sfeed.txt

texture.h (1547B)


      1/*
      2 * Gearboy - Nintendo Game Boy Emulator
      3 * Copyright (C) 2012  Ignacio Sanchez
      4 
      5 * This program is free software: you can redistribute it and/or modify
      6 * it under the terms of the GNU General Public License as published by
      7 * the Free Software Foundation, either version 3 of the License, or
      8 * any later version.
      9 
     10 * This program is distributed in the hope that it will be useful,
     11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
     13 * GNU General Public License for more details.
     14 
     15 * You should have received a copy of the GNU General Public License
     16 * along with this program.  If not, see http://www.gnu.org/licenses/
     17 *
     18 */
     19
     20#pragma once
     21#ifndef _TEXTURE_H
     22#define	_TEXTURE_H
     23
     24#import <GLKit/GLKit.h>
     25
     26class TextureManager;
     27
     28class Texture
     29{
     30
     31    friend class TextureManager;
     32
     33private:
     34    GLuint m_theTexture;
     35    int m_iWidth;
     36    int m_iHeight;
     37    bool m_bIsCompressed;
     38    char m_strName[256];
     39
     40public:
     41    Texture(void)
     42    {
     43        m_theTexture = 0;
     44        m_iWidth = 0;
     45        m_iHeight = 0;
     46        m_bIsCompressed = 0;
     47        m_strName[0] = 0;
     48    };
     49
     50    GLuint GetID(void) const
     51    {
     52        return m_theTexture;
     53    };
     54
     55    int GetWidth(void) const
     56    {
     57        return m_iWidth;
     58    };
     59
     60    int GetHeight(void) const
     61    {
     62        return m_iHeight;
     63    };
     64
     65    bool IsCompressed(void) const
     66    {
     67        return m_bIsCompressed;
     68    };
     69
     70    const char* GetName(void) const
     71    {
     72        return m_strName;
     73    };
     74};
     75
     76#endif	/* _TEXTURE_H */