# PySoy's textures declarations # # Copyright (C) 2006,2007,2008 PySoy Group # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 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 Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program; if not, see http://www.gnu.org/licenses # # $Id$ cimport gl cimport py cimport math cimport ogg cimport cairo cimport stdio cimport soy._internals cimport soy.colors cdef class Texture (soy._internals.Loadable) : cdef gl.GLuint _textureID cdef gl.GLenum _target cdef void* _mutex cdef int _bytes cdef int _chans cdef gl.GLsizei _width cdef gl.GLsizei _height cdef gl.GLsizei _depth cdef int _isAnimated cdef gl.GLfloat _animate[3] cdef gl.GLfloat _scaleX cdef gl.GLfloat _scaleY cdef gl.GLfloat _scaleZ cdef float _aspect cdef int _update cdef gl.GLubyte *_texels # Lookup Arrays cdef int _types[5] cdef int _formats[5] # General C functions cdef void _resize ( self, int, int, int, int, int ) nogil cdef int _squareup ( self, int ) nogil # WindowLoop functions cdef void _enable ( self ) nogil cdef void _disable ( self ) nogil cdef class Print (Texture) : cdef cairo.cairo_surface_t* _surface cdef cairo.cairo_t* _context cdef soy.colors.Color _background cdef soy.colors.Color _foreground cdef object _text cdef object _font # General C functions cdef void _draw ( self ) cdef class Video (Texture) : cdef int _stage # -1=Null, 0=New, 1=Header, 2=Decode cdef ogg.ogg_stream_state _stream cdef ogg.theora_info _info cdef ogg.theora_comment _comment cdef ogg.theora_state _decode cdef double _startTime cdef double _frameTime