Jump to content

  • Log In with Google      Sign In   
  • Create Account


Ivan Mandic

Member Since 23 Oct 2008
Offline Last Active Mar 13 2014 06:11 PM
-----

Posts I've Made

In Topic: Bitmap font text positioning

20 January 2010 - 03:18 AM

That is the function that I need. Thanks.
(MSDN ftw ;))

Quote:
Original post by szecs
And maybe I misunderstood something, but this text uses glRasterPos, so translation don't have effect (or does it?, I'm not sure)

It's not working on the same way but the effect is the same :)

In Topic: Bitmap font text positioning

20 January 2010 - 03:09 AM

Quote:
Original post by SuperVGA
If you locate the text above the position in the upper-left corner, it wouldn't be visible.


Exactly. So one way to make it work is to calculete offset(font high in pixels).
A problem is in the fact that I do not know how to calculate right font high in pixels.

In Topic: Bitmap font text positioning

20 January 2010 - 02:52 AM

I did setup glOrtho on the right way, so if I translate 2D object on the position (0,0) he will be renderd in the upper left corner of the screen. That isn't the problem.

The problem is that when I set a position Y (with glTranslatef) text sets just above that position,and not underneath.
I could make offset but the problem is that I do not know how to calculate the hight of letters in pixels.

In Topic: Bitmap font text positioning

20 January 2010 - 02:34 AM

@SuperVGA
I'm working on a Game engine. And my goal is to make things work in any cases,doing things that way isn't so smart.

In Topic: Bitmap font text positioning

20 January 2010 - 02:19 AM

The problem is only that the font height does not apply to pixels.

p.s.
I'm not stupid,and I do know math...

PARTNERS