text in direct draw

Started by
4 comments, last by happyname34 20 years, 8 months ago
okay, here''s the deal im writing a console in directdraw, and im using CreateSurfaceFromText to make a text surface for each line, which is created and destroyed everytime i have to update perhaps there is a more efficient way to do this? cuz this is killing my framerate. i took out the display of previously entered text, and it ran much faster... but then my console doesnt make sense. oh, another thing, after about 2 minutes of run time, my text surfaces turn to staticy blurred nothings... this is also a major problem. any help? suggestions? ideas? -jason
Advertisement
Just use a bitmap font.
http://www.lmnopc.com/bitmapfontbuilder/
"How can they meet us face to face till we have faces?"-C.S. Lewis
okay. how do i blt part of a bitmap? such as a font bitmap and only taking one letter at a time... this would prove useful for sprites too. =D

this would be clipping right? how can i do that in directx8? do i have to go d3d to do so? excuse me for the newbness

[edited by - happyname34 on August 11, 2003 3:18:01 AM]
No, actually it has nothing to do with clipping. When you call your blit function (I don''t remember exactly what it''s called in DirectDraw) you should be able to specify a SOURCE rectangle to copy the image FROM.

You don''t have to use D3D, but if you did you would use texture coordinates instead.
okay... whats the blit function then? anyone have an example of this? -jason
look, now you made me go and do direct3d! yar!!! :oP hehehe

This topic is closed to new replies.

Advertisement