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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T02:49:28+00:00 2026-05-20T02:49:28+00:00

I have an undefined number of display context and each will display a texture.

  • 0

I have an undefined number of display context and each will display a texture. When I call glGenTextures I get the same name returned across all display contexts. Will this work? Even though they have the same name will they still store and display different textures? If not what should do to get around this?

  • 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-20T02:49:29+00:00Added an answer on May 20, 2026 at 2:49 am

    Getting the same name from glGenTexture and having the same texture displayed is not the same thing.

    Texture names are just integers at a context’s discretion, usually starting with 1, and incrementing with every glGenTexture, but not necessarily so. An implementation is not required to work like that (although most do). However, you could in theory also get any more or less “random” number, such for example an integer that increments for any kind of object (i.e. not just textures, but also buffers and shaders), or even a 32 bit pointer address in the driver’s address space, or some other esotheric thing. There is no requirement that a name must be something specific.

    In legacy OpenGL, you could even make up your own names instead of using glGenTexture, but that is no longer legal now. I’m not sure what they thought when that was allowed, but anyway… 🙂

    The same number (name) in a different context will usually be a different texture, or possibly no texture at all. So, if you do see the same texture in different context with the same texture name, then you either have shared contexts, or the driver is buggy.

    Note that if you use wglCreateContextAttribsARB, the second parameter is the handle of an already existing context (or null). If you supply a context handle here, you will have shared contexts even without explicitly calling glShareLists. Maybe that is what happened by accident.

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

Sidebar

Related Questions

I have a form with name orderproductForm and an undefined number of inputs. I
I have this XML: <?xml version= 1.0?> <r> <floor _number='1'> <shop> <name>undefined</name> <number>101</number> </shop>
For example, i have undefined number of a pairs(key, value). And I want to
So I have a list of objects containing a name and number bound to
For my application I have to use a undefined number of different detection strategies.
Using WPF I have a list of rectangles (which can have an undefined number
in my program I have undefined variable somewhere: global name 'cmd' is not defined
I have a number of sub-games, SubGame1, SubGame2 etc. Each is derived from a
I have a toolbar like this tbar: [{ xtype : 'textfield', name : 'number',
I have a *.jar file. Its *.java reads from console a undefined number of

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.