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

org.lwjgl.util.vma.VmaAllocateDeviceMemoryFunction Maven / Gradle / Ivy

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.util.vma;

import javax.annotation.*;

import org.lwjgl.system.*;

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

/**
 * Instances of this class may be set to the {@link VmaDeviceMemoryCallbacks} struct.
 * 
 * 

Type

* *

 * void (*) (
 *     VmaAllocator allocator,
 *     uint32_t memoryType,
 *     VkDeviceMemory memory,
 *     VkDeviceSize size
 * )
*/ public abstract class VmaAllocateDeviceMemoryFunction extends Callback implements VmaAllocateDeviceMemoryFunctionI { /** * Creates a {@code VmaAllocateDeviceMemoryFunction} instance from the specified function pointer. * * @return the new {@code VmaAllocateDeviceMemoryFunction} */ public static VmaAllocateDeviceMemoryFunction create(long functionPointer) { VmaAllocateDeviceMemoryFunctionI instance = Callback.get(functionPointer); return instance instanceof VmaAllocateDeviceMemoryFunction ? (VmaAllocateDeviceMemoryFunction)instance : new Container(functionPointer, instance); } /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ @Nullable public static VmaAllocateDeviceMemoryFunction createSafe(long functionPointer) { return functionPointer == NULL ? null : create(functionPointer); } /** Creates a {@code VmaAllocateDeviceMemoryFunction} instance that delegates to the specified {@code VmaAllocateDeviceMemoryFunctionI} instance. */ public static VmaAllocateDeviceMemoryFunction create(VmaAllocateDeviceMemoryFunctionI instance) { return instance instanceof VmaAllocateDeviceMemoryFunction ? (VmaAllocateDeviceMemoryFunction)instance : new Container(instance.address(), instance); } protected VmaAllocateDeviceMemoryFunction() { super(SIGNATURE); } private VmaAllocateDeviceMemoryFunction(long functionPointer) { super(functionPointer); } private static final class Container extends VmaAllocateDeviceMemoryFunction { private final VmaAllocateDeviceMemoryFunctionI delegate; Container(long functionPointer, VmaAllocateDeviceMemoryFunctionI delegate) { super(functionPointer); this.delegate = delegate; } @Override public void invoke(long allocator, int memoryType, long memory, long size) { delegate.invoke(allocator, memoryType, memory, size); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy