Home » Developing U++ » UppHub » freetype2 and FTGL libraries
freetype2 and FTGL libraries [message #33840] |
Sat, 17 September 2011 19:50 |
mdelfede
Messages: 1307 Registered: September 2007
|
Ultimate Contributor |
|
|
In order to fill missing dependencies to import OpenCascade CAD library into Upp, I added following libraries packaged for Upp :
-freetype2 library; it's a well known library for handling/rasterizing many font types.
It's usually bundled with Linux, but I guess not in windows; having in Upp allow to link statically and in debug mode without
worrying about missing dependencies
-FTGL : it's an openGL font render engine, allowing to put fancy fonts in openGL applications; I made also a demo named FTGL_Demo
Next days I'll continue my efforts to package OpenCascade CAD libraries for Upp.
This will allow us to have them linked statically and in debug mode, and to get rid of incompatibility of it's memory manager with Upp one.
Ciao
Max
EDIT : Both freetype and FTGL are now cross platform; the demo has some weird behaviour in Linux and some other in windows :
- in Linuc, the control is not repainted/animated if you don't resize the parent window at least once
- in Windows, the control don't accept keystrokes.
Koldo, could you please check that ? I've seen your mods, but I don't get the problem....
Max
[Updated on: Sun, 18 September 2011 00:54] Report message to a moderator
|
|
|
Re: freetype2 and FTGL libraries [message #33885 is a reply to message #33840] |
Wed, 21 September 2011 13:45 |
|
koldo
Messages: 3355 Registered: August 2008
|
Senior Veteran |
|
|
Hello Massimo
For a week I am far from my Linux so I cannot try the package.
In Windows, I have got the same problem. Control does not get the keys.
Debugging inside I think the problem is in GlCtrl.h, line 142:
Now the costructor is:
GLCtrl(int depthsize = 24, int stencilsize = 0, bool doublebuffer = true,
bool multisamplebuffering = false, int numberofsamples = 0)
: depthSize(depthsize),
stencilSize(stencilsize),
doubleBuffering(doublebuffer),
multiSampleBuffering(multisamplebuffering),
numberOfSamples(numberofsamples)
{
NoWantFocus(); <<<<==== HERE
Transparent();
pane.ctrl = this;
Add(pane.SizePos());
}
You can see the NoWantFocus() inside. If we remove that line, your demo works perfectly handling the keyboard.
Mirek, Daniel, could it be possible to remove that line?
Best regards
Iñaki
|
|
|
Re: freetype2 and FTGL libraries [message #33886 is a reply to message #33885] |
Wed, 21 September 2011 14:38 |
|
mirek
Messages: 13975 Registered: November 2005
|
Ultimate Member |
|
|
koldo wrote on Wed, 21 September 2011 07:45 | Hello Massimo
For a week I am far from my Linux so I cannot try the package.
In Windows, I have got the same problem. Control does not get the keys.
Debugging inside I think the problem is in GlCtrl.h, line 142:
Now the costructor is:
GLCtrl(int depthsize = 24, int stencilsize = 0, bool doublebuffer = true,
bool multisamplebuffering = false, int numberofsamples = 0)
: depthSize(depthsize),
stencilSize(stencilsize),
doubleBuffering(doublebuffer),
multiSampleBuffering(multisamplebuffering),
numberOfSamples(numberofsamples)
{
NoWantFocus(); <<<<==== HERE
Transparent();
pane.ctrl = this;
Add(pane.SizePos());
}
You can see the NoWantFocus() inside. If we remove that line, your demo works perfectly handling the keyboard.
Mirek, Daniel, could it be possible to remove that line?
|
It is just default setting for GLCtrl (because the guess at the time was that in majority of cases, GLCtrl will be 'static display'). You can always revert it by calling WantFocus.
Mirek
|
|
|
|
|
|
Goto Forum:
Current Time: Thu Mar 28 23:58:18 CET 2024
Total time taken to generate the page: 0.00835 seconds
|