![]() When you have specified a texture but no mipmaps and use a texturing filtering mode that uses mipmaps, OpenGL calls the texture "incomplete" and treats it as if you had no texture at all. Second, you didn't specify any mipmaps but the texture filter mode defaults to GL_NEAREST_MIPMAP_LINEAR. ![]() ![]() The second parameter to glTexImage2D is wrong if you're trying to display color. GlTexImage2D( GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT24/*3*/, w, w, 0, GL_RGB, GL_UNSIGNED_BYTE, newSurface->pixels ) GlBindTexture( GL_TEXTURE_2D, this->m_texture ) SDL_BlitSurface( this->m_surface, 0, newSurface, 0) SDL_Surface* newSurface = SDL_CreateRGBSurface(
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |