All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.lwjgl.bgfx.BGFXFatalCallback Maven / Gradle / Ivy

Go to download

A cross-platform, graphics API agnostic rendering library. It provides a high performance, low level abstraction for common platform graphics APIs like OpenGL, Direct3D and Apple Metal.

There is a newer version: 3.3.4
Show newest version
/*
 * Copyright LWJGL. All rights reserved.
 * License terms: https://www.lwjgl.org/license
 * MACHINE GENERATED FILE, DO NOT EDIT
 */
package org.lwjgl.bgfx;

import javax.annotation.*;

import org.lwjgl.system.*;

import static org.lwjgl.system.MemoryUtil.*;

/**
 * If fatal code is not {@link BGFX#BGFX_FATAL_DEBUG_CHECK FATAL_DEBUG_CHECK} this callback is called on unrecoverable error. It's not safe to continue, inform user and terminate
 * application from this call.
 * 
 * 

Not thread safe and it can be called from any thread.

* *

Type

* *
 * void (*) (
 *     bgfx_callback_interface_t *_this,
 *     bgfx_fatal_t _code,
 *     char *_str
 * )
*/ public abstract class BGFXFatalCallback extends Callback implements BGFXFatalCallbackI { /** * Creates a {@code BGFXFatalCallback} instance from the specified function pointer. * * @return the new {@code BGFXFatalCallback} */ public static BGFXFatalCallback create(long functionPointer) { BGFXFatalCallbackI instance = Callback.get(functionPointer); return instance instanceof BGFXFatalCallback ? (BGFXFatalCallback)instance : new Container(functionPointer, instance); } /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ @Nullable public static BGFXFatalCallback createSafe(long functionPointer) { return functionPointer == NULL ? null : create(functionPointer); } /** Creates a {@code BGFXFatalCallback} instance that delegates to the specified {@code BGFXFatalCallbackI} instance. */ public static BGFXFatalCallback create(BGFXFatalCallbackI instance) { return instance instanceof BGFXFatalCallback ? (BGFXFatalCallback)instance : new Container(instance.address(), instance); } protected BGFXFatalCallback() { super(SIGNATURE); } private BGFXFatalCallback(long functionPointer) { super(functionPointer); } private static final class Container extends BGFXFatalCallback { private final BGFXFatalCallbackI delegate; Container(long functionPointer, BGFXFatalCallbackI delegate) { super(functionPointer); this.delegate = delegate; } @Override public void invoke(long _this, int _code, long _str) { delegate.invoke(_this, _code, _str); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy