Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OpenGL Text
Message
De
08/10/2020 10:04:19
 
 
À
04/10/2020 13:43:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Photos et traitement d'images
Titre:
Divers
Thread ID:
01676456
Message ID:
01676510
Vues:
51
I've done some research on this and text is not easy. I'm going to use this solution: Render the text to an off-screen bitmap using the standard CreateFont() and DrawText() win32 algorithms. I'll then scan pixel-by-pixel and create quads for every pixel, and use a coloring which is relative to the grayscale drawn onto the white background. It will introduce a lot of quads into the item, and they'll be very small being drawn, but it will work. I'll probably target a 14 point font for the base, so it's not too overdone, but may experiment with 16 point and 18 point as well.

I'll add this code to my Visual FreePro OpenGL (called Ogl in Visual FreePro) for people to see / reference / use.

>Do any of you have experience on how to add custom text to an OpenGL image? I'm basically to the point of rendering text in my font to an off-screen buffer, and then loading it as a 2D texture and displaying it as a quad (rectangle), but it will be mipmap processed and lose resolution doing that. I had the same issue with my Ogl module I added to Visual FreePro to allow 3D forms.
>
>I'd like to have high / native true type resolution text.
>
>It's for this project:
[updated URL]
https://www.youtube.com/watch?v=j-3Pbh42Gv4

>I'd like to add labels for the planets, and the entire video image. Read more.

j-3Pbh42Gv4
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform