FLTK logo

STR #77

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]
 

Return to Bugs & Features | Roadmap 1.1 | SVN ⇄ GIT ]

STR #77

Application:FLTK Library
Status:1 - Closed w/Resolution
Priority:4 - High, e.g. key functionality not working
Scope:2 - Specific to an operating system
Subsystem:MacOS
Summary:Fl_Gl_Window in Fl_Tabs
Version:1.1.4rc1
Created By:rsmith.ncbi.nlm.nih
Assigned To:matthiaswm
Fix Version:1.1-current
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:


Name/Time/Date Filename/Size  
 
#1 rsmith.ncbi.nlm.nih
12:17 Jun 10, 2003
glhiding.fl
2k
 
 
#2 rsmith.ncbi.nlm.nih
09:28 Jul 15, 2003
fltk-opengl.patch
1k
 
     

Trouble Report Comments:


Name/Time/Date Text  
 
#1 rsmith.ncbi.nlm.nih
12:17 Jun 10, 2003
If you have more than one Fl_Gl_Window in a Fl_Tabs the first one to be displayed will not hide when it is supposed to.

In general this happens when you have more than one Fl_Gl_Window in your application (even in different desktop windows).  The first one to be displayed will not hide.

After you hide and show the main window containing that Fl_Gl_Window the problem goes away.

Problem seen on Mac OSX 10.1 and 10.2 with FLTK 1.1.3 and 1.1.4rc1.  Does not appear on Windows 2000.
 
 
#2 mike
16:27 Jun 11, 2003
Since OpenGL windows (and subwindows) are implemented in software on OSX (since OSX doesn't do subwindows), this is likely a side-effect/bug in the emulation.

Not sure what needs to be done to fix it, but the example file you sent should be helpful.  Thanks!
 
 
#3 salah.gris.uni-tuebingen
01:40 Jun 13, 2003
This problem also exist in Windows. I am using fltk with windows and MS visual C++. I have an FL_Tabs with three groups, one of them contains an FL_GL_Window. After this FL_GL_Window is shown for the fisrt time, it will not hide when you choose other groups!
 
 
#4 rsmith.ncbi.nlm.nih
09:34 Jul 15, 2003
I think I have found a solution here.
The problem is with the first_context static variable in Fl_Gl_Choice.cxx, see functions: fl_create_gl_context() and fl_delete_gl_context().  I don't pretend to understand OpenGL context objects, but the problem arises because the first context created, which is used to create shared all subsuquent contexts is then never deleted.  Since the first Fl_Gl_Window has this as its own context it never properly hides.

The solution is (in fl_create_gl_context()) to create one GLContext, first_context, which is not associated with any window, then create all the other contexts shared with it.

That way we get the benefit of shared contexts (speed) without this bug.
 
 
#5 matt
22:54 Jul 16, 2003
This should b fixed in the current cvs. FLTK now keeps a list of all open contexts, so that deleting the very first context makes the second contrext the new shared context, etc. .  
 
#6 rsmith.ncbi.nlm.nih
08:22 Jul 18, 2003
I just tested what is in CVS and it does fix the bug. Thank you. But I like my solution (having one saved context that is shared by all windows) better since it runs faster. Particularly, when aglCreateContext is called with null for its second parameter (no shared context) it is taking over half a second. With a shared context it takes around .002 seconds. This produces a noticeable delay when a Fl_Gl_Window is shown.

This situation happens quite a bit since a hidden Gl window has no context. We want to put all of our Fl_Gl_Windows in Fl_Tabs, so whenever you switch tabs you hide the one window showing, deleting its context so that there is no context to share, then showing the new one, which has to create a new context from scratch. So you get a noticeable pause every time you switch tabs. It will also happen if you hide and redisplay a desktop window that contains all of your Gl_Windows.

I am running Mac OS 10.2.6 on a 933Mhz G4 with 256Mb and a Nvidia GeForce4 MX graphics card.  I would expect, unless other graphics cards speed up the internals of aglCreateContext, that this kind of delay will happen on most any Mac OSX system.
 
     

Return to Bugs & Features ]

 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.