OpenGLCoreTutorials
OpenGLCoreTutorials copied to clipboard
mtext demo: text is not drawn on Win10
Hi, I've tested the demos, they are great examples, thank you ! mtext demo don't work on my windows 10 machine + Lazarus 2.2.4 fpc 3.2.2: the window is filled with the blue color but no text. Any idea ?
I am traveling and do not have access to a Windows computer. I just downloaded the respository and it works fine with MacOS:
Does MRIcroGL show text for the colorbars on your computer? I used these small projects to build the features into MRIcroGL.
Yes, MRIcroGL seems to work well. Nice work!
Attached a screenshot.
Does the font_gl.lpi project from Metal-Demos work on your computer? The idea of the Metal demos was to have projects that could compile for OpenGL (for Windows and Linux support) and Metal (for MacOS).
Tested font_gl.lpi from Metal-Demos. I'm a bit confused about which options to keep for windows. So I've tested several combination in file glopts.inc, eliminating the RETINA define since I use Windows.
{$DEFINE COREGL}// {$DEFINE NEWMSDF}//{$DEFINE RETINA}generates a compile error glfont.pas(320,13) Error: identifier idents no member "SetViewport". If I comment this line the project compile and run but I can see only the fish, no text.//{$DEFINE COREGL}{$DEFINE NEWMSDF}//{$DEFINE RETINA}compile but error at runtime: Unable to find Resources\fnt.json and Resources\fnt.png. After some search, these 2 files are located in the application Resources bundle directory, so I put a copy in the Resources directory -> error at runtime: msdf file is corrupted fnt.json, I can see only the fish.//{$DEFINE COREGL}//{$DEFINE NEWMSDF}//{$DEFINE RETINA}compile and run but i can see only the fish.
Hello, nice work, your example helps me a lot! I got the same problem on windows 10. No text was displayed, only the blue window. In my case it was because the Metrics Json file was not read correctly due to the wrong decimal separator.
I added to the application
DefaultFormatSettings.DecimalSeparator := '.';
and now it's showing text :) Regards