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 9155531
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:36:51+00:00 2026-06-17T12:36:51+00:00

I call glTexImage2D with a parameter level = 0. Then I call glGenerateMipmap(GL_TEXTURE_2D). What

  • 0

I call glTexImage2D with a parameter level = 0. Then I call glGenerateMipmap(GL_TEXTURE_2D). What happens with GL_TEXTURE_BASE_LEVEL and GL_TEXTURE_MAX_LEVEL ? I assume that they are automatically set this way:

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 0);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, mipmapsCount - 1);

Later I can set above parameters manually and for example reduce the max level. Is that right ?

  • 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-06-17T12:36:52+00:00Added an answer on June 17, 2026 at 12:36 pm

    GL_TEXTURE_BASE_LEVEL and GL_TEXTURE_MAX_LEVEL values of the mipmap stack are derived as you mention. Those values define the range of mipmap levels required for what’s called texture completeness. When you ask OpenGL to generate mipmaps automatically using glGenerateMipmap, the entire stack is populated. If you use glTextureStorage to specify the number of levels, GL_TEXTURE_MAX_LEVEL is set to one less than the maximum level provided in the call.

    You’re also correct that you can modify the base and max levels after building the mipmap stack, but if you’re having OpenGL build the mipmap stack, I don’t think it would gain you very much. If I remember this correctly, you’d modify the base and max levels when you were loading the mipmaps (by repeatedly calling glTexImage* and incrementing the level parameter) so that you wouldn’t need to load the entire mipmap stack (you might do this to save texture memory, or perhaps to have better control over sampling for higher [i.e., smaller mipmaps in the stack] levels). You might also use the GL_TEXTURE_MIN_LOD, and GL_TEXTURE_MAX_LOD, to control which mipmaps from the mipmap stack were used in texturing. On reason for this was to allow asynchronous loading of mipmap levels while texturing.

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

Sidebar

Related Questions

I call from a spreadsheet module a function that does some processing in another
I call an URL that returns me JSON (I use JSONKit). I convert it
I call a method passing a parameter. If this parameter is equal to something
Call me crazy, but I'm the type of guy that likes constructors with parameters
WhenI call this stored procedure: ALTER PROCEDURE [dbo].[GetSorted] ( @OrderByColumn nvarchar(256) ) AS SET
I call SQLiteDatabase.query and get a Cursor. While I'm still iterating over that cursor,
If I use a glTexImage2D call to create a texture with a buffer like
I call an image using the displayMainImage.php link below and that works fine, it
I call the jsp page with passing the parameter as array variable var textval1=new
I call method in webservice that return string true or false and take two

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.