make it hiDPI compliant (I hope)

also misc tweaks
This commit is contained in:
Arisotura 2020-05-28 11:52:12 +02:00
parent e8849db78a
commit 0a68eb7803
4 changed files with 14 additions and 6 deletions

View File

@ -1236,7 +1236,7 @@ void RenderFrame()
glBlitFramebuffer(0, 0, ScreenW, ScreenH, 0, 0, ScreenW/2, ScreenH/2, GL_COLOR_BUFFER_BIT, GL_LINEAR);
}
glBindFramebuffer(GL_FRAMEBUFFER, FramebufferID[FrontBuffer]);
//glBindFramebuffer(GL_FRAMEBUFFER, FramebufferID[FrontBuffer]);
FrontBuffer = FrontBuffer ? 0 : 1;
}

View File

@ -102,6 +102,11 @@
func(GLGETUNIFORMLOCATION, glGetUniformLocation); \
func(GLGETUNIFORMBLOCKINDEX, glGetUniformBlockIndex); \
\
func(GLFENCESYNC, glFenceSync); \
func(GLDELETESYNC, glDeleteSync); \
func(GLWAITSYNC, glWaitSync); \
func(GLCLIENTWAITSYNC, glClientWaitSync); \
\
func(GLDRAWBUFFERS, glDrawBuffers); \
\
func(GLBLENDFUNCSEPARATE, glBlendFuncSeparate); \

View File

@ -60,12 +60,15 @@
<height>0</height>
</size>
</property>
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Forward a WAV file to the emulated microphone.&lt;/p&gt;&lt;p&gt;This input mode is activated by holding the microphone hotkey (see Input and Hotkeys).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QRadioButton" name="rbMicWav">
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Forward a WAV file to the emulated microphone.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Forward a WAV file to the emulated microphone.&lt;/p&gt;&lt;p&gt;This input mode is activated by holding the microphone hotkey (see Input and Hotkeys).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>WAV file:</string>
@ -92,7 +95,7 @@
<item row="2" column="0" colspan="3">
<widget class="QRadioButton" name="rbMicNoise">
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Noise will be forwarded to the emulated microphone, simulating blowing into the microphone.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Noise will be forwarded to the emulated microphone, simulating blowing into the microphone.&lt;/p&gt;&lt;p&gt;This input mode is activated by holding the microphone hotkey (see Input and Hotkeys).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Blow noise</string>

View File

@ -874,15 +874,15 @@ void ScreenPanelGL::paintGL()
{
int w = width();
int h = height();
float factor = devicePixelRatioF();
glClear(GL_COLOR_BUFFER_BIT);
// TODO: check hiDPI compliance of this
glViewport(0, 0, w, h);
glViewport(0, 0, w*factor, h*factor);
screenShader->bind();
screenShader->setUniformValue("uScreenSize", (float)w, (float)h);
screenShader->setUniformValue("uScreenSize", (float)w*factor, (float)h*factor);
int frontbuf = GPU::FrontBuffer;
glActiveTexture(GL_TEXTURE0);