• Dear Cerberus X User!

    As we prepare to transition the forum ownership from Mike to Phil (TripleHead GmbH), we need your explicit consent to transfer your user data in accordance with our amended Terms and Rules in order to be compliant with data protection laws.

    Important: If you accept the amended Terms and Rules, you agree to the transfer of your user data to the future forum owner!

    Please read the new Terms and Rules below, check the box to agree, and click "Accept" to continue enjoying your Cerberus X Forum experience. The deadline for consent is April 5, 2024.

    Do not accept the amended Terms and Rules if you do not wish your personal data to be transferred to the future forum owner!

    Accepting ensures:

    - Continued access to your account with a short break for the actual transfer.

    - Retention of your data under the same terms.

    Without consent:

    - You don't have further access to your forum user account.

    - Your account and personal data will be deleted after April 5, 2024.

    - Public posts remain, but usernames indicating real identity will be anonymized. If you disagree with a fictitious name you have the option to contact us so we can find a name that is acceptable to you.

    We hope to keep you in our community and see you on the forum soon!

    All the best

    Your Cerberus X Team

Rendering issue on OSX

Lillpeter

New member
Joined
Sep 17, 2017
Messages
16
I just got Cerberus up and running on my MacBook and noticed that everything is being rendered to the lower left quadrant of the app window (at 1/4 of the window size). However, the mouse position etc is still being calculated using the entire window so I figure the issue is tied to the rendering part of the app. I assume the issue is tied to the retina display and I've looked into preprocessor comands as well as xCode settings but haven't been able to figure out a solution. Also, the issue occur in apps running mojo as well as mojo2.

I'm running the latest OS and xCode version. Any ideas?
 
Hey there. I actually just had to resolve this in my own game. It seems to be related to HDPI (retina) screens. I was able to fix it by working off of the following stack overflow answer:
https://stackoverflow.com/questions...-left-quarter-of-the-screen/47171457#47171457

I updated th call to glViewport to use the framebuffer size instead of display size. I am pretty clueless with c++ and glfw so there are probably better ways to do this. I just kind of muddled through it.

In Cerberus/modules/mojo/native/mojo.glfw.cpp, I made the following changes:

Around line 20, I added two variables
Code:
int frameBufferWidth;
int frameBufferHeight;

On line 205, I initialized them:
Code:
frameBufferWidth=frameBufferHeight=0;

On line 216, call glfwGetFramebufferSize with the new variables:
Code:
glfwGetFramebufferSize(BBGlfwGame::GlfwGame()->GetGLFWwindow(), &frameBufferWidth, &frameBufferHeight);

Then I updated the call to glViewport on line 217 to use the new variables:
Code:
glViewport( 0,0, frameBufferWidth, frameBufferHeight );

That resolved things for me. Hope that helps!

(ps. I just noticed cerberus is on github. I can make a pull request if that is helpful, just let me know)
 
Back
Top Bottom