Re: [fltk.opengl] Fl_Gl_Window flashes on context creation (Windows7)

2013-04-10 Thread Ivan Nedrehagen

  I use a Dell precision

   What does this means in terms of the graphics card?
   Those specifics are probably useful to help replicate.

   I don't have any dell equipment here (though one of the other
   devs might), but depending on the graphics, that might help
   zero it in.


That means a NVIDIA Quadro FX 880M graphics card

  I am wondering about the drivers also, but I cannot say for sure. I did 
  upgrade my drivers before posting just to make sure, but still it is 
  strange that I cannot see this behaviour on any other opengl program.
  I did download and compile freeglut, their demos run smooth without any 
  problems.

   I see.

   Well, you could open an STR with all the details we've found to date.

   It's going to be a problem though if the devs can't replicate.

   If you're able to identify the issue, supply a patch, or at least let us
   know what changes the problem if you try messing around with the FLTK 
 innards.
   You may find something in the FLTK opengl win32 initialization code that
   needs adjusting.


I also suspect that there might be problems replicating this bug, so I will try 
to do some digging of my own. Since I have built the FLTK library on my own, I 
might tinker a bit with the source and might run a strace (or windows equiv.) 
on the glut demos and the fltk demos to see if there might be a difference.

   You might try tweaking the freeglut examples to enable features FLTK is
   enabling (double buffer mode, etc) to see if you can perhaps replicate
   the problem outside FLTK, to see if it's a particular opengl feature 
 causing
   the problem.

This will be the first Ill be checking. I'll get back when I have some results.

___
fltk-opengl mailing list
fltk-opengl@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-opengl


Re: [fltk.opengl] Fl_Gl_Window flashes on context creation (Windows7)

2013-04-10 Thread Greg Ercolano
On 04/09/13 23:24, Ivan Nedrehagen wrote:
 I also suspect that there might be problems replicating this bug, so I will 
 try to do some digging of my own. Since I have built the FLTK library on my 
 own, I might tinker a bit with the source and might run a strace (or windows 
 equiv.) on the glut demos and the fltk demos to see if there might be a 
 difference.

Yes, strace might be good, and also I think there's a way to view
the X11 messages going back and forth.. It might be as easy as setting
an environment variable, or attaching a program to the process or some 
such..
can't remember.

Sometimes just running the app through a remote xsession would let you
sniff the X11 network messages (ethereal, or wireshark, or whatever its
called these days which sniffs network packets and deconstructs them at
the protocol level into meaningful messages. Used this once to solve an 
STR
a few years ago where our code was creating zero sized windows IIRC)

___
fltk-opengl mailing list
fltk-opengl@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-opengl


Re: [fltk.opengl] Fl_Gl_Window flashes on context creation (Windows7)

2013-04-09 Thread Ivan Nedrehagen

   Which version of FLTK (1.3.1, 1.3.2..)

I use FLTK 1.3.2

   Also: do the FLTK opengl test programs cube.exe and shape.exe exhibit
   this same behavior?


Yes they do.


   I cannot replicate with Win7 + mingw-64 (gcc4.5.2) + fltk 1.3.x-svn 
 current;

I am using the 4.7.2 rev 9 with Win 7

   Hardware is a mac mini running win7/64 ultimate, default drivers.

I use a Dell precision

   If you're getting this behavior with all the GL demos,
   try downloading GLUT and see if their demos do it too.
   If so, it's probably your GL drivers. If not, let us know..


I am wondering about the drivers also, but I cannot say for sure. I did upgrade 
my drivers before posting just to make sure, but still it is strange that I 
cannot see this behaviour on any other opengl program.

I did download and compile freeglut, their demos run smooth without any 
problems.

___
fltk-opengl mailing list
fltk-opengl@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-opengl


Re: [fltk.opengl] Fl_Gl_Window flashes on context creation (Windows7)

2013-04-09 Thread Greg Ercolano
On 04/09/13 10:07, Ivan Nedrehagen wrote:
  Which version of FLTK (1.3.1, 1.3.2..)
 
 I use FLTK 1.3.2

  Also: do the FLTK opengl test programs cube.exe and shape.exe exhibit
  this same behavior?
 
 Yes they do.

Right, good to know.

  I cannot replicate with Win7 + mingw-64 (gcc4.5.2) + fltk 1.3.x-svn 
 current;
 
 I am using the 4.7.2 rev 9 with Win 7
 
  Hardware is a mac mini running win7/64 ultimate, default drivers.
 
 I use a Dell precision

What does this means in terms of the graphics card?
Those specifics are probably useful to help replicate.

I don't have any dell equipment here (though one of the other
devs might), but depending on the graphics, that might help
zero it in.

 I am wondering about the drivers also, but I cannot say for sure. I did 
 upgrade my drivers before posting just to make sure, but still it is strange 
 that I cannot see this behaviour on any other opengl program.
 I did download and compile freeglut, their demos run smooth without any 
 problems.

I see.

Well, you could open an STR with all the details we've found to date.

It's going to be a problem though if the devs can't replicate.

If you're able to identify the issue, supply a patch, or at least let us
know what changes the problem if you try messing around with the FLTK 
innards.
You may find something in the FLTK opengl win32 initialization code that
needs adjusting.

You might try tweaking the freeglut examples to enable features FLTK is
enabling (double buffer mode, etc) to see if you can perhaps replicate
the problem outside FLTK, to see if it's a particular opengl feature 
causing
the problem.
___
fltk-opengl mailing list
fltk-opengl@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-opengl


Re: [fltk.opengl] Fl_Gl_Window flashes on context creation (Windows7)

2013-04-07 Thread Greg Ercolano
On 04/02/13 02:28, Ivan Nedrehagen wrote:
 Does anyone know how I can get the Fl_Gl_Window to play nicely in windows?

Which version of FLTK (1.3.1, 1.3.2..)

Also: do the FLTK opengl test programs cube.exe and shape.exe exhibit
this same behavior?

I cannot replicate with Win7 + mingw-64 (gcc4.5.2) + fltk 1.3.x-svn 
current;
your app opens right up, no weird behavior while it opens.
Same with the cube.exe and shape.exe demos.

Hardware is a mac mini running win7/64 ultimate, default drivers.

If you're getting this behavior with all the GL demos,
try downloading GLUT and see if their demos do it too.
If so, it's probably your GL drivers. If not, let us know..

___
fltk-opengl mailing list
fltk-opengl@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-opengl


Re: [fltk.opengl] Fl_Gl_Window flashes on context creation(Windows7)

2013-04-03 Thread Ivan Nedrehagen

 You may need to update your libraries or try another compiler, the program
 runs fine on my Ubuntu64 Linux.


Yes it does run fine on my Ubuntu too. The problem are the context creation 
when running in Windows7. This is using the FLTK 1.3.2 library, compiled with 
the mingw64 gcc compiler (v.4.7.2 rev9) with the x86_64-w64-mingw32 target.
___
fltk-opengl mailing list
fltk-opengl@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-opengl


[fltk.opengl] Fl_Gl_Window flashes on context creation (Windows7)

2013-04-02 Thread Ivan Nedrehagen
This was originally a FTGL question on stack overflow

http://stackoverflow.com/questions/15568520/fl-gl-window-flashes-on-creation

I have some simple fltk code:

#include FL/Fl.H
#include FL/Fl_Gl_Window.H
#include FL/gl.h

class MyWin : public Fl_Gl_Window {
  public:
  MyWin(int x,int y, int w,int h, const char*l = 0) :
Fl_Gl_Window(x,y,w,h,l)
  {
  }
  void draw();
  void resize(int X,int Y,int W,int H) {
Fl_Gl_Window::resize(X,Y,W,H);
glLoadIdentity();
glViewport(0,0,W,H);
glOrtho(-W,W,-H,H,-1,1);
redraw();
  }
};

void MyWin::draw() {
  ortho();
  glBegin(GL_QUADS);
glColor3d(1,0,0);
glVertex3f(10,10,0);
glColor3d(0,1,0);
glVertex3f(w()-10,10,0);
glColor3d(0,0,1);
glVertex3f(w()-10,h()-10,0);
glColor3d(1,1,0);
glVertex3f(10,h()-10,0);
  glEnd();
}

int main(int argc,char* argv[]) {
  Fl_Window win(500,500, OpenGL);
  MyWin window(10,10,win.w()-20,win.h()-20);
  win.end();
  win.resizable(window);
  win.show(argc,argv);
  return Fl::run();
}

This example compiles and links perfectly for me on Windows 7 using mingw, but 
when I run it, it gets quite ugly. First the screen turns dark, and flashes 
with white. Then the screen is redrawn and my window appears. The same happens 
when I shut down the application.

I have tried to remove the drawing code, the same happens, then I removed the 
gl window from the outer window and it still happens. So it is not affected by 
the actual drawing. So my suspicion is that the opengl context creation causes 
this. Removing the creation of the gl window supports this hypothesis as the 
window now appears quietly.

Does anyone know how I can get the Fl_Gl_Window to play nicely in windows?
___
fltk-opengl mailing list
fltk-opengl@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-opengl