Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » UppHub » freetype2 and FTGL libraries
freetype2 and FTGL libraries [message #33840] Sat, 17 September 2011 19:50 Go to next message
mdelfede is currently offline  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 Go to previous messageGo to next message
koldo is currently offline  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 Go to previous messageGo to next message
mirek is currently offline  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
Re: freetype2 and FTGL libraries [message #33894 is a reply to message #33886] Thu, 22 September 2011 14:11 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello Mirek

Quote:

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.

I understand. However perhaps the control would be better accepting keystrokes. Do not you think so? Smile


Best regards
Iñaki
Re: freetype2 and FTGL libraries [message #33900 is a reply to message #33894] Fri, 23 September 2011 18:06 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
Hi Koldo,

about the Linux problem,don't updating the display before you resize it once, do you have some idea ?

Max
Re: freetype2 and FTGL libraries [message #33917 is a reply to message #33900] Mon, 26 September 2011 08:36 Go to previous message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
mdelfede wrote on Fri, 23 September 2011 18:06

Hi Koldo,

about the Linux problem,don't updating the display before you resize it once, do you have some idea ?

Max

Hello Massimo

I just come home Smile. I will check it in next days.


Best regards
Iñaki
Previous Topic: Let's test VLCPlayer and help to find some bugs
Next Topic: Scatter: To find width bwt any two points.
Goto Forum:
  


Current Time: Thu Mar 28 20:38:49 CET 2024

Total time taken to generate the page: 0.02257 seconds