00001 /* 00002 Copyright (c) 2008, Luke Benstead. 00003 All rights reserved. 00004 00005 Redistribution and use in source and binary forms, with or without modification, 00006 are permitted provided that the following conditions are met: 00007 00008 * Redistributions of source code must retain the above copyright notice, 00009 this list of conditions and the following disclaimer. 00010 * Redistributions in binary form must reproduce the above copyright notice, 00011 this list of conditions and the following disclaimer in the documentation 00012 and/or other materials provided with the distribution. 00013 00014 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 00015 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 00016 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00017 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 00018 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00019 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00020 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 00021 ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00022 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00023 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00024 */ 00025 00026 #ifndef KM_GL_MATRIX_H_INCLUDED 00027 #define KM_GL_MATRIX_H_INCLUDED 00028 00029 #define KM_GL_MODELVIEW 0x1700 00030 #define KM_GL_PROJECTION 0x1701 00031 #define KM_GL_TEXTURE 0x1702 00032 00033 typedef unsigned int kmGLEnum; 00034 00035 #include "../mat4.h" 00036 #include "../vec3.h" 00037 00038 #ifdef __cplusplus 00039 extern "C" { 00040 #endif 00041 00042 void kmGLPushMatrix(void); 00043 void kmGLPopMatrix(void); 00044 void kmGLMatrixMode(kmGLEnum mode); 00045 void kmGLLoadIdentity(void); 00046 void kmGLLoadMatrix(const kmMat4* pIn); 00047 void kmGLMultMatrix(const kmMat4* pIn); 00048 void kmGLTranslatef(float x, float y, float z); 00049 void kmGLRotatef(float angle, float x, float y, float z); 00050 void kmGLScalef(float x, float y, float z); 00051 void kmGLGetMatrix(kmGLEnum mode, kmMat4* pOut); 00052 00053 #ifdef __cplusplus 00054 } 00055 #endif 00056 00057 #endif // MATRIX_H_INCLUDED