Jump to content
  • Advertisement
Sign in to follow this  
Tiresias

plib txf fonts mirrored?

This topic is 2961 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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 () ;

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!