Hello,
The horizontal draw inside the OGL is undisplayable if the DPI swith option is on (ASM and C backend).
The OGL background is okay, but a virtual limit appears on the right side. All the draws are truncated.
However, the vertical aspect is okay. This only concerns the horizontal aspect.
Consequently, OGL draw is unable if DPI switch is on.
Is it possible to restore the horizontal aspect as the vertical one is ?
[solved] OpenGLgadget() n DPI : Big bug
[solved] OpenGLgadget() n DPI : Big bug
Last edited by Olli on Sun Aug 07, 2022 1:15 am, edited 1 time in total.
- StarBootics
- Addict
- Posts: 984
- Joined: Sun Jul 07, 2013 11:35 am
- Location: Canada
Re: OpenGLgadget() n DPI : Big bug
Hello ,
This problem might be related to pixel density on different DPI settings and the Framebuffer need to be updated accordingly. If you use the GadgetSize to set the viewport you will experience a problem similar to what you describe.
If you add the following lines of code does it help ?
Best regards
StarBootics
This problem might be related to pixel density on different DPI settings and the Framebuffer need to be updated accordingly. If you use the GadgetSize to set the viewport you will experience a problem similar to what you describe.
If you add the following lines of code does it help ?
Code: Select all
glGetFramebufferParameteriv(0, #GL_FRAMEBUFFER_DEFAULT_WIDTH, @Width.l)
glGetFramebufferParameteriv(0, #GL_FRAMEBUFFER_DEFAULT_HEIGHT, @Height.l)
glViewport(0,0, Width, Height)
StarBootics
The Stone Age did not end due to a shortage of stones !
Re: OpenGLgadget() n DPI : Big bug
Hello Starbootics,
I thank you for the interest you bring about this bug. I will try these functions.
But, however these functions are useful, I doubt the bug will solve by this way.
When I switch the dpi on, I must multiply the x by the result of DesktopResolutionX() but I must not treat the y which stay unchanged (and good).
I thank you for the interest you bring about this bug. I will try these functions.
But, however these functions are useful, I doubt the bug will solve by this way.
When I switch the dpi on, I must multiply the x by the result of DesktopResolutionX() but I must not treat the y which stay unchanged (and good).
Re: OpenGLgadget() n DPI : Big bug
@Starbootics
I did not find this function in the main library file.
The x vs y internal treatment difference is due to a security of opengl which does a saturation of an overflown value. This causes a strange behaviour I took for a bug.
I solved the problem by adding any scale values everywhere (x as y) and by doing the good choice of math operations (divisions as products). This resulted not to change anything in the opengl draw, what I wanted.
I forcome kiffy to move the subject on coding questions.
I did not find this function in the main library file.
The x vs y internal treatment difference is due to a security of opengl which does a saturation of an overflown value. This causes a strange behaviour I took for a bug.
I solved the problem by adding any scale values everywhere (x as y) and by doing the good choice of math operations (divisions as products). This resulted not to change anything in the opengl draw, what I wanted.
I forcome kiffy to move the subject on coding questions.
Re: [solved] OpenGLgadget() n DPI : Big bug
Yes, thank you !