Page 2 of 2

Re: OpenGLGadget + txt = impossible [Resolve]

Posted: Sun Jan 03, 2021 9:39 am
by Rings
Topic splitted,
moved to viewtopic.php?f=17&t=76518

Re: OpenGLGadget + txt = impossible [Resolve]

Posted: Mon Jan 04, 2021 11:51 am
by Saki
I'll give you two small tips here, how it must look like so that it also works under Linux and Mac.

Code: Select all

CompilerIf #PB_Compiler_OS<>#PB_OS_Windows
        glDrawPixels_(output_width, output_height, #GL_RGBA, #GL_UNSIGNED_BYTE, DrawingBuffer())
      CompilerElse
        glDrawPixels_(output_width, output_height, #GL_BGRA_EXT, #GL_UNSIGNED_BYTE, DrawingBuffer())
      CompilerEndIf
In addition, for Linux/Mac, the image to be output must be mirrored vertically.
How this is done with OpenGL I don't know, because I would have to deal with it intensively first,
but you can also do it differently without any problems.

On Windows OS:
A other point is that the text output under Windows OS should definitely be done DPI aware,
otherwise there are problems when the rest of the code uses it
and the quality of the text is extremely better.