PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

E2DSurface::DrawFontWrap with OpenGL

Hello
I have a little problem with the E2DSurface::DrawFont and E2DSurface::DrawFontWrap function when I enable OpenGL.

For exemple if, in the "PinchDemo" sample, I change the ClassMain::OnDisplayInit
function by adding a DrawFont try :
Code:

//Load the EDGELIB logo
if (display->CreateSurface(&logo;, "edgelib.png", EST_READONLYPATH) != E_OK)
return(E_ERROR);
/* Added DrawFont Test*/
logo.DrawFont(0, 0, &(display->fontinternal), "Draw Font Test !!!");
display->UploadTexture(&logo;);

If I desable OpenGl all works fine but with OpenGL the text isn't added into the logo texture...
What is the problem ?

Thank's
Hi Fella,

The internal font can't be drawn because the surface is cleared and uploaded to OpenGL (it happens automatically with the internal font). Try loading another font (without uploading) and write it on the surface.