Skip to content

Commit

Permalink
Merge pull request #58 from Over-Run/gl
Browse files Browse the repository at this point in the history
  • Loading branch information
squid233 authored Aug 27, 2024
2 parents 9434519 + 721e4a9 commit 9839838
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ private GLUtil() {
Arena setupDebugMessageCallback(
T gl,
GLFlags flags,
Supplier<? extends GLARBDebugOutput> fallbackARB,
Supplier<? extends GLAMDDebugOutput> fallbackAMD
@Nullable Supplier<? extends GLARBDebugOutput> fallbackARB,
@Nullable Supplier<? extends GLAMDDebugOutput> fallbackAMD
) {
return setupDebugMessageCallback(gl, flags, fallbackARB, fallbackAMD, OverrunGL.apiLogger());
}
Expand All @@ -85,8 +85,8 @@ Arena setupDebugMessageCallback(
Arena setupDebugMessageCallback(
T gl,
GLFlags flags,
Supplier<? extends GLARBDebugOutput> fallbackARB,
Supplier<? extends GLAMDDebugOutput> fallbackAMD,
@Nullable Supplier<? extends GLARBDebugOutput> fallbackARB,
@Nullable Supplier<? extends GLAMDDebugOutput> fallbackAMD,
Consumer<String> logger
) {
if (flags.GL43 || flags.GL_KHR_debug) {
Expand Down Expand Up @@ -119,7 +119,7 @@ Arena setupDebugMessageCallback(
return arena;
}

if (flags.GL_ARB_debug_output) {
if (flags.GL_ARB_debug_output && fallbackARB != null) {
apiLog("[GL] Using ARB_debug_output for error logging.");
var arena = Arena.ofConfined();
fallbackARB.get().glDebugMessageCallbackARB(arena, (source, type, id, severity, message, _) -> {
Expand All @@ -139,7 +139,7 @@ Arena setupDebugMessageCallback(
return arena;
}

if (flags.GL_AMD_debug_output) {
if (flags.GL_AMD_debug_output && fallbackAMD != null) {
apiLog("[GL] Using AMD_debug_output for error logging.");
var arena = Arena.ofConfined();
fallbackAMD.get().glDebugMessageCallbackAMD(arena, (id, category, severity, message, _) -> {
Expand Down

0 comments on commit 9839838

Please sign in to comment.