don't include C++ Log.hpp in ResourceBuffer
This commit is contained in:
@@ -1,6 +1,10 @@
|
|||||||
#ifndef _POLYVOX_FILAMENT_FFI_API_H
|
#ifndef _POLYVOX_FILAMENT_FFI_API_H
|
||||||
#define _POLYVOX_FILAMENT_FFI_API_H
|
#define _POLYVOX_FILAMENT_FFI_API_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
///
|
///
|
||||||
/// This header replicates most of the methods in PolyvoxFilamentApi.h, and is only intended to be used to generate client FFI bindings.
|
/// This header replicates most of the methods in PolyvoxFilamentApi.h, and is only intended to be used to generate client FFI bindings.
|
||||||
/// The intention is that calling one of these methods will call its respective method in PolyvoxFilamentApi.h, but wrapped in some kind of thread runner to ensure thread safety.
|
/// The intention is that calling one of these methods will call its respective method in PolyvoxFilamentApi.h, but wrapped in some kind of thread runner to ensure thread safety.
|
||||||
@@ -39,39 +43,39 @@ FLUTTER_PLUGIN_EXPORT void remove_asset_ffi(void* const viewer, EntityId asset);
|
|||||||
FLUTTER_PLUGIN_EXPORT void clear_assets_ffi(void* const viewer);
|
FLUTTER_PLUGIN_EXPORT void clear_assets_ffi(void* const viewer);
|
||||||
FLUTTER_PLUGIN_EXPORT bool set_camera_ffi(void* const viewer, EntityId asset, const char *nodeName);
|
FLUTTER_PLUGIN_EXPORT bool set_camera_ffi(void* const viewer, EntityId asset, const char *nodeName);
|
||||||
FLUTTER_PLUGIN_EXPORT void apply_weights_ffi(
|
FLUTTER_PLUGIN_EXPORT void apply_weights_ffi(
|
||||||
void* const assetManager,
|
void* const assetManager,
|
||||||
EntityId asset,
|
EntityId asset,
|
||||||
const char *const entityName,
|
const char *const entityName,
|
||||||
float *const weights,
|
float *const weights,
|
||||||
int count
|
int count
|
||||||
);
|
);
|
||||||
FLUTTER_PLUGIN_EXPORT void set_morph_target_weights_ffi(
|
FLUTTER_PLUGIN_EXPORT void set_morph_target_weights_ffi(
|
||||||
void* const assetManager,
|
void* const assetManager,
|
||||||
EntityId asset,
|
EntityId asset,
|
||||||
const char *const entityName,
|
const char *const entityName,
|
||||||
const float *const morphData,
|
const float *const morphData,
|
||||||
int numWeights
|
int numWeights
|
||||||
);
|
);
|
||||||
FLUTTER_PLUGIN_EXPORT bool set_morph_animation_ffi(
|
FLUTTER_PLUGIN_EXPORT bool set_morph_animation_ffi(
|
||||||
void* const assetManager,
|
void* const assetManager,
|
||||||
EntityId asset,
|
EntityId asset,
|
||||||
const char *const entityName,
|
const char *const entityName,
|
||||||
const float *const morphData,
|
const float *const morphData,
|
||||||
const int* const morphIndices,
|
const int* const morphIndices,
|
||||||
int numMorphTargets,
|
int numMorphTargets,
|
||||||
int numFrames,
|
int numFrames,
|
||||||
float frameLengthInMs);
|
float frameLengthInMs);
|
||||||
FLUTTER_PLUGIN_EXPORT
|
FLUTTER_PLUGIN_EXPORT
|
||||||
FLUTTER_PLUGIN_EXPORT void set_bone_animation_ffi(
|
FLUTTER_PLUGIN_EXPORT void set_bone_animation_ffi(
|
||||||
void* const assetManager,
|
void* const assetManager,
|
||||||
EntityId asset,
|
EntityId asset,
|
||||||
const float* const frameData,
|
const float* const frameData,
|
||||||
int numFrames,
|
int numFrames,
|
||||||
int numBones,
|
int numBones,
|
||||||
const char** const boneNames,
|
const char** const boneNames,
|
||||||
const char** const meshName,
|
const char** const meshName,
|
||||||
int numMeshTargets,
|
int numMeshTargets,
|
||||||
float frameLengthInMs);
|
float frameLengthInMs);
|
||||||
FLUTTER_PLUGIN_EXPORT void play_animation_ffi(void* const assetManager, EntityId asset, int index, bool loop, bool reverse, bool replaceActive, float crossfade);
|
FLUTTER_PLUGIN_EXPORT void play_animation_ffi(void* const assetManager, EntityId asset, int index, bool loop, bool reverse, bool replaceActive, float crossfade);
|
||||||
FLUTTER_PLUGIN_EXPORT void set_animation_frame_ffi(void* const assetManager, EntityId asset, int animationIndex, int animationFrame);
|
FLUTTER_PLUGIN_EXPORT void set_animation_frame_ffi(void* const assetManager, EntityId asset, int animationIndex, int animationFrame);
|
||||||
FLUTTER_PLUGIN_EXPORT void stop_animation_ffi(void* const assetManager, EntityId asset, int index);
|
FLUTTER_PLUGIN_EXPORT void stop_animation_ffi(void* const assetManager, EntityId asset, int index);
|
||||||
@@ -83,4 +87,8 @@ FLUTTER_PLUGIN_EXPORT int get_morph_target_name_count_ffi(void* const assetManag
|
|||||||
|
|
||||||
FLUTTER_PLUGIN_EXPORT void ios_dummy_ffi();
|
FLUTTER_PLUGIN_EXPORT void ios_dummy_ffi();
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // _POLYVOX_FILAMENT_FFI_API_H
|
#endif // _POLYVOX_FILAMENT_FFI_API_H
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#define RESOURCE_BUFFER_H
|
#define RESOURCE_BUFFER_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "Log.hpp"
|
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
@@ -52,7 +52,6 @@ extern "C" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void free(ResourceBuffer rb) const {
|
void free(ResourceBuffer rb) const {
|
||||||
Log("Freeing rb %d of size %d", rb.id, rb.size);
|
|
||||||
if(mFreeFilamentResourceFromOwner) {
|
if(mFreeFilamentResourceFromOwner) {
|
||||||
mFreeFilamentResourceFromOwner(rb, mOwner);
|
mFreeFilamentResourceFromOwner(rb, mOwner);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ A new flutter plugin project.
|
|||||||
s.author = { 'Your Company' => 'email@example.com' }
|
s.author = { 'Your Company' => 'email@example.com' }
|
||||||
s.source = { :path => '.' }
|
s.source = { :path => '.' }
|
||||||
s.source_files = 'Classes/*', 'src/*', 'src/ios/*', 'include/filament/*', 'include/*', 'include/material/*.c'
|
s.source_files = 'Classes/*', 'src/*', 'src/ios/*', 'include/filament/*', 'include/*', 'include/material/*.c'
|
||||||
s.public_header_files = 'include/SwiftPolyvoxFilamentPlugin-Bridging-Header.h', 'include/PolyvoxFilamentApi.h', 'include/PolyvoxFilamentFFIApi.h', 'include/ResourceBuffer.hpp'
|
s.public_header_files = 'include/SwiftPolyvoxFilamentPlugin-Bridging-Header.h', 'include/PolyvoxFilamentApi.h', 'include/PolyvoxFilamentFFIApi.h', 'include/ResourceBuffer.hpp', 'include/Log.hpp'
|
||||||
s.dependency 'Flutter'
|
s.dependency 'Flutter'
|
||||||
s.platform = :ios, '12.1'
|
s.platform = :ios, '12.1'
|
||||||
s.static_framework = true
|
s.static_framework = true
|
||||||
@@ -36,7 +36,7 @@ A new flutter plugin project.
|
|||||||
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
|
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
|
||||||
'OTHER_CXXFLAGS' => '"--std=c++17" "-fmodules" "-fcxx-modules" "-fvisibility=default" "$(inherited)"',
|
'OTHER_CXXFLAGS' => '"--std=c++17" "-fmodules" "-fcxx-modules" "-fvisibility=default" "$(inherited)"',
|
||||||
'OTHER_CFLAGS' => '"-fvisibility=default" "$(inherited)"',
|
'OTHER_CFLAGS' => '"-fvisibility=default" "$(inherited)"',
|
||||||
'USER_HEADER_SEARCH_PATHS' => '"${PODS_ROOT}/../.symlinks/plugins/polyvox_filament/ios/include" "${PODS_ROOT}/../.symlinks/plugins/polyvox_filament/ios/src" "${PODS_ROOT}/../.symlinks/plugins/polyvox_filament/ios/src/image" "${PODS_ROOT}/../.symlinks/plugins/polyvox_filament/ios/src/shaders" "$(inherited)"',
|
'USER_HEADER_SEARCH_PATHS' => '"${PODS_ROOT}/../.symlinks/plugins/polyvox_filament/ios/include" "${PODS_ROOT}/../.symlinks/plugins/polyvox_filament/ios/include/filament" "${PODS_ROOT}/../.symlinks/plugins/polyvox_filament/ios/src" "${PODS_ROOT}/../.symlinks/plugins/polyvox_filament/ios/src/image" "${PODS_ROOT}/../.symlinks/plugins/polyvox_filament/ios/src/shaders" "$(inherited)"',
|
||||||
'ALWAYS_SEARCH_USER_PATHS' => 'YES',
|
'ALWAYS_SEARCH_USER_PATHS' => 'YES',
|
||||||
"OTHER_LDFLAGS" => '-lfilament -lbackend -lfilameshio -lviewer -lfilamat -lgeometry -lutils -lfilabridge -lgltfio_core -lfilament-iblprefilter -limage -limageio -ltinyexr -lcamutils -lgltfio_core -lfilaflat -ldracodec -libl -lktxreader -lpng -lpng16 -lz -lstb -luberzlib -lsmol-v -luberarchive -lzstd -lstdc++',
|
"OTHER_LDFLAGS" => '-lfilament -lbackend -lfilameshio -lviewer -lfilamat -lgeometry -lutils -lfilabridge -lgltfio_core -lfilament-iblprefilter -limage -limageio -ltinyexr -lcamutils -lgltfio_core -lfilaflat -ldracodec -libl -lktxreader -lpng -lpng16 -lz -lstb -luberzlib -lsmol-v -luberarchive -lzstd -lstdc++',
|
||||||
'LIBRARY_SEARCH_PATHS' => '"${PODS_ROOT}/../.symlinks/plugins/polyvox_filament/ios/lib" "$(inherited)"',
|
'LIBRARY_SEARCH_PATHS' => '"${PODS_ROOT}/../.symlinks/plugins/polyvox_filament/ios/lib" "$(inherited)"',
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
|
|
||||||
extern "C" {
|
#include "PolyvoxFilamentFFIApi.h"
|
||||||
#include "PolyvoxFilamentFFIApi.h"
|
|
||||||
}
|
|
||||||
|
|
||||||
#include "FilamentViewer.hpp"
|
#include "FilamentViewer.hpp"
|
||||||
#include "filament/LightManager.h"
|
#include "filament/LightManager.h"
|
||||||
|
|||||||
Reference in New Issue
Block a user