Text and Textures

Started by
27 comments, last by Tera_Dragon 19 years, 10 months ago
is there a way to do text with shaders? Like completely?

I always find that my code really slows down as I start to plot text to the screen

Advertisement
right now only letters and numbers are displayed. Would I have to make the font a symbol font if I wanted to use \?#@; etc?

------------------------------------------------------------
Programmers Resource Central
____________________________________________________________Programmers Resource Central
anyone?

------------------------------------------------------------
Programmers Resource Central
____________________________________________________________Programmers Resource Central
Well yes, it would typically be necessary to actually have the symbols you wish to output in the font you''re using.
CoV
the font I am using is Courier (I have also tried Times New Roman), and these both have /''[],.\etc. but they do not show.
I am using word += wParam; to add characters to the string. Doesn''t wParam hold ,./''#[];\etc? If so how do I use them?

------------------------------------------------------------
Programmers Resource Central
____________________________________________________________Programmers Resource Central
wParam contains virtual key codes, which are not the same as ASCII character codes.

It looks like you need to use TranslateMessage to turn WM_KEYDOWN messages into WM_CHAR messages, in which wParam is a normal character code, or use ToAscii to convert the virtual key code into an ASCII character code.
CoV
Obviously I use TranslateMessage, so would I just use WM_CHAR instead of WM_KEYDOWN? and how would I implement the other way? Sorry but u weren''t too clear.
Tera_Dragon

------------------------------------------------------------
Programmers Resource Central
____________________________________________________________Programmers Resource Central
I got it working with WM_CHAR, thanks m8 but I would still like to know how to use ToAscii thanks.
Tera_Dragon

------------------------------------------------------------
Programmers Resource Central
____________________________________________________________Programmers Resource Central
Google is God
CoV

This topic is closed to new replies.

Advertisement