Hi,

the DiectFBGL exmaples are a bit outdated, because the "default" font
interface has been removed
since more than one year now:
http://git.directfb.org/?p=core/DirectFB.git;a=commit;h=6af0d424746666601887a846e791d408334d4e3e

attached is a sample patch fixing the issue.

regards
Haithem.


On Sat, Jan 7, 2012 at 3:44 PM, undefer <unde...@gmail.com> wrote:

> Hello!
> I have tried to build the latest DirectFB and DirectFBGL from Git, but
> nothing from examples of DirectFBGL works.
> E.g dfgears has the attached output.
> What I do wrong?
>
>
> _______________________________________________
> directfb-dev mailing list
> directfb-dev@directfb.org
> http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev
>
>


-- 
*
"If you ask a question - you will be a fool for 5 minutes, otherwise
ignorant for rest of your life"
*
diff --git a/examples/df_gears.c b/examples/df_gears.c
index a8d9bc4..563374e 100644
--- a/examples/df_gears.c
+++ b/examples/df_gears.c
@@ -31,7 +31,7 @@
 #include <directfb.h>
 #include <directfbgl.h>
 
-
+#define FONT "/usr/share/fonts/dejavu/DejaVuSans.ttf"
 /* the super interface */
 IDirectFB *dfb;
 
@@ -309,6 +309,7 @@ int main( int argc, char *argv[] )
      int quit = 0;
      DFBResult err;
      DFBSurfaceDescription dsc;
+     DFBFontDescription fdsc;
 
      DFBCHECK(DirectFBInit( &argc, &argv ));
 
@@ -336,8 +337,13 @@ int main( int argc, char *argv[] )
                                       screen_width, screen_height ));
      primary->Flip( primary, NULL, 0 );
 
-     /* create the default font and set it */
-     DFBCHECK(dfb->CreateFont( dfb, NULL, NULL, &font ));
+     /*
+      * The "default" font interface has been removed by the commit
+      * 6af0d424746666601887a846e791d408334d4e3e
+      */
+     fdsc.flags = DFDESC_HEIGHT;
+     fdsc.height = 48; 
+     DFBCHECK(dfb->CreateFont( dfb, FONT, &fdsc, &font ));
      DFBCHECK(primary->SetFont( primary, font ));
 
      /* get the GL context */
_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to