Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7399395
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T04:03:19+00:00 2026-05-29T04:03:19+00:00

My game normally uses GL_TEXTURE_RECTANGLE_EXT to draw 2D textures. However, since this isn’t supported

  • 0

My game normally uses GL_TEXTURE_RECTANGLE_EXT to draw 2D textures. However, since this isn’t supported on all hardware, I am trying to get GL_TEXTURE_2D to work. Initially most images showed up as pure white until I started calling

glTexParameteri(caps->extension, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(caps->extension, GL_TEXTURE_MIN_FILTER, GL_LINEAR);

once per image drawn, instead of once per frame. (With RECTANGLE_EXT, I can get away with once per frame and it works fine.)

Okay, so now the images show up. Problem is though, they draw as solid white once the very first time that texture is drawn. Then after that, they draw properly. This results in lots of flashes of white the first time any images are drawn, and this resolves itself as the images get reused. Any ideas what could cause this?

I have “power of 2” rounding up turned on at the moment as well, so all textures are being rounded to the nearest power of 2 when first created.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T04:03:20+00:00Added an answer on May 29, 2026 at 4:03 am

    Someone answered this on the SDL forums. “By default, OpenGL DOES enable mipmapping unless you specifically tell it to use GL_LINEAR or GL_NEAREST in glTexParameteri(), which is why it will be white until you set it to that otherwise.” (i.e. the mipmaps are being used, but they are not set up.)

    Another poster wrote: “Technically OpenGL expects (by default) you to upload all the mipmaps, like calling gluBuild2DMipmaps on every texture (even 2D UI art) or your own mipmapping routine (my choice, much faster than the glu32.dll on Windows at least), but of course one does not even desire mipmapping on these textures (or the wasted 33% extra memory involved) so it is far more elegant to just change the glTexParameter settings.”

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating a simple Sudoku game. Since this is my first big i
I'm trying to make my first android game and to do this I made
A game that I play stores all of its data in a .DAT file.
I have a little game written in C#. It uses a database as back-end.
I have a struct named Game with an array of levels, defined like this:
As a quick overview: I'm trying to make a game of pool using Box2D
When I load textures from images normally, they are upside down because of OpenGL's
Trying to integrate Ninject with XNA however I am having a bit of pain
Project : Game in Flex builder 4 (Actionscript Project) Language : Actionscript 3 This
Mario plays multiple games. Normally, while playing in a game, when he jumps [underneath]

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.