/* * GRacer * * Copyright (C) 1999 Takashi Matsuda * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef __GRACER_TEXTURE_H__ #define __GRACER_TEXTURE_H__ #include #include #include "gr_memory.h" #include "gr_scene_option.h" #ifdef __cplusplus extern "C" { #if 0 } #endif #endif /* __cplusplus */ typedef struct _GrTexture GrTexture; struct _GrTexture { GrRef ref; char *key; GLint width, height; GLuint name; GLenum format; GLubyte *texel; int use_mipmap; int use_linear; }; GrTexture* gr_texture_new (void); GrTexture* gr_texture_new_from_file (char *filename); GrTexture* gr_texture_new_from_data (void *data, int size); void gr_texture_setup_gl (GrTexture *texture, GrObjectDrawOption option); void gr_texture_release_gl (GrTexture *texture); void gr_texture_bind (GrTexture *texture); void gr_texture_set_active (int state); int gr_texture_get_active (void); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GRACER_TEXTURE_H__ */