00001 00014 /*************************************************************************** 00015 * Copyright (C) 2007 by Jan Koci * 00016 * honza.koci@email.cz * 00017 * http://kengine.sourceforge.net/tutorial/ 00018 * * 00019 * This program is free software; you can redistribute it and/or modify * 00020 * it under the terms of the GNU General Public License as published by * 00021 * the Free Software Foundation; either version 2 of the License, or * 00022 * (at your option) any later version. * 00023 * * 00024 * This program is distributed in the hope that it will be useful, * 00025 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00026 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00027 * GNU General Public License for more details. * 00028 * * 00029 * You should have received a copy of the GNU General Public License * 00030 * along with this program; if not, write to the * 00031 * Free Software Foundation, Inc., * 00032 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 00033 ***************************************************************************/ 00034 00035 00036 #include "K3dMngGraphics.h" 00037 00038 K3dMngGraphics::K3dMngGraphics(K3dGameData *_pGameData): 00039 K3dTextureBuild(_pGameData), 00040 K3dFontBmp(_pGameData), 00041 K2dImageBuild(_pGameData), 00042 K2dImageWork(_pGameData), 00043 K3dMngGui(_pGameData) 00044 { 00045 cout << "K3dMngGraphics::K3dMngGraphics()" << endl; 00046 m_pGameData = _pGameData; 00047 m_pOpenGL = m_pGameData->GetOpenGL(); 00048 } 00049 00050 00051 00052 K3dMngGraphics::~K3dMngGraphics(void) 00053 { 00054 cout << "K3dMngGraphics::~K3dMngGraphics(void)" << endl; 00055 } 00056 00057 void K3dMngGraphics::InitMngGraphics() 00058 { 00059 cout << "void K3dMngGraphics::InitMngGraphics()" << endl; 00060 LoadTextures(); 00061 LoadBmpFonts(); 00062 LoadImages(); 00063 LoadGui(); 00064 } 00065 00066 void K3dMngGraphics::UpdateMngGraphics() 00067 { 00068 00069 } 00070 00071 void K3dMngGraphics::DrawMngGraphics() 00072 { 00073 m_pOpenGL->Set2DProjection(); 00074 ResetValues(); 00075 // Set to font that arrives new frame 00076 SetFrame(true); 00077 // Disable lighting 00078 glDisable(GL_LIGHTING); 00079 // Draw font 00080 DrawFontBmp(); 00081 // Disable depth test 00082 glDisable(GL_DEPTH_TEST); 00083 DrawImages(); 00084 DrawGui(); 00085 } 00086 00087 void K3dMngGraphics::DeleteMngGraphics() 00088 { 00089 cout << "void K3dMngGraphics::DeleteMngGraphics()" << endl; 00090 DeleteFontBmp(); 00091 DeleteImages(); 00092 DeleteGui(); 00093 } 00094