Changeset 4830 in orxonox.OLD for orxonox/trunk/src/lib/graphics
- Timestamp:
- Jul 11, 2005, 5:43:37 PM (20 years ago)
- Location:
- orxonox/trunk/src/lib/graphics
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/graphics/graphics_engine.cc
r4817 r4830 67 67 } 68 68 69 /** 70 * initializes the GraphicsEngine with default settings. 71 */ 69 72 int GraphicsEngine::init() 70 73 { 71 this->initVideo(640,480,16); 72 } 74 if (this->isInit) 75 return -1; 76 this->initVideo(640, 480, 16); 77 this->isInit = true; 78 } 79 80 /** 81 * loads the GraphicsEngine's settings from a given ini-file and section 82 * @param iniParser the iniParser to load from 83 * @param section the Section in the ini-file to load from 84 * @returns nothing usefull 85 */ 86 int GraphicsEngine::initFromIniFile(IniParser* iniParser) 87 { 88 89 // looking if we are in fullscreen-mode 90 const char* fullscreen = iniParser->getVar(CONFIG_NAME_FULLSCREEN, CONFIG_SECTION_VIDEO, "0"); 91 if (strchr(fullscreen, '1')) 92 this->fullscreenFlag = SDL_FULLSCREEN; 93 94 95 96 // looking if we are in fullscreen-mode 97 const char* textures = iniParser->getVar(CONFIG_NAME_TEXTURES, CONFIG_SECTION_VIDEO_ADVANCED, "0"); 98 if (strchr(textures, '1')) 99 this->texturesEnabled = true; 100 else 101 this->texturesEnabled = false; 102 103 // searching for a usefull resolution 104 SubString resolution(iniParser->getVar(CONFIG_NAME_RESOLUTION, CONFIG_SECTION_VIDEO, "640x480"), 'x'); 105 this->initVideo(atoi(resolution.getString(0)), atoi(resolution.getString(1)), 16); 106 } 107 108 73 109 74 110 /** … … 123 159 124 160 /** 125 * loads the GraphicsEngine's settings from a given ini-file and section126 * @param iniParser the iniParser to load from127 * @param section the Section in the ini-file to load from128 * @returns nothing usefull129 */130 int GraphicsEngine::initFromIniFile(IniParser* iniParser)131 {132 // searching for a usefull resolution133 SubString resolution(iniParser->getVar(CONFIG_NAME_RESOLUTION, CONFIG_SECTION_VIDEO, "640x480"), 'x');134 this->initVideo(atoi(resolution.getString(0)), atoi(resolution.getString(1)), 16);135 136 // looking if we are in fullscreen-mode137 const char* fullscreen = iniParser->getVar(CONFIG_NAME_FULLSCREEN, CONFIG_SECTION_VIDEO, "0");138 if (strchr(fullscreen, '1'))139 this->setFullscreen(true);140 141 // looking if we are in fullscreen-mode142 const char* textures = iniParser->getVar(CONFIG_NAME_TEXTURES, CONFIG_SECTION_VIDEO_ADVANCED, "0");143 if (strchr(textures, '1'))144 this->texturesEnabled = true;145 else146 this->texturesEnabled = false;147 148 }149 150 151 152 /**153 161 * sets the Window Captions and the Name of the icon. 154 162 * @param windowName The name of the Window -
orxonox/trunk/src/lib/graphics/importer/model.h
r4806 r4830 26 26 * \todo implement this stuff 27 27 */ 28 typedef enum MODEL_TYPE {MODEL_DISPLAY_LIST, 29 MODEL_VERTEX_ARRAY}; 28 typedef enum MODEL_TYPE { 29 MODEL_DISPLAY_LIST, 30 MODEL_VERTEX_ARRAY 31 }; 30 32 31 33 … … 36 38 37 39 //! an enumerator for VERTEX_FORMAT 38 typedef enum VERTEX_FORMAT { VERTEX_ONLY = VERTEX, 39 VERTEX_NORMAL = NORMAL, 40 VERTEX_TEXCOORD = TEXCOORD, 41 VERTEX_TEXCOORD_NORMAL = NORMAL | TEXCOORD }; 40 typedef enum VERTEX_FORMAT { 41 VERTEX_ONLY = VERTEX, 42 VERTEX_NORMAL = NORMAL, 43 VERTEX_TEXCOORD = TEXCOORD, 44 VERTEX_TEXCOORD_NORMAL = NORMAL | TEXCOORD 45 }; 42 46 43 47 //////////////////// -
orxonox/trunk/src/lib/graphics/text_engine.cc
r4746 r4830 254 254 glTranslatef(pos.x, pos.y, 0); 255 255 256 c har* tmpText = this->text;256 const char* tmpText = this->text; 257 257 while (*tmpText != '\0') 258 258 { … … 921 921 // drawing all the texts 922 922 tIterator<Text>* textIterator = textList->getIterator(); 923 Text* text = textIterator->nextElement();924 while( text != NULL)925 { 926 text->draw();927 text = textIterator->nextElement();923 Text* drawText = textIterator->nextElement(); 924 while( drawText != NULL) 925 { 926 drawText->draw(); 927 drawText = textIterator->nextElement(); 928 928 } 929 929 delete textIterator;
Note: See TracChangeset
for help on using the changeset viewer.