Changeset 8312 in orxonox.OLD for trunk/src/lib
- Timestamp:
- Jun 11, 2006, 12:49:25 PM (19 years ago)
- Location:
- trunk/src/lib
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/importer/material.cc
r8037 r8312 103 103 * @brief sets the material with which the following Faces will be painted 104 104 */ 105 bool Material::select() const105 bool Material::select() const 106 106 { 107 107 if (unlikely(this == Material::selectedMaterial)) … … 397 397 assert(textureNumber < this->textures.size()); 398 398 399 glActiveTexture(0); 399 // HACK 400 glActiveTexture(textureNumber); 400 401 glEnable(GL_TEXTURE_2D); 401 402 glBindTexture(GL_TEXTURE_2D, this->textures[textureNumber].getTexture()); -
trunk/src/lib/graphics/importer/texture.cc
r8293 r8312 151 151 152 152 153 Texture::Texture(GLenum target )153 Texture::Texture(GLenum target, unsigned int width, unsigned int height, unsigned int channels, GLenum type) 154 154 { 155 155 this->init(); 156 GLuint texture ;156 GLuint texture = 0; 157 157 Texture::generateTexture(texture, target); 158 159 glBindTexture(target, texture); 160 161 unsigned int* pixels = new unsigned int[width * height * channels]; 162 memset(pixels, 0, width * height * channels * sizeof(unsigned int)); 163 164 165 glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); 166 glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); 167 glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); 168 glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); 169 170 glTexImage2D(target, 0, channels, width, height, 0, type, GL_UNSIGNED_INT, pixels); 171 172 173 174 delete[] pixels; 175 158 176 this->data->setTexture(texture); 159 177 } … … 374 392 // printf("%s, w:%d h:%d, 0x%x\n", this->getName(), surface->w, surface->h, target); 375 393 394 /* control the mipmap levels */ 395 glTexParameterf(GL_TEXTURE_ENV, GL_TEXTURE_MIN_LOD, 5); 396 glTexParameterf(GL_TEXTURE_ENV, GL_TEXTURE_MAX_LOD, 0); 397 376 398 // build the MipMaps automaticaly 377 399 errorCode = gluBuild2DMipmaps(target, format, … … 400 422 glTexParameteri(target, GL_TEXTURE_MAG_FILTER, GL_LINEAR); 401 423 402 /* control the mipmap levels */ 403 glTexParameterf(GL_TEXTURE_ENV, GL_TEXTURE_MIN_LOD, 5); 404 glTexParameterf(GL_TEXTURE_ENV, GL_TEXTURE_MAX_LOD, 0); 405 } 424 } -
trunk/src/lib/graphics/importer/texture.h
r8145 r8312 50 50 Texture(); 51 51 Texture(const Texture& texture); 52 Texture(GLenum target );52 Texture(GLenum target, unsigned int width, unsigned int height, unsigned int channels, GLenum type); 53 53 Texture(const std::string& imageName, GLenum target = GL_TEXTURE_2D); 54 54 Texture(SDL_Surface* surface, GLenum target = GL_TEXTURE_2D); -
trunk/src/lib/gui/gl/glgui_cursor.cc
r8309 r8312 33 33 this->init(); 34 34 35 this->subscribeEvent(ES_ MENU, EV_MOUSE_MOTION);36 this->subscribeEvent(ES_ MENU, EV_WINDOW_FOCUS);35 this->subscribeEvent(ES_ALL, EV_MOUSE_MOTION); 36 this->subscribeEvent(ES_ALL, EV_WINDOW_FOCUS); 37 37 38 38 -
trunk/src/lib/gui/gl/glgui_handler.cc
r8145 r8312 40 40 41 41 42 EventHandler::getInstance()->withUNICODE(ES_ MENU, true );42 EventHandler::getInstance()->withUNICODE(ES_ALL, true ); 43 43 44 44 this->cursor = NULL; 45 45 for (unsigned int i = 0; i < EV_NUMBER; i++) 46 46 { 47 this->subscribeEvent(ES_ MENU, i);47 this->subscribeEvent(ES_ALL, i); 48 48 } 49 49 } -
trunk/src/lib/gui/gl/glgui_widget.cc
r8145 r8312 234 234 235 235 236 236 237 void GLGuiWidget::hide() 237 238 { -
trunk/src/lib/gui/gl/glgui_widget.h
r8148 r8312 53 53 void show(); 54 54 void hide(); 55 56 55 57 56 void setParentWidget(GLGuiWidget* parent);
Note: See TracChangeset
for help on using the changeset viewer.