Recent

Author Topic: BGRABitmap: TextOut to OpenGL canvas  (Read 1567 times)

piola

  • Full Member
  • ***
  • Posts: 118
  • Lazarus 2.2, 64bit on Windows 8.1 x64
BGRABitmap: TextOut to OpenGL canvas
« on: September 27, 2021, 12:19:20 am »
Hello,

I just started using BGRABitmap because it seems the only convenient way to get text onto an OpenGL canvas.

I successfully managed to print text at a certain canvas position. This is fine for my usecase #1.

But I have a second usecase where I want the text to appear as part of the OpenGL model so that it gets zoomed in and out as well as scrolled with the model. Ideally, it should be part of a list created with GLNewList. How can I achieve that?

circular

  • Hero Member
  • *****
  • Posts: 4196
    • Personal webpage
Re: BGRABitmap: TextOut to OpenGL canvas
« Reply #1 on: September 30, 2021, 08:05:46 am »
I am not sure but maybe if you call glNewList, then the text drawing function, the text will be added to the display list. As long as you don't release the font, the textures will be kept. Though the text might get blurred if you resize it as it is not vectorial.
Conscience is the debugger of the mind

 

TinyPortal © 2005-2018