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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:45:51+00:00 2026-06-15T04:45:51+00:00

I have an application where I draw frames to a texture using the FBO

  • 0

I have an application where I draw frames to a texture using the FBO extensions.

These frames are then be displayed to different windows that are opened while the application is running. This means that textures can be created and pooled before the OpenGL context for any new window is created and wglShareLists is called.

Currently I have to do glReadPixels, glMapBufferRange and glTexSubImage to move the texture into the different window contexts, which is rather inefficient.

Any ideas on how to improve on this? Should I create multiple (as much as the maximum number of windows at any time ~4) OpenGL contexts and hidden windows during program startup? What would be the overhead of that?

Or even better, is there a way to make textures shared between existing and future OpenGL contexts?

  • 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-15T04:45:52+00:00Added an answer on June 15, 2026 at 4:45 am

    Sharing Lists between OpenGL contexts will share all data encapsulating buffer objects as well (textures, vertex buffer objects, pixel buffer objects) but not abstract collection objects (framebuffer objects, vertex array objects). It is mandatory to create the sharing, before creating any new named objects in the new context, as creating names before the sharing may result in namespace collisions. Already created objects are shared. But this of course requires precautions, because what would happen if both context A and B had textures with ID=1? If however A had a lot of textures and B none, then the texture names of A can be transferred to B just fine. That’s the caveat.

    However if you just want to render to multiple windows: It is perfectly possible to use a single OpenGL context on an arbitrary number of windows, as long as their PIXELFORMATDESCRIPTOR is compatible. That’s what the HDC parameter of wglMakeCurrent is meant for. If a context was strictly bound to a single window, wglMakeCurrent had only a HRC parameter.

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

Sidebar

Related Questions

I have a Flex application in which I draw a rectangle using: <s:Rect height=20
I have application that makes different queries with different results so the caching in
I have an application that extends a Frame. Then, it'll display a few lines
I have an application that is just a surfaceview. All i do is draw
Say I have the following routes that are constrained to specific subdomains: App::Application.routes.draw do
Suppose I have an application that will draw 20 little UIImageViews on the screen.
I have mobile web application where I draw graphics by using CSS3/HTML5. It looks
I have an application which has several buttons, for these I use different drawable
I have the following code in my Rails application's routes file: MyApp::Application.routes.draw do constraints
I have integrate draw line in my application i have not used OpenGL or

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.