OpenGLGadget + txt = impossible [ok]

Just starting out? Need help? Post your questions and find answers here.
User avatar
Rings
Moderator
Moderator
Posts: 1427
Joined: Sat Apr 26, 2003 1:11 am

Re: OpenGLGadget + txt = impossible [Resolve]

Post by Rings »

Topic splitted,
moved to viewtopic.php?f=17&t=76518
SPAMINATOR NR.1
User avatar
Saki
Addict
Addict
Posts: 830
Joined: Sun Apr 05, 2020 11:28 am
Location: Pandora

Re: OpenGLGadget + txt = impossible [Resolve]

Post 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.
地球上の平和
Post Reply