• Advertisement

Archived

This topic is now archived and is closed to further replies.

Loading bitmaps with SDL

This topic is 5314 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m trying to load a bitmap with SDL for an OpenGL texture.
SDL_Surface *bitmap = SDL_LoadBMP(fileName);
    glGenTextures(1,&tex->texID);
    glBindTexture(GL_TEXTURE_2D,tex->texID);
    glTexImage2D(GL_TEXTURE_2D,0,3,bitmap->w,bitmap->h,0,GL_RGB,GL_UNSIGNED_BYTE,bitmap->pixels);
    SDL_FreeSurface( bitmap );
The afore doesn''t seem to be working for me though.

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement