black screen / glitch on macos "high sierra"

Michael Brough

New member
Joined
Jan 24, 2018
Messages
1
this is what i get since updating to the latest OSX (it worked fine on the previous):
SKvPgsm.png


i saw this post that the developers here aren't able to maintain cross-platform support at the moment: https://www.cerberus-x.com/community/threads/no-osx-and-linux-builds-for-a-while.403/ - i understand! but if anyone else has run into this and has any clue how to solve it..?
 

York

New member
Patreon Bronze
Joined
Jul 5, 2017
Messages
24
Hi Michael,

I have changed the gxtkGraphics::BeginRender() method and on my Mac I have no trouble anymore. But I am
not sure, if this really solves the problem. Would love to hear if this helps for you?

Please overwrite the gxtkGraphics::BeginRender() in main.cpp with the following:

Code:
int gxtkGraphics::BeginRender(){
   
    int newWidth =0;
    int newHeight=0;
   
    width=height=0;
#ifdef _glfw3_h_
    glfwGetWindowSize( BBGlfwGame::GlfwGame()->GetGLFWwindow(),&width,&height );
    glfwGetFramebufferSize( BBGlfwGame::GlfwGame()->GetGLFWwindow(),&newWidth,&newHeight );
#else
    glfwGetWindowSize( &width,&height );
#endif
   
#if CFG_OPENGL_GLES20_ENABLED
    return 0;
#else
   
    glViewport( 0,0,newWidth,newHeight );
   
    glMatrixMode( GL_PROJECTION );
    glLoadIdentity();
    glOrtho( 0,width,height,0,-1,1 );
    glMatrixMode( GL_MODELVIEW );
    glLoadIdentity();
   
    glEnableClientState( GL_VERTEX_ARRAY );
    glVertexPointer( 2,GL_FLOAT,20,&vertices[0] );
   
    glEnableClientState( GL_TEXTURE_COORD_ARRAY );
    glTexCoordPointer( 2,GL_FLOAT,20,&vertices[2] );
   
    glEnableClientState( GL_COLOR_ARRAY );
    glColorPointer( 4,GL_UNSIGNED_BYTE,20,&vertices[4] );
   
    glEnable( GL_BLEND );
    glBlendFunc( GL_ONE,GL_ONE_MINUS_SRC_ALPHA );
   
    glDisable( GL_TEXTURE_2D );
   
    vertCount=0;
   
    return 1;
   
#endif
}
 
Top Bottom