minor cleanup
This commit is contained in:
@@ -16,7 +16,7 @@ Future<void> main() async {
|
|||||||
|
|
||||||
if (!golden.existsSync()) {
|
if (!golden.existsSync()) {
|
||||||
throw Exception(
|
throw Exception(
|
||||||
"Golden image doesn't exist yet. Make sure you have run integraton_test_update_goldens.dart first");
|
"Golden image ${golden.path} doesn't exist yet. Make sure you have run integraton_test_update_goldens.dart first");
|
||||||
}
|
}
|
||||||
|
|
||||||
var result = await compareImages(
|
var result = await compareImages(
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import 'package:polyvox_filament/generated_bindings.dart';
|
|||||||
|
|
||||||
const FilamentEntity _FILAMENT_ASSET_ERROR = 0;
|
const FilamentEntity _FILAMENT_ASSET_ERROR = 0;
|
||||||
|
|
||||||
|
|
||||||
class FilamentControllerFFI extends FilamentController {
|
class FilamentControllerFFI extends FilamentController {
|
||||||
late MethodChannel _channel = MethodChannel("app.polyvox.filament/event");
|
late MethodChannel _channel = MethodChannel("app.polyvox.filament/event");
|
||||||
|
|
||||||
@@ -104,7 +103,7 @@ class FilamentControllerFFI extends FilamentController {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Future destroyTexture() async {
|
Future destroyTexture() async {
|
||||||
if(_textureId != null) {
|
if (_textureId != null) {
|
||||||
throw Exception("No texture available");
|
throw Exception("No texture available");
|
||||||
}
|
}
|
||||||
print("Destroying texture");
|
print("Destroying texture");
|
||||||
@@ -194,7 +193,7 @@ class FilamentControllerFFI extends FilamentController {
|
|||||||
_assetManager = _lib.get_asset_manager(_viewer!);
|
_assetManager = _lib.get_asset_manager(_viewer!);
|
||||||
|
|
||||||
_isReadyForScene.complete(true);
|
_isReadyForScene.complete(true);
|
||||||
return TextureDetails(textureId: _textureId!, width: width, height:height);
|
return TextureDetails(textureId: _textureId!, width: width, height: height);
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
@@ -267,7 +266,8 @@ class FilamentControllerFFI extends FilamentController {
|
|||||||
/// 1) never destroy the texture, simply allocate a large (4k?) texture and crop as needed
|
/// 1) never destroy the texture, simply allocate a large (4k?) texture and crop as needed
|
||||||
/// 2) double-buffering?
|
/// 2) double-buffering?
|
||||||
@override
|
@override
|
||||||
Future<TextureDetails> resize(int width, int height, {double scaleFactor = 1.0}) async {
|
Future<TextureDetails> resize(int width, int height,
|
||||||
|
{double scaleFactor = 1.0}) async {
|
||||||
if (_textureId == null) {
|
if (_textureId == null) {
|
||||||
throw Exception("No texture created, ignoring call to resize.");
|
throw Exception("No texture created, ignoring call to resize.");
|
||||||
}
|
}
|
||||||
@@ -309,9 +309,10 @@ class FilamentControllerFFI extends FilamentController {
|
|||||||
_viewer!, size.width.toInt(), size.height.toInt(), 1.0);
|
_viewer!, size.width.toInt(), size.height.toInt(), 1.0);
|
||||||
|
|
||||||
await setRendering(_rendering);
|
await setRendering(_rendering);
|
||||||
|
|
||||||
_textureId = textures[0];
|
_textureId = textures[0];
|
||||||
|
|
||||||
return TextureDetails(textureId: _textureId!, width: width, height:height);
|
return TextureDetails(textureId: _textureId!, width: width, height: height);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
Reference in New Issue
Block a user