Skip to content

Commit

Permalink
8310847: [Mac] Silence OpenGL deprecation warnings
Browse files Browse the repository at this point in the history
Reviewed-by: arapte
  • Loading branch information
beldenfox authored and kevinrushforth committed Jul 14, 2023
1 parent 7e54b63 commit 440ce43
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion buildSrc/mac.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ MAC.glass.nativeSource = [file("${project("graphics").projectDir}/src/main/nativ
file("${project("graphics").projectDir}/src/main/native-glass/mac/a11y")]
MAC.glass.compiler = compiler
MAC.glass.ccFlags = [ccFlags,
"-DGL_SILENCE_DEPRECATION",
"-DMACOS_MIN_VERSION_MAJOR=$macOSMinVersionMajor",
"-DMACOS_MIN_VERSION_MINOR=$macOSMinVersionMinor"].flatten()
MAC.glass.linker = linker
Expand Down Expand Up @@ -238,7 +239,7 @@ MAC.prismES2.nativeSource = [
file("${project("graphics").projectDir}/src/main/native-prism-es2/macosx")
]
MAC.prismES2.compiler = compiler
MAC.prismES2.ccFlags = ["-DMACOSX", ccFlags].flatten()
MAC.prismES2.ccFlags = ["-DGL_SILENCE_DEPRECATION", "-DMACOSX", ccFlags].flatten()
MAC.prismES2.linker = linker
MAC.prismES2.linkFlags = [linkFlags].flatten()
MAC.prismES2.lib = "prism_es2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,5 +178,5 @@ jboolean flushBuffer(void *nsJContext) {

void setSwapInterval(void *nsJContext, int swapInterval) {
NSOpenGLContext *nsContext = (NSOpenGLContext *) nsJContext;
[nsContext setValues : &swapInterval forParameter : NSOpenGLCPSwapInterval];
[nsContext setValues : &swapInterval forParameter : NSOpenGLContextParameterSwapInterval];
}

1 comment on commit 440ce43

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.