RE: [fltk.general] Changes to x, y, w, h meaning in sub windows? [General Use]

8 views
Skip to first unread message

MacArthur, Ian (Leonardo, UK)

unread,
Jun 20, 2017, 5:10:31 AM6/20/17
to fltkg...@googlegroups.com
> I adopted your code and modified it to avoid overlaps.

Hmm, be interesting to see what Greg's code does on your system, entirely unmodified, too.

It'd be interesting to see what that does; I'm wondering if there might be something broken in your build, as some of the issues you report really ought not to be occurring.


> I'm still seeing strange behavior, and it doesn't look the same as yours.

I ran Greg's code (details below) and it worked *almost* the same as Greg showed (png attached) but the difference might be informative? Not sure.

> First, I had to comment out the line        //glViewport(0, 0, pixel_w(), pixel_h());


Hmm; That ought to Just Work. I wonder why it does not? Might be important!

>  because it gave me a link error,

> Undefined symbols for architecture x86_64:
>  "Fl_Gl_Window::pixels_per_unit()", referenced from:
>      Fl_Gl_Window::pixel_w() in foo.o

> Wonder what that's all about.

Remind me again, what system you are compiling on and what toolchain are you using?

> But having done that, I ran the code and got this:

Which doesn't look right at all.



OK, so I took Greg's example verbatim from his post and compiled it on Win7 with mingw32 and mingw64 tools and fltk-1.3.4-1, using the command line:

fltk-config --use-gl --use-glut --compile foo.cxx

Initially, this did not compile; I changed the lines as follows:


//#include <openGL/GLU.h>
//#include <GLUT/GLUT.h>
#include <FL/glu.h>
#include <FL/glut.h>

Which I believe to be "more correct" in fltk terms, since it handles the location of the GL related libraries.

Thereafter both the 32 and 64-bit builds compiled and worked.

However, the output was subtly different to what Greg shows in his PNG. Though note that both my builds are "the same" as each other, just different from what Greg showed.

See attached...




Leonardo MW Ltd
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL
A company registered in England & Wales. Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************
grab_foo.png
Reply all
Reply to author
Forward
0 new messages