refactoring + texture projection
This commit is contained in:
@@ -30,7 +30,7 @@ static void Log(const char *fmt, ...) {
|
||||
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
#define ERROR(fmt, ...) Log("Error: %s:%d " fmt, __FILENAME__, __LINE__, ##__VA_ARGS__)
|
||||
#ifdef ENABLE_TRACING
|
||||
#ifdef __ANDROID__
|
||||
#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
|
||||
|
||||
@@ -20,7 +20,8 @@ EMSCRIPTEN_KEEPALIVE void Renderer_readPixels(
|
||||
TRenderTarget *tRenderTarget,
|
||||
TPixelDataFormat tPixelBufferFormat,
|
||||
TPixelDataType tPixelDataType,
|
||||
uint8_t *out
|
||||
uint8_t *out,
|
||||
size_t outLength
|
||||
);
|
||||
EMSCRIPTEN_KEEPALIVE void Renderer_setFrameInterval(
|
||||
TRenderer *tRenderer,
|
||||
|
||||
@@ -64,6 +64,7 @@ EMSCRIPTEN_KEEPALIVE bool View_isStencilBufferEnabled(TView *tView);
|
||||
EMSCRIPTEN_KEEPALIVE void View_setDitheringEnabled(TView *tView, bool enabled);
|
||||
EMSCRIPTEN_KEEPALIVE bool View_isDitheringEnabled(TView *tView);
|
||||
EMSCRIPTEN_KEEPALIVE void View_setScene(TView *tView, TScene *tScene);
|
||||
EMSCRIPTEN_KEEPALIVE void View_setFrontFaceWindingInverted(TView *tView, bool inverted);
|
||||
|
||||
typedef void (*PickCallback)(uint32_t requestId, EntityId entityId, float depth, float fragX, float fragY, float fragZ);
|
||||
EMSCRIPTEN_KEEPALIVE void View_pick(TView* tView, uint32_t requestId, uint32_t x, uint32_t y, PickCallback callback);
|
||||
|
||||
@@ -77,6 +77,7 @@ namespace thermion
|
||||
TPixelDataFormat tPixelBufferFormat,
|
||||
TPixelDataType tPixelDataType,
|
||||
uint8_t *out,
|
||||
size_t outLength,
|
||||
void (*onComplete)());
|
||||
|
||||
EMSCRIPTEN_KEEPALIVE void Material_createInstanceRenderThread(TMaterial *tMaterial, void (*onComplete)(TMaterialInstance *));
|
||||
|
||||
12
thermion_dart/native/include/material/capture_uv.S
Normal file
12
thermion_dart/native/include/material/capture_uv.S
Normal file
@@ -0,0 +1,12 @@
|
||||
.global CAPTURE_UV_CAPTURE_UV_OFFSET;
|
||||
.global CAPTURE_UV_CAPTURE_UV_SIZE;
|
||||
|
||||
.global CAPTURE_UV_PACKAGE
|
||||
.section .rodata
|
||||
CAPTURE_UV_PACKAGE:
|
||||
.incbin "capture_uv.bin"
|
||||
CAPTURE_UV_CAPTURE_UV_OFFSET:
|
||||
.int 0
|
||||
CAPTURE_UV_CAPTURE_UV_SIZE:
|
||||
.int 125851
|
||||
|
||||
12
thermion_dart/native/include/material/capture_uv.apple.S
Normal file
12
thermion_dart/native/include/material/capture_uv.apple.S
Normal file
@@ -0,0 +1,12 @@
|
||||
.global _CAPTURE_UV_CAPTURE_UV_OFFSET;
|
||||
.global _CAPTURE_UV_CAPTURE_UV_SIZE;
|
||||
|
||||
.global _CAPTURE_UV_PACKAGE
|
||||
.section __TEXT,__const
|
||||
_CAPTURE_UV_PACKAGE:
|
||||
.incbin "capture_uv.bin"
|
||||
_CAPTURE_UV_CAPTURE_UV_OFFSET:
|
||||
.int 0
|
||||
_CAPTURE_UV_CAPTURE_UV_SIZE:
|
||||
.int 125851
|
||||
|
||||
BIN
thermion_dart/native/include/material/capture_uv.bin
Normal file
BIN
thermion_dart/native/include/material/capture_uv.bin
Normal file
Binary file not shown.
6303
thermion_dart/native/include/material/capture_uv.c
Normal file
6303
thermion_dart/native/include/material/capture_uv.c
Normal file
File diff suppressed because it is too large
Load Diff
13
thermion_dart/native/include/material/capture_uv.h
Normal file
13
thermion_dart/native/include/material/capture_uv.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#ifndef CAPTURE_UV_H_
|
||||
#define CAPTURE_UV_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" {
|
||||
extern const uint8_t CAPTURE_UV_PACKAGE[];
|
||||
extern int CAPTURE_UV_CAPTURE_UV_OFFSET;
|
||||
extern int CAPTURE_UV_CAPTURE_UV_SIZE;
|
||||
}
|
||||
#define CAPTURE_UV_CAPTURE_UV_DATA (CAPTURE_UV_PACKAGE + CAPTURE_UV_CAPTURE_UV_OFFSET)
|
||||
|
||||
#endif
|
||||
Binary file not shown.
@@ -51,7 +51,7 @@ const uint8_t UNLIT_PACKAGE[] = {
|
||||
0x53, 0x45, 0x54, 0x44, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x54, 0x53, 0x4e, 0x49, 0x5f, 0x54, 0x41,
|
||||
0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x53, 0x43, 0x32, 0x41, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x4f,
|
||||
0x43, 0x32, 0x41, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x4f, 0x4d, 0x55, 0x43, 0x5f, 0x54, 0x41, 0x4d,
|
||||
0x01, 0x00, 0x00, 0x00, 0x02, 0x50, 0x4f, 0x52, 0x50, 0x5f, 0x54, 0x41, 0x4d, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x50, 0x4f, 0x52, 0x50, 0x5f, 0x54, 0x41, 0x4d, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x45, 0x54, 0x53, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x44, 0x49,
|
||||
0x55, 0x55, 0x5f, 0x54, 0x41, 0x4d, 0x08, 0x00, 0x00, 0x00, 0xf7, 0xaa, 0x19, 0x69, 0x9f, 0xc0, 0xf1, 0x29, 0x44, 0x41,
|
||||
0x48, 0x53, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x4d, 0x48, 0x53, 0x5f, 0x54, 0x41, 0x4d, 0x01,
|
||||
|
||||
Reference in New Issue
Block a user