godot/thirdparty/embree/include/embree3/rtcore_buffer.h
jfons a69cc9f13d
Upgrade Embree to the latest official release.
Since Embree v3.13.0 supports AARCH64, switch back to the
official repo instead of using Embree-aarch64.

`thirdparty/embree/patches/godot-changes.patch` should now contain
an accurate diff of the changes done to the library.

(cherry picked from commit 767e374dce)
2021-05-22 15:14:07 +02:00

52 lines
1.4 KiB
C++

// Copyright 2009-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
#pragma once
#include "rtcore_device.h"
RTC_NAMESPACE_BEGIN
/* Types of buffers */
enum RTCBufferType
{
RTC_BUFFER_TYPE_INDEX = 0,
RTC_BUFFER_TYPE_VERTEX = 1,
RTC_BUFFER_TYPE_VERTEX_ATTRIBUTE = 2,
RTC_BUFFER_TYPE_NORMAL = 3,
RTC_BUFFER_TYPE_TANGENT = 4,
RTC_BUFFER_TYPE_NORMAL_DERIVATIVE = 5,
RTC_BUFFER_TYPE_GRID = 8,
RTC_BUFFER_TYPE_FACE = 16,
RTC_BUFFER_TYPE_LEVEL = 17,
RTC_BUFFER_TYPE_EDGE_CREASE_INDEX = 18,
RTC_BUFFER_TYPE_EDGE_CREASE_WEIGHT = 19,
RTC_BUFFER_TYPE_VERTEX_CREASE_INDEX = 20,
RTC_BUFFER_TYPE_VERTEX_CREASE_WEIGHT = 21,
RTC_BUFFER_TYPE_HOLE = 22,
RTC_BUFFER_TYPE_FLAGS = 32
};
/* Opaque buffer type */
typedef struct RTCBufferTy* RTCBuffer;
/* Creates a new buffer. */
RTC_API RTCBuffer rtcNewBuffer(RTCDevice device, size_t byteSize);
/* Creates a new shared buffer. */
RTC_API RTCBuffer rtcNewSharedBuffer(RTCDevice device, void* ptr, size_t byteSize);
/* Returns a pointer to the buffer data. */
RTC_API void* rtcGetBufferData(RTCBuffer buffer);
/* Retains the buffer (increments the reference count). */
RTC_API void rtcRetainBuffer(RTCBuffer buffer);
/* Releases the buffer (decrements the reference count). */
RTC_API void rtcReleaseBuffer(RTCBuffer buffer);
RTC_NAMESPACE_END