Skip to content

Commit

Permalink
Core profile flag for SDL backend
Browse files Browse the repository at this point in the history
  • Loading branch information
Anuken committed Jun 5, 2024
1 parent 63e6cc4 commit 3cb45ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ private void init(){
check(() -> SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, config.gl30 ? config.gl30Major : 2));
check(() -> SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, config.gl30 ? config.gl30Minor : 0));

if(config.gl30 && OS.isMac){
if(config.gl30 && (OS.isMac || config.coreProfile)){
check(() -> SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE));
}

Expand Down
1 change: 1 addition & 0 deletions backends/backend-sdl/src/arc/backend/sdl/SdlConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public class SdlConfig{
public boolean fullscreen = false;
public boolean disableAudio = false;
public boolean gl30 = false;
public boolean coreProfile = false;
public int gl30Major = 3, gl30Minor = 0;

public String title = "Arc Application";
Expand Down

0 comments on commit 3cb45ab

Please sign in to comment.