plib txf fonts mirrored?

Started by
4 comments, last by furrymaster 13 years, 9 months ago
Hello
i am using plib to render some fonts.

the hello world sample
(http://plib.sourceforge.net/fnt/index.html)
works but letter ae mirrored vertically ... do you know where it could come from?
Advertisement
Hi, show us code how are you initializing font and how are you rendering it. Then someone can help you.
If I helped you rate me
hello
as i said this the same than in the plib sample,
(texout.begin() puts etc), basically 5 lines. just look at example.

but maybe this is because the code uses sdl as well and all the rendering at the end is done through the sdl?

(initialisation is done like :

PIXELFORMATDESCRIPTOR pfd;
ZeroMemory( &pfd, sizeof( pfd ) );
pfd.nSize = sizeof( pfd );
pfd.nVersion = 1;
pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL |
PFD_DOUBLEBUFFER;
pfd.iPixelType = PFD_TYPE_RGBA;
pfd.cColorBits = 32;
pfd.cDepthBits = 16;
pfd.iLayerType = PFD_MAIN_PLANE;
int iFormat = ChoosePixelFormat( hDC, &pfd );
SetPixelFormat( hDC, iFormat, &pfd );
HGLRC hRC;
hRC = wglCreateContext( hDC );
wglMakeCurrent( hDC, hRC );

SDL_GetWMInfo(&wminfo);
hwnd=wminfo.window;


i am not asking to depure this, but just to know if *it couuld be related* to the fact my font are reversed.
i can say that using a tga loader the same issue occur, the tga is reversed. But using some routing and sdl_image() its fine.


i will try with a opengl pure see if the same issue occurs.
Quote:as i said this the same than in the plib sample,
(texout.begin() puts etc), basically 5 lines. just look at example.

Plz show your code because most of mistakes on this forum(in begginers and ogl)
are because someone are changing 1 simple thing (for ex: u could have taken bottom instead of top somewhere)

Quote:but maybe this is because the code uses sdl as well and all the rendering at the end is done through the sdl?
no

and another question why are u using WinAPI window functions and SDL in the same application?
If I helped you rate me
fntRenderer texout ;

/* Load some fonts */

fntTexFont TimesRoman ( "times_roman.txf" ) ;
fntTexFont Courier ( "courier.txf" ) ;

/* Select a font and pointsize to render with... */

texout . setFont ( & TimesRoman ) ;
texout . setPointSize ( 24 ) ;

/* Print "Hello" and "World" */

texout . begin () ;
texout . start2f ( 50.0f, 80.0f ) ;
texout . puts ( "Hello" ) ;
texout . start2f ( 50.0f, 50.0f ) ;
texout . puts ( "World" ) ;
texout . end () ;
and what value are u getting when you are using getwidth()?

[Edited by - furrymaster on July 12, 2010 2:43:59 PM]
If I helped you rate me

This topic is closed to new replies.

Advertisement