downgrade Filament libs to v1.34.2 for Windows

This commit is contained in:
Nick Fisher
2023-09-25 21:52:09 +10:00
parent 609e349d58
commit 6cdc9bd3dc
545 changed files with 3521 additions and 53329 deletions

View File

@@ -16,7 +16,6 @@ namespace polyvox {
const Material* _ms[1];
Texture* mDummyTexture = nullptr;
public:
FileMaterialProvider(Engine* engine, const void* const data, const size_t size) {
_m = Material::Builder()
@@ -48,13 +47,13 @@ namespace polyvox {
instance->setParameter("baseColorIndex", getUvIndex(config->baseColorUV, config->hasBaseColorTexture));
instance->setParameter("normalIndex", getUvIndex(config->normalUV, config->hasNormalTexture));
if(config->hasNormalTexture) {
Log("HAS NORMAL TEXTURE");
TextureSampler sampler;
instance->setParameter("normalMap", mDummyTexture, sampler);
instance->setParameter("baseColorMap", mDummyTexture, sampler);
} else {
Log("NO NORMAL TEXTURE?");
Log("No normal texture for specified material.");
}
// TextureSampler sampler;
// instance->setParameter("normalMap", mDummyTexture, sampler);
// instance->setParameter("baseColorMap", mDummyTexture, sampler);
return instance;
}

View File

@@ -1,53 +0,0 @@
#ifndef UNLIT_MATERIAL_PROVIDER
#define UNLIT_MATERIAL_PROVIDER
#include "material/unlit_opaque.h"
namespace polyvox {
class UnlitMaterialProvider : public MaterialProvider {
const Material* _m;
const Material* _ms[1];
const Engine* _engine;
public:
UnlitMaterialProvider(Engine* engine) {
_engine = engine;
_m = Material::Builder()
.package( UNLIT_OPAQUE_UNLIT_OPAQUE_DATA, UNLIT_OPAQUE_UNLIT_OPAQUE_SIZE)
.build(*engine);
_ms[0] = _m;
}
filament::MaterialInstance* createMaterialInstance(MaterialKey* config, UvMap* uvmap,
const char* label = "material", const char* extras = nullptr) {
MaterialInstance* d = (MaterialInstance*)_m->getDefaultInstance();
return d;
}
/**
* Gets a weak reference to the array of cached materials.
*/
const filament::Material* const* getMaterials() const noexcept {
return _ms;
}
/**
* Gets the number of cached materials.
*/
size_t getMaterialsCount() const noexcept {
return (size_t)1;
}
void destroyMaterials() {
// TODO - do we need to do anything here?
}
bool needsDummyData(filament::VertexAttribute attrib) const noexcept {
return false;
}
};
}
#endif

View File

@@ -8,5 +8,5 @@ IMAGE_PACKAGE:
IMAGE_IMAGE_OFFSET:
.int 0
IMAGE_IMAGE_SIZE:
.int 30655
.int 13681

View File

@@ -8,5 +8,5 @@ _IMAGE_PACKAGE:
_IMAGE_IMAGE_OFFSET:
.int 0
_IMAGE_IMAGE_SIZE:
.int 30655
.int 13681

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -1,12 +0,0 @@
.global UNLIT_OPAQUE_UNLIT_OPAQUE_OFFSET;
.global UNLIT_OPAQUE_UNLIT_OPAQUE_SIZE;
.global UNLIT_OPAQUE_PACKAGE
.section .rodata
UNLIT_OPAQUE_PACKAGE:
.incbin "unlit_opaque.bin"
UNLIT_OPAQUE_UNLIT_OPAQUE_OFFSET:
.int 0
UNLIT_OPAQUE_UNLIT_OPAQUE_SIZE:
.int 78806

View File

@@ -1,12 +0,0 @@
.global _UNLIT_OPAQUE_UNLIT_OPAQUE_OFFSET;
.global _UNLIT_OPAQUE_UNLIT_OPAQUE_SIZE;
.global _UNLIT_OPAQUE_PACKAGE
.section __TEXT,__const
_UNLIT_OPAQUE_PACKAGE:
.incbin "unlit_opaque.bin"
_UNLIT_OPAQUE_UNLIT_OPAQUE_OFFSET:
.int 0
_UNLIT_OPAQUE_UNLIT_OPAQUE_SIZE:
.int 78806

File diff suppressed because it is too large Load Diff

View File

@@ -1,13 +0,0 @@
#ifndef UNLIT_OPAQUE_H_
#define UNLIT_OPAQUE_H_
#include <stdint.h>
extern "C" {
extern const uint8_t UNLIT_OPAQUE_PACKAGE[];
extern int UNLIT_OPAQUE_UNLIT_OPAQUE_OFFSET;
extern int UNLIT_OPAQUE_UNLIT_OPAQUE_SIZE;
}
#define UNLIT_OPAQUE_UNLIT_OPAQUE_DATA (UNLIT_OPAQUE_PACKAGE + UNLIT_OPAQUE_UNLIT_OPAQUE_OFFSET)
#endif