update federated flutter_filament
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -32,7 +32,6 @@
|
|||||||
/build/
|
/build/
|
||||||
|
|
||||||
# Web related
|
# Web related
|
||||||
lib/generated_plugin_registrant.dart
|
|
||||||
|
|
||||||
# Symbolication related
|
# Symbolication related
|
||||||
app.*.symbols
|
app.*.symbols
|
||||||
@@ -48,4 +47,4 @@ app.*.map.json
|
|||||||
/android/.cxx/**/*
|
/android/.cxx/**/*
|
||||||
|
|
||||||
# fvm
|
# fvm
|
||||||
.fvm/flutter_sdk
|
.fvm/flutter_sdk
|
||||||
|
|||||||
@@ -4,9 +4,10 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:flutter_filament/flutter_filament.dart';
|
import 'package:flutter_filament/flutter_filament.dart';
|
||||||
import 'package:vector_math/vector_math_64.dart' as v;
|
import 'package:vector_math/vector_math_64.dart' as v;
|
||||||
|
import 'package:dart_filament/dart_filament/abstract_filament_viewer.dart';
|
||||||
|
|
||||||
class CameraMatrixOverlay extends StatefulWidget {
|
class CameraMatrixOverlay extends StatefulWidget {
|
||||||
final FlutterFilamentPlugin controller;
|
final AbstractFilamentViewer controller;
|
||||||
final bool showProjectionMatrices;
|
final bool showProjectionMatrices;
|
||||||
|
|
||||||
const CameraMatrixOverlay(
|
const CameraMatrixOverlay(
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
|
import 'package:flutter_filament/filament/widgets/camera/entity_controller_mouse_widget.dart';
|
||||||
|
import 'package:flutter_filament/filament/widgets/camera/gestures/filament_gesture_detector.dart';
|
||||||
|
import 'package:flutter_filament/filament/widgets/filament_widget.dart';
|
||||||
import 'package:flutter_filament/flutter_filament.dart';
|
import 'package:flutter_filament/flutter_filament.dart';
|
||||||
|
import 'package:dart_filament/dart_filament/entities/entity_transform_controller.dart';
|
||||||
|
|
||||||
|
|
||||||
class ExampleViewport extends StatelessWidget {
|
class ExampleViewport extends StatelessWidget {
|
||||||
final FlutterFilamentPlugin? controller;
|
final FlutterFilamentPlugin? controller;
|
||||||
@@ -16,14 +21,14 @@ class ExampleViewport extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return controller != null
|
return controller != null
|
||||||
? Padding(
|
? Padding(
|
||||||
padding: padding,
|
padding: padding,
|
||||||
child: EntityTransformMouseControllerWidget(
|
child: EntityTransformMouseControllerWidget(
|
||||||
transformController: entityTransformController,
|
transformController: entityTransformController,
|
||||||
child: FilamentGestureDetector(
|
child: FilamentGestureDetector(
|
||||||
showControlOverlay: true,
|
showControlOverlay: true,
|
||||||
controller: controller!,
|
controller: controller!.viewer,
|
||||||
child: FilamentWidget(
|
child: FilamentWidget(
|
||||||
plugin: controller!,
|
plugin: controller!,
|
||||||
))))
|
))))
|
||||||
|
|||||||
@@ -1,20 +1,15 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:io';
|
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import 'package:flutter_filament_example/camera_matrix_overlay.dart';
|
|
||||||
import 'package:flutter_filament_example/menus/controller_menu.dart';
|
import 'package:flutter_filament_example/menus/controller_menu.dart';
|
||||||
import 'package:flutter_filament_example/example_viewport.dart';
|
import 'package:flutter_filament_example/example_viewport.dart';
|
||||||
import 'package:flutter_filament_example/picker_result_widget.dart';
|
import 'package:dart_filament/dart_filament/entities/entity_transform_controller.dart';
|
||||||
import 'package:flutter_filament_example/menus/scene_menu.dart';
|
import 'package:flutter_filament_example/menus/scene_menu.dart';
|
||||||
|
|
||||||
import 'package:flutter_filament/flutter_filament.dart';
|
import 'package:flutter_filament/flutter_filament.dart';
|
||||||
|
|
||||||
|
|
||||||
const loadDefaultScene = bool.hasEnvironment('--load-default-scene');
|
const loadDefaultScene = bool.hasEnvironment('--load-default-scene');
|
||||||
|
|
||||||
void main() async {
|
void main() async {
|
||||||
print(loadDefaultScene);
|
|
||||||
runApp(const MyApp());
|
runApp(const MyApp());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -39,7 +34,9 @@ class _MyAppState extends State<MyApp> with SingleTickerProviderStateMixin {
|
|||||||
bodyLarge: TextStyle(fontSize: 14),
|
bodyLarge: TextStyle(fontSize: 14),
|
||||||
bodyMedium: TextStyle(fontSize: 12))),
|
bodyMedium: TextStyle(fontSize: 12))),
|
||||||
// showPerformanceOverlay: true,
|
// showPerformanceOverlay: true,
|
||||||
home: const Scaffold(body: ExampleWidget()));
|
home: const Scaffold(
|
||||||
|
backgroundColor: Color(0x00000000),
|
||||||
|
body: ExampleWidget()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -55,7 +52,7 @@ class ExampleWidget extends StatefulWidget {
|
|||||||
enum MenuType { controller, assets, camera, misc }
|
enum MenuType { controller, assets, camera, misc }
|
||||||
|
|
||||||
class ExampleWidgetState extends State<ExampleWidget> {
|
class ExampleWidgetState extends State<ExampleWidget> {
|
||||||
FlutterFilamentPlugin? _plugin;
|
final _plugin = FlutterFilamentPlugin();
|
||||||
|
|
||||||
EdgeInsets _viewportMargin = EdgeInsets.zero;
|
EdgeInsets _viewportMargin = EdgeInsets.zero;
|
||||||
|
|
||||||
@@ -85,27 +82,6 @@ class ExampleWidgetState extends State<ExampleWidget> {
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
if (loadDefaultScene) {
|
|
||||||
WidgetsBinding.instance.addPostFrameCallback((timeStamp) async {
|
|
||||||
_plugin = await FlutterFilamentPlugin.create();
|
|
||||||
setState(() {});
|
|
||||||
WidgetsBinding.instance.addPostFrameCallback((timeStamp) async {
|
|
||||||
await _plugin!.initialized;
|
|
||||||
|
|
||||||
await _plugin!
|
|
||||||
.loadSkybox("assets/default_env/default_env_skybox.ktx");
|
|
||||||
|
|
||||||
await _plugin!.setRendering(true);
|
|
||||||
|
|
||||||
await _plugin!.loadGlb("assets/shapes/shapes.glb");
|
|
||||||
|
|
||||||
await _plugin!.setCameraManipulatorOptions(zoomSpeed: 1.0);
|
|
||||||
|
|
||||||
hasSkybox = true;
|
|
||||||
rendering = true;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -120,95 +96,102 @@ class ExampleWidgetState extends State<ExampleWidget> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Stack(children: [
|
return FutureBuilder(
|
||||||
Positioned.fill(
|
future: _plugin.initialized,
|
||||||
child: ExampleViewport(
|
builder: (_, AsyncSnapshot<bool> initialized) {
|
||||||
controller: _plugin,
|
var isInitialized = initialized.data == true;
|
||||||
entityTransformController: _transformController,
|
|
||||||
padding: _viewportMargin,
|
return Stack(children: [
|
||||||
keyboardFocusNode: _sharedFocusNode),
|
if (isInitialized)
|
||||||
),
|
Positioned.fill(
|
||||||
EntityListWidget(controller: _plugin),
|
child: ExampleViewport(
|
||||||
Positioned(
|
|
||||||
bottom: Platform.isIOS ? 30 : 0,
|
|
||||||
left: 0,
|
|
||||||
right: 10,
|
|
||||||
height: 30,
|
|
||||||
child: Container(
|
|
||||||
height: 30,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(30),
|
|
||||||
color: Colors.white.withOpacity(0.25),
|
|
||||||
),
|
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 10),
|
|
||||||
child:
|
|
||||||
Row(crossAxisAlignment: CrossAxisAlignment.center, children: [
|
|
||||||
ControllerMenu(
|
|
||||||
sharedFocusNode: _sharedFocusNode,
|
|
||||||
controller: _plugin,
|
controller: _plugin,
|
||||||
onToggleViewport: () {
|
entityTransformController: _transformController,
|
||||||
setState(() {
|
padding: _viewportMargin,
|
||||||
_viewportMargin = (_viewportMargin == EdgeInsets.zero)
|
keyboardFocusNode: _sharedFocusNode),
|
||||||
? const EdgeInsets.all(30)
|
),
|
||||||
: EdgeInsets.zero;
|
Positioned(
|
||||||
});
|
bottom: 30,
|
||||||
},
|
left: 0,
|
||||||
onControllerDestroyed: () {},
|
right: 10,
|
||||||
onControllerCreated: (controller) {
|
height: 30,
|
||||||
setState(() {
|
child: Container(
|
||||||
_plugin = controller;
|
height: 30,
|
||||||
});
|
decoration: BoxDecoration(
|
||||||
}),
|
borderRadius: BorderRadius.circular(30),
|
||||||
SceneMenu(
|
color: Colors.white.withOpacity(0.25),
|
||||||
sharedFocusNode: _sharedFocusNode,
|
),
|
||||||
controller: _plugin,
|
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||||
),
|
child: Row(
|
||||||
GestureDetector(
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
onTap: () async {
|
children: [
|
||||||
await _plugin!
|
ControllerMenu(
|
||||||
.loadGlb('assets/shapes/shapes.glb', numInstances: 1);
|
sharedFocusNode: _sharedFocusNode,
|
||||||
},
|
controller: _plugin,
|
||||||
child: Container(
|
onToggleViewport: () {
|
||||||
color: Colors.transparent,
|
setState(() {
|
||||||
child: const Text("shapes.glb"))),
|
_viewportMargin =
|
||||||
const SizedBox(width: 5),
|
(_viewportMargin == EdgeInsets.zero)
|
||||||
GestureDetector(
|
? const EdgeInsets.all(30)
|
||||||
onTap: () async {
|
: EdgeInsets.zero;
|
||||||
await _plugin!.loadGlb('assets/1.glb');
|
});
|
||||||
},
|
},
|
||||||
child: Container(
|
onControllerDestroyed: () {},
|
||||||
color: Colors.transparent, child: const Text("1.glb"))),
|
onControllerCreated: () {}),
|
||||||
const SizedBox(width: 5),
|
SceneMenu(
|
||||||
GestureDetector(
|
sharedFocusNode: _sharedFocusNode,
|
||||||
onTap: () async {
|
controller: _plugin,
|
||||||
await _plugin!.loadGlb('assets/2.glb');
|
),
|
||||||
},
|
GestureDetector(
|
||||||
child: Container(
|
onTap: () async {
|
||||||
color: Colors.transparent, child: const Text("2.glb"))),
|
await _plugin.viewer.loadGlb(
|
||||||
const SizedBox(width: 5),
|
'assets/shapes/shapes.glb',
|
||||||
GestureDetector(
|
numInstances: 1);
|
||||||
onTap: () async {
|
},
|
||||||
await _plugin!.loadGlb('assets/3.glb');
|
child: Container(
|
||||||
},
|
color: Colors.transparent,
|
||||||
child: Container(
|
child: const Text("shapes.glb"))),
|
||||||
color: Colors.transparent, child: const Text("3.glb"))),
|
const SizedBox(width: 5),
|
||||||
Expanded(child: Container()),
|
GestureDetector(
|
||||||
]))),
|
onTap: () async {
|
||||||
_plugin == null
|
await _plugin.viewer.loadGlb('assets/1.glb');
|
||||||
? Container()
|
},
|
||||||
: Padding(
|
child: Container(
|
||||||
padding: const EdgeInsets.only(top: 10, left: 20, right: 20),
|
color: Colors.transparent,
|
||||||
child: ValueListenableBuilder(
|
child: const Text("1.glb"))),
|
||||||
valueListenable: showProjectionMatrices,
|
const SizedBox(width: 5),
|
||||||
builder: (ctx, value, child) => CameraMatrixOverlay(
|
GestureDetector(
|
||||||
controller: _plugin!, showProjectionMatrices: value)),
|
onTap: () async {
|
||||||
),
|
await _plugin.viewer.loadGlb('assets/2.glb');
|
||||||
_plugin == null
|
},
|
||||||
? Container()
|
child: Container(
|
||||||
: Align(
|
color: Colors.transparent,
|
||||||
alignment: Alignment.topRight,
|
child: const Text("2.glb"))),
|
||||||
child: PickerResultWidget(controller: _plugin!),
|
const SizedBox(width: 5),
|
||||||
)
|
GestureDetector(
|
||||||
]);
|
onTap: () async {
|
||||||
|
await _plugin.viewer.loadGlb('assets/3.glb');
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
color: Colors.transparent,
|
||||||
|
child: const Text("3.glb"))),
|
||||||
|
Expanded(child: Container()),
|
||||||
|
]))),
|
||||||
|
if (isInitialized) ...[
|
||||||
|
// EntityListWidget(controller: _plugin.viewer),
|
||||||
|
// Padding(
|
||||||
|
// padding: const EdgeInsets.only(top: 10, left: 20, right: 20),
|
||||||
|
// child: ValueListenableBuilder(
|
||||||
|
// valueListenable: showProjectionMatrices,
|
||||||
|
// builder: (ctx, value, child) => CameraMatrixOverlay(
|
||||||
|
// controller: _plugin, showProjectionMatrices: value)),
|
||||||
|
// ),
|
||||||
|
// Align(
|
||||||
|
// alignment: Alignment.topRight,
|
||||||
|
// child: PickerResultWidget(controller: _plugin.viewer),
|
||||||
|
// )
|
||||||
|
]
|
||||||
|
]);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,10 +3,9 @@ import 'dart:math';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_filament/flutter_filament.dart';
|
import 'package:flutter_filament/flutter_filament.dart';
|
||||||
import 'package:flutter_filament_example/main.dart';
|
import 'package:flutter_filament_example/main.dart';
|
||||||
import 'package:permission_handler/permission_handler.dart';
|
|
||||||
import 'package:animation_tools_dart/animation_tools_dart.dart';
|
import 'package:animation_tools_dart/animation_tools_dart.dart';
|
||||||
import 'package:vector_math/vector_math_64.dart' as v;
|
import 'package:vector_math/vector_math_64.dart' as v;
|
||||||
import 'package:dart_filament/dart_filament.dart';
|
import 'package:dart_filament/dart_filament/abstract_filament_viewer.dart';
|
||||||
|
|
||||||
class AssetSubmenu extends StatefulWidget {
|
class AssetSubmenu extends StatefulWidget {
|
||||||
final FlutterFilamentPlugin controller;
|
final FlutterFilamentPlugin controller;
|
||||||
@@ -27,8 +26,8 @@ class _AssetSubmenuState extends State<AssetSubmenu> {
|
|||||||
MenuItemButton(
|
MenuItemButton(
|
||||||
closeOnActivate: false,
|
closeOnActivate: false,
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
var entity = await widget.controller.getChildEntity(
|
var entity = await widget.controller.viewer.getChildEntity(
|
||||||
widget.controller.scene.listEntities().last, "Cylinder");
|
widget.controller.viewer.scene.listEntities().last, "Cylinder");
|
||||||
await showDialog(
|
await showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
@@ -40,8 +39,8 @@ class _AssetSubmenuState extends State<AssetSubmenu> {
|
|||||||
child: const Text('Find Cylinder entity by name')),
|
child: const Text('Find Cylinder entity by name')),
|
||||||
MenuItemButton(
|
MenuItemButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await widget.controller.addBoneAnimation(
|
await widget.controller.viewer.addBoneAnimation(
|
||||||
widget.controller.scene.listEntities().last,
|
widget.controller.viewer.scene.listEntities().last,
|
||||||
BoneAnimationData([
|
BoneAnimationData([
|
||||||
"Bone"
|
"Bone"
|
||||||
], [
|
], [
|
||||||
@@ -56,14 +55,14 @@ class _AssetSubmenuState extends State<AssetSubmenu> {
|
|||||||
const Text('Set bone transform for Cylinder (pi/2 rotation X)')),
|
const Text('Set bone transform for Cylinder (pi/2 rotation X)')),
|
||||||
MenuItemButton(
|
MenuItemButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await widget.controller
|
await widget.controller.viewer
|
||||||
.resetBones(widget.controller.scene.listEntities().last);
|
.resetBones(widget.controller.viewer.scene.listEntities().last);
|
||||||
},
|
},
|
||||||
child: const Text('Reset bones for Cylinder')),
|
child: const Text('Reset bones for Cylinder')),
|
||||||
MenuItemButton(
|
MenuItemButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await widget.controller.addBoneAnimation(
|
await widget.controller.viewer.addBoneAnimation(
|
||||||
widget.controller.scene.listEntities().last,
|
widget.controller.viewer.scene.listEntities().last,
|
||||||
BoneAnimationData(
|
BoneAnimationData(
|
||||||
["Bone"],
|
["Bone"],
|
||||||
["Cylinder"],
|
["Cylinder"],
|
||||||
@@ -81,8 +80,8 @@ class _AssetSubmenuState extends State<AssetSubmenu> {
|
|||||||
MenuItemButton(
|
MenuItemButton(
|
||||||
closeOnActivate: false,
|
closeOnActivate: false,
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
var names = await widget.controller.getMorphTargetNames(
|
var names = await widget.controller.viewer.getMorphTargetNames(
|
||||||
widget.controller.scene.listEntities().last, "Cylinder");
|
widget.controller.viewer.scene.listEntities().last, "Cylinder");
|
||||||
print("NAMES : $names");
|
print("NAMES : $names");
|
||||||
await showDialog(
|
await showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
@@ -97,24 +96,24 @@ class _AssetSubmenuState extends State<AssetSubmenu> {
|
|||||||
child: const Text("Show morph target names for Cylinder")),
|
child: const Text("Show morph target names for Cylinder")),
|
||||||
MenuItemButton(
|
MenuItemButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
var cylinder = await widget.controller.getChildEntity(
|
var cylinder = await widget.controller.viewer.getChildEntity(
|
||||||
widget.controller.scene.listEntities().last, "Cylinder");
|
widget.controller.viewer.scene.listEntities().last, "Cylinder");
|
||||||
widget.controller
|
widget.controller.viewer
|
||||||
.setMorphTargetWeights(cylinder, List.filled(4, 1.0));
|
.setMorphTargetWeights(cylinder, List.filled(4, 1.0));
|
||||||
},
|
},
|
||||||
child: const Text("set Cylinder morph weights to 1")),
|
child: const Text("set Cylinder morph weights to 1")),
|
||||||
MenuItemButton(
|
MenuItemButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
var cylinder = await widget.controller.getChildEntity(
|
var cylinder = await widget.controller.viewer.getChildEntity(
|
||||||
widget.controller.scene.listEntities().last, "Cylinder");
|
widget.controller.viewer.scene.listEntities().last, "Cylinder");
|
||||||
widget.controller
|
widget.controller.viewer
|
||||||
.setMorphTargetWeights(cylinder, List.filled(4, 0.0));
|
.setMorphTargetWeights(cylinder, List.filled(4, 0.0));
|
||||||
},
|
},
|
||||||
child: const Text("Set Cylinder morph weights to 0")),
|
child: const Text("Set Cylinder morph weights to 0")),
|
||||||
MenuItemButton(
|
MenuItemButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
var morphTargets = await widget.controller.getMorphTargetNames(
|
var morphTargets = await widget.controller.viewer.getMorphTargetNames(
|
||||||
widget.controller.scene.listEntities().last, "Cylinder");
|
widget.controller.viewer.scene.listEntities().last, "Cylinder");
|
||||||
|
|
||||||
var morphData = MorphAnimationData(
|
var morphData = MorphAnimationData(
|
||||||
List.generate(
|
List.generate(
|
||||||
@@ -122,8 +121,8 @@ class _AssetSubmenuState extends State<AssetSubmenu> {
|
|||||||
(frameNum) =>
|
(frameNum) =>
|
||||||
List.generate(4, (morphIndex) => frameNum / 60)),
|
List.generate(4, (morphIndex) => frameNum / 60)),
|
||||||
morphTargets);
|
morphTargets);
|
||||||
await widget.controller.setMorphAnimationData(
|
await widget.controller.viewer.setMorphAnimationData(
|
||||||
widget.controller.scene.listEntities().last, morphData,
|
widget.controller.viewer.scene.listEntities().last, morphData,
|
||||||
targetMeshNames: [
|
targetMeshNames: [
|
||||||
"Cylinder",
|
"Cylinder",
|
||||||
]);
|
]);
|
||||||
@@ -131,19 +130,19 @@ class _AssetSubmenuState extends State<AssetSubmenu> {
|
|||||||
child: const Text("create manual morph animation for Cylinder")),
|
child: const Text("create manual morph animation for Cylinder")),
|
||||||
MenuItemButton(
|
MenuItemButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
widget.controller.setPosition(
|
widget.controller.viewer.setPosition(
|
||||||
widget.controller.scene.listEntities().last, 1.0, 1.0, -1.0);
|
widget.controller.viewer.scene.listEntities().last, 1.0, 1.0, -1.0);
|
||||||
},
|
},
|
||||||
child: const Text('Set position to 1, 1, -1'),
|
child: const Text('Set position to 1, 1, -1'),
|
||||||
),
|
),
|
||||||
MenuItemButton(
|
MenuItemButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
if (ExampleWidgetState.coneHidden) {
|
if (ExampleWidgetState.coneHidden) {
|
||||||
widget.controller
|
widget.controller.viewer
|
||||||
.reveal(widget.controller.scene.listEntities().last, "Cone");
|
.reveal(widget.controller.viewer.scene.listEntities().last, "Cone");
|
||||||
} else {
|
} else {
|
||||||
widget.controller
|
widget.controller.viewer
|
||||||
.hide(widget.controller.scene.listEntities().last, "Cone");
|
.hide(widget.controller.viewer.scene.listEntities().last, "Cone");
|
||||||
}
|
}
|
||||||
|
|
||||||
ExampleWidgetState.coneHidden = !ExampleWidgetState.coneHidden;
|
ExampleWidgetState.coneHidden = !ExampleWidgetState.coneHidden;
|
||||||
@@ -153,8 +152,8 @@ class _AssetSubmenuState extends State<AssetSubmenu> {
|
|||||||
MenuItemButton(
|
MenuItemButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
final color = Colors.purple;
|
final color = Colors.purple;
|
||||||
widget.controller.setMaterialColor(
|
widget.controller.viewer.setMaterialColor(
|
||||||
widget.controller.scene.listEntities().last,
|
widget.controller.viewer.scene.listEntities().last,
|
||||||
"Cone",
|
"Cone",
|
||||||
0,
|
0,
|
||||||
color.red / 255.0,
|
color.red / 255.0,
|
||||||
@@ -194,13 +193,13 @@ class _AssetSubmenuState extends State<AssetSubmenu> {
|
|||||||
-1.0,
|
-1.0,
|
||||||
];
|
];
|
||||||
var indices = [0, 1, 2, 2, 3, 0];
|
var indices = [0, 1, 2, 2, 3, 0];
|
||||||
var geom = await widget.controller.createGeometry(verts, indices,
|
var geom = await widget.controller.viewer.createGeometry(verts, indices,
|
||||||
materialPath: "asset://assets/solidcolor.filamat");
|
materialPath: "asset://assets/solidcolor.filamat");
|
||||||
},
|
},
|
||||||
child: const Text("Quad")),
|
child: const Text("Quad")),
|
||||||
MenuItemButton(
|
MenuItemButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await widget.controller.createGeometry([
|
await widget.controller.viewer.createGeometry([
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
@@ -226,55 +225,55 @@ class _AssetSubmenuState extends State<AssetSubmenu> {
|
|||||||
_geometrySubmenu(),
|
_geometrySubmenu(),
|
||||||
MenuItemButton(
|
MenuItemButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await widget.controller
|
await widget.controller.viewer
|
||||||
.addLight(1, 6500, 150000, 0, 1, 0, 0, -1, 0, true);
|
.addLight(1, 6500, 150000, 0, 1, 0, 0, -1, 0, true);
|
||||||
},
|
},
|
||||||
child: const Text("Add directional light"),
|
child: const Text("Add directional light"),
|
||||||
),
|
),
|
||||||
MenuItemButton(
|
MenuItemButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await widget.controller
|
await widget.controller.viewer
|
||||||
.addLight(2, 6500, 150000, 0, 1, 0, 0, -1, 0, true);
|
.addLight(2, 6500, 150000, 0, 1, 0, 0, -1, 0, true);
|
||||||
},
|
},
|
||||||
child: const Text("Add point light"),
|
child: const Text("Add point light"),
|
||||||
),
|
),
|
||||||
MenuItemButton(
|
MenuItemButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await widget.controller
|
await widget.controller.viewer
|
||||||
.addLight(3, 6500, 15000000, 0, 1, 0, 0, -1, 0, true);
|
.addLight(3, 6500, 15000000, 0, 1, 0, 0, -1, 0, true);
|
||||||
},
|
},
|
||||||
child: const Text("Add spot light"),
|
child: const Text("Add spot light"),
|
||||||
),
|
),
|
||||||
MenuItemButton(
|
MenuItemButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await widget.controller.clearLights();
|
await widget.controller.viewer.clearLights();
|
||||||
},
|
},
|
||||||
child: const Text("Clear lights"),
|
child: const Text("Clear lights"),
|
||||||
),
|
),
|
||||||
MenuItemButton(
|
MenuItemButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
final color = const Color(0xAA73C9FA);
|
final color = const Color(0xAA73C9FA);
|
||||||
widget.controller.setBackgroundColor(color.red / 255.0,
|
widget.controller.viewer.setBackgroundColor(color.red / 255.0,
|
||||||
color.green / 255.0, color.blue / 255.0, 1.0);
|
color.green / 255.0, color.blue / 255.0, 1.0);
|
||||||
},
|
},
|
||||||
child: const Text("Set background color")),
|
child: const Text("Set background color")),
|
||||||
MenuItemButton(
|
MenuItemButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
widget.controller.setBackgroundImage('assets/background.ktx');
|
widget.controller.viewer.setBackgroundImage('assets/background.ktx');
|
||||||
},
|
},
|
||||||
child: const Text("Load background image")),
|
child: const Text("Load background image")),
|
||||||
MenuItemButton(
|
MenuItemButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
widget.controller.setBackgroundImage('assets/background.ktx',
|
widget.controller.viewer.setBackgroundImage('assets/background.ktx',
|
||||||
fillHeight: true);
|
fillHeight: true);
|
||||||
},
|
},
|
||||||
child: const Text("Load background image (fill height)")),
|
child: const Text("Load background image (fill height)")),
|
||||||
MenuItemButton(
|
MenuItemButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
if (ExampleWidgetState.hasSkybox) {
|
if (ExampleWidgetState.hasSkybox) {
|
||||||
widget.controller.removeSkybox();
|
widget.controller.viewer.removeSkybox();
|
||||||
} else {
|
} else {
|
||||||
widget.controller
|
widget.controller.viewer
|
||||||
.loadSkybox('assets/default_env/default_env_skybox.ktx');
|
.loadSkybox('assets/default_env/default_env_skybox.ktx');
|
||||||
}
|
}
|
||||||
ExampleWidgetState.hasSkybox = !ExampleWidgetState.hasSkybox;
|
ExampleWidgetState.hasSkybox = !ExampleWidgetState.hasSkybox;
|
||||||
@@ -284,23 +283,18 @@ class _AssetSubmenuState extends State<AssetSubmenu> {
|
|||||||
: 'Load skybox')),
|
: 'Load skybox')),
|
||||||
MenuItemButton(
|
MenuItemButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
widget.controller
|
widget.controller.viewer
|
||||||
.loadIbl('assets/default_env/default_env_ibl.ktx');
|
.loadIbl('assets/default_env/default_env_ibl.ktx');
|
||||||
},
|
},
|
||||||
child: const Text('Load IBL')),
|
child: const Text('Load IBL')),
|
||||||
MenuItemButton(
|
MenuItemButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
widget.controller.removeIbl();
|
widget.controller.viewer.removeIbl();
|
||||||
},
|
},
|
||||||
child: const Text('Remove IBL')),
|
child: const Text('Remove IBL')),
|
||||||
MenuItemButton(
|
MenuItemButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await Permission.microphone.request();
|
await widget.controller.viewer.clearEntities();
|
||||||
},
|
|
||||||
child: const Text("Request permissions (tests inactive->resume)")),
|
|
||||||
MenuItemButton(
|
|
||||||
onPressed: () async {
|
|
||||||
await widget.controller.clearEntities();
|
|
||||||
},
|
},
|
||||||
child: const Text('Clear assets')),
|
child: const Text('Clear assets')),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -4,8 +4,7 @@ import 'dart:math';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:vector_math/vector_math_64.dart' as v;
|
import 'package:vector_math/vector_math_64.dart' as v;
|
||||||
import 'package:flutter_filament/flutter_filament.dart';
|
import 'package:flutter_filament/flutter_filament.dart';
|
||||||
import 'package:dart_filament/dart_filament.dart';
|
import 'package:dart_filament/dart_filament/abstract_filament_viewer.dart';
|
||||||
|
|
||||||
import 'package:flutter_filament_example/main.dart';
|
import 'package:flutter_filament_example/main.dart';
|
||||||
|
|
||||||
class CameraSubmenu extends StatefulWidget {
|
class CameraSubmenu extends StatefulWidget {
|
||||||
@@ -23,10 +22,10 @@ class _CameraSubmenuState extends State<CameraSubmenu> {
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
widget.controller.initialized.then((_) {
|
widget.controller.viewer.initialized.then((_) {
|
||||||
widget.controller.getCameraCullingNear().then((v) {
|
widget.controller.viewer.getCameraCullingNear().then((v) {
|
||||||
_near = v;
|
_near = v;
|
||||||
widget.controller.getCameraCullingFar().then((v) {
|
widget.controller.viewer.getCameraCullingFar().then((v) {
|
||||||
_far = v;
|
_far = v;
|
||||||
setState(() {});
|
setState(() {});
|
||||||
});
|
});
|
||||||
@@ -57,7 +56,7 @@ class _CameraSubmenuState extends State<CameraSubmenu> {
|
|||||||
menuChildren: [1.0, 7.0, 14.0, 28.0, 56.0]
|
menuChildren: [1.0, 7.0, 14.0, 28.0, 56.0]
|
||||||
.map((v) => MenuItemButton(
|
.map((v) => MenuItemButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
widget.controller.setCameraFocalLength(v);
|
widget.controller.viewer.setCameraFocalLength(v);
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
v.toStringAsFixed(2),
|
v.toStringAsFixed(2),
|
||||||
@@ -72,7 +71,7 @@ class _CameraSubmenuState extends State<CameraSubmenu> {
|
|||||||
_near = v;
|
_near = v;
|
||||||
print("Setting camera culling to $_near $_far!");
|
print("Setting camera culling to $_near $_far!");
|
||||||
|
|
||||||
widget.controller.setCameraCulling(_near!, _far!);
|
widget.controller.viewer.setCameraCulling(_near!, _far!);
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
v.toStringAsFixed(2),
|
v.toStringAsFixed(2),
|
||||||
@@ -86,7 +85,7 @@ class _CameraSubmenuState extends State<CameraSubmenu> {
|
|||||||
onPressed: () {
|
onPressed: () {
|
||||||
_far = v;
|
_far = v;
|
||||||
print("Setting camera culling to $_near! $_far");
|
print("Setting camera culling to $_near! $_far");
|
||||||
widget.controller.setCameraCulling(_near!, _far!);
|
widget.controller.viewer.setCameraCulling(_near!, _far!);
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
v.toStringAsFixed(2),
|
v.toStringAsFixed(2),
|
||||||
@@ -96,21 +95,21 @@ class _CameraSubmenuState extends State<CameraSubmenu> {
|
|||||||
child: const Text("Set far")),
|
child: const Text("Set far")),
|
||||||
MenuItemButton(
|
MenuItemButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
widget.controller.setCameraPosition(1.0, 1.0, -1.0);
|
widget.controller.viewer.setCameraPosition(1.0, 1.0, -1.0);
|
||||||
},
|
},
|
||||||
child: const Text('Set position to 1, 1, -1 (leave rotation as-is)'),
|
child: const Text('Set position to 1, 1, -1 (leave rotation as-is)'),
|
||||||
),
|
),
|
||||||
MenuItemButton(
|
MenuItemButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
widget.controller.setCameraPosition(0.0, 0.0, 0.0);
|
widget.controller.viewer.setCameraPosition(0.0, 0.0, 0.0);
|
||||||
widget.controller.setCameraRotation(
|
widget.controller.viewer.setCameraRotation(
|
||||||
v.Quaternion.axisAngle(v.Vector3(0, 0.0, 1.0), 0.0));
|
v.Quaternion.axisAngle(v.Vector3(0, 0.0, 1.0), 0.0));
|
||||||
},
|
},
|
||||||
child: const Text('Move to 0,0,0, facing towards 0,0,-1'),
|
child: const Text('Move to 0,0,0, facing towards 0,0,-1'),
|
||||||
),
|
),
|
||||||
MenuItemButton(
|
MenuItemButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
widget.controller.setCameraRotation(
|
widget.controller.viewer.setCameraRotation(
|
||||||
v.Quaternion.axisAngle(v.Vector3(0, 1, 0), pi / 4));
|
v.Quaternion.axisAngle(v.Vector3(0, 1, 0), pi / 4));
|
||||||
},
|
},
|
||||||
child: const Text("Rotate camera 45 degrees around y axis"),
|
child: const Text("Rotate camera 45 degrees around y axis"),
|
||||||
@@ -119,7 +118,7 @@ class _CameraSubmenuState extends State<CameraSubmenu> {
|
|||||||
onPressed: () {
|
onPressed: () {
|
||||||
ExampleWidgetState.frustumCulling =
|
ExampleWidgetState.frustumCulling =
|
||||||
!ExampleWidgetState.frustumCulling;
|
!ExampleWidgetState.frustumCulling;
|
||||||
widget.controller
|
widget.controller.viewer
|
||||||
.setViewFrustumCulling(ExampleWidgetState.frustumCulling);
|
.setViewFrustumCulling(ExampleWidgetState.frustumCulling);
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
@@ -129,7 +128,7 @@ class _CameraSubmenuState extends State<CameraSubmenu> {
|
|||||||
closeOnActivate: false,
|
closeOnActivate: false,
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
var projMatrix =
|
var projMatrix =
|
||||||
await widget.controller.getCameraProjectionMatrix();
|
await widget.controller.viewer.getCameraProjectionMatrix();
|
||||||
await showDialog(
|
await showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (ctx) {
|
builder: (ctx) {
|
||||||
@@ -148,7 +147,7 @@ class _CameraSubmenuState extends State<CameraSubmenu> {
|
|||||||
menuChildren: ManipulatorMode.values.map((mm) {
|
menuChildren: ManipulatorMode.values.map((mm) {
|
||||||
return MenuItemButton(
|
return MenuItemButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
widget.controller.setCameraManipulatorOptions(
|
widget.controller.viewer.setCameraManipulatorOptions(
|
||||||
mode: mm,
|
mode: mm,
|
||||||
orbitSpeedX: ExampleWidgetState.orbitSpeedX,
|
orbitSpeedX: ExampleWidgetState.orbitSpeedX,
|
||||||
orbitSpeedY: ExampleWidgetState.orbitSpeedY,
|
orbitSpeedY: ExampleWidgetState.orbitSpeedY,
|
||||||
@@ -170,7 +169,7 @@ class _CameraSubmenuState extends State<CameraSubmenu> {
|
|||||||
return MenuItemButton(
|
return MenuItemButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
ExampleWidgetState.zoomSpeed = speed;
|
ExampleWidgetState.zoomSpeed = speed;
|
||||||
widget.controller.setCameraManipulatorOptions(
|
widget.controller.viewer.setCameraManipulatorOptions(
|
||||||
orbitSpeedX: ExampleWidgetState.orbitSpeedX,
|
orbitSpeedX: ExampleWidgetState.orbitSpeedX,
|
||||||
orbitSpeedY: ExampleWidgetState.orbitSpeedY,
|
orbitSpeedY: ExampleWidgetState.orbitSpeedY,
|
||||||
zoomSpeed: ExampleWidgetState.zoomSpeed);
|
zoomSpeed: ExampleWidgetState.zoomSpeed);
|
||||||
@@ -192,7 +191,7 @@ class _CameraSubmenuState extends State<CameraSubmenu> {
|
|||||||
onPressed: () {
|
onPressed: () {
|
||||||
ExampleWidgetState.orbitSpeedX = speed;
|
ExampleWidgetState.orbitSpeedX = speed;
|
||||||
ExampleWidgetState.orbitSpeedY = speed;
|
ExampleWidgetState.orbitSpeedY = speed;
|
||||||
widget.controller.setCameraManipulatorOptions(
|
widget.controller.viewer.setCameraManipulatorOptions(
|
||||||
orbitSpeedX: ExampleWidgetState.orbitSpeedX,
|
orbitSpeedX: ExampleWidgetState.orbitSpeedX,
|
||||||
orbitSpeedY: ExampleWidgetState.orbitSpeedY,
|
orbitSpeedY: ExampleWidgetState.orbitSpeedY,
|
||||||
zoomSpeed: ExampleWidgetState.zoomSpeed);
|
zoomSpeed: ExampleWidgetState.zoomSpeed);
|
||||||
@@ -213,9 +212,9 @@ class _CameraSubmenuState extends State<CameraSubmenu> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
if (_near == null || _far == null) {
|
// if (_near == null || _far == null) {
|
||||||
return Container();
|
// return Container();
|
||||||
}
|
// }
|
||||||
return SubmenuButton(
|
return SubmenuButton(
|
||||||
controller: _menuController,
|
controller: _menuController,
|
||||||
menuChildren: _cameraMenu(),
|
menuChildren: _cameraMenu(),
|
||||||
|
|||||||
@@ -6,14 +6,15 @@ import 'package:flutter/widgets.dart';
|
|||||||
import 'package:flutter_filament/flutter_filament.dart';
|
import 'package:flutter_filament/flutter_filament.dart';
|
||||||
|
|
||||||
class ControllerMenu extends StatefulWidget {
|
class ControllerMenu extends StatefulWidget {
|
||||||
final FlutterFilamentPlugin? controller;
|
final FlutterFilamentPlugin controller;
|
||||||
final void Function() onToggleViewport;
|
final void Function() onToggleViewport;
|
||||||
final void Function(FlutterFilamentPlugin controller) onControllerCreated;
|
final void Function() onControllerCreated;
|
||||||
final void Function() onControllerDestroyed;
|
final void Function() onControllerDestroyed;
|
||||||
final FocusNode sharedFocusNode;
|
final FocusNode sharedFocusNode;
|
||||||
|
|
||||||
|
|
||||||
ControllerMenu(
|
ControllerMenu(
|
||||||
{this.controller,
|
{required this.controller,
|
||||||
required this.onControllerCreated,
|
required this.onControllerCreated,
|
||||||
required this.onControllerDestroyed,
|
required this.onControllerDestroyed,
|
||||||
required this.sharedFocusNode,
|
required this.sharedFocusNode,
|
||||||
@@ -24,37 +25,26 @@ class ControllerMenu extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _ControllerMenuState extends State<ControllerMenu> {
|
class _ControllerMenuState extends State<ControllerMenu> {
|
||||||
FlutterFilamentPlugin? _flutterFilamentPlugin;
|
|
||||||
|
|
||||||
void _createController({String? uberArchivePath}) async {
|
void _createController({String? uberArchivePath}) async {
|
||||||
if (_flutterFilamentPlugin != null) {
|
widget.controller.initialize(uberArchivePath: uberArchivePath);
|
||||||
throw Exception("Controller already exists");
|
widget.onControllerCreated();
|
||||||
}
|
|
||||||
_flutterFilamentPlugin =
|
|
||||||
await FlutterFilamentPlugin.create(uberArchivePath: uberArchivePath);
|
|
||||||
widget.onControllerCreated(_flutterFilamentPlugin!);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_flutterFilamentPlugin = widget.controller;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void didUpdateWidget(ControllerMenu oldWidget) {
|
void didUpdateWidget(ControllerMenu oldWidget) {
|
||||||
super.didUpdateWidget(oldWidget);
|
super.didUpdateWidget(oldWidget);
|
||||||
if (widget.controller != _flutterFilamentPlugin) {
|
|
||||||
setState(() {
|
|
||||||
_flutterFilamentPlugin = widget.controller;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool _initialized = false;
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
var items = <Widget>[];
|
var items = <Widget>[];
|
||||||
if (_flutterFilamentPlugin == null) {
|
if (!_initialized) {
|
||||||
items.addAll([
|
items.addAll([
|
||||||
MenuItemButton(
|
MenuItemButton(
|
||||||
child:
|
child:
|
||||||
@@ -83,8 +73,7 @@ class _ControllerMenuState extends State<ControllerMenu> {
|
|||||||
MenuItemButton(
|
MenuItemButton(
|
||||||
child: const Text("Destroy viewer"),
|
child: const Text("Destroy viewer"),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await _flutterFilamentPlugin!.dispose();
|
widget.controller.dispose();
|
||||||
_flutterFilamentPlugin = null;
|
|
||||||
widget.onControllerDestroyed();
|
widget.onControllerDestroyed();
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_filament/flutter_filament.dart';
|
import 'package:flutter_filament/flutter_filament.dart';
|
||||||
import 'package:flutter_filament_example/main.dart';
|
import 'package:flutter_filament_example/main.dart';
|
||||||
import 'package:dart_filament/dart_filament.dart';
|
import 'package:dart_filament/dart_filament/abstract_filament_viewer.dart';
|
||||||
|
|
||||||
class RenderingSubmenu extends StatefulWidget {
|
class RenderingSubmenu extends StatefulWidget {
|
||||||
final FlutterFilamentPlugin controller;
|
final FlutterFilamentPlugin controller;
|
||||||
@@ -19,14 +19,14 @@ class _RenderingSubmenuState extends State<RenderingSubmenu> {
|
|||||||
menuChildren: [
|
menuChildren: [
|
||||||
MenuItemButton(
|
MenuItemButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
widget.controller.render();
|
widget.controller.viewer.render();
|
||||||
},
|
},
|
||||||
child: const Text("Render single frame"),
|
child: const Text("Render single frame"),
|
||||||
),
|
),
|
||||||
MenuItemButton(
|
MenuItemButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
ExampleWidgetState.rendering = !ExampleWidgetState.rendering;
|
ExampleWidgetState.rendering = !ExampleWidgetState.rendering;
|
||||||
widget.controller.setRendering(ExampleWidgetState.rendering);
|
widget.controller.viewer.setRendering(ExampleWidgetState.rendering);
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
"Set continuous rendering to ${!ExampleWidgetState.rendering}"),
|
"Set continuous rendering to ${!ExampleWidgetState.rendering}"),
|
||||||
@@ -35,14 +35,14 @@ class _RenderingSubmenuState extends State<RenderingSubmenu> {
|
|||||||
onPressed: () {
|
onPressed: () {
|
||||||
ExampleWidgetState.framerate =
|
ExampleWidgetState.framerate =
|
||||||
ExampleWidgetState.framerate == 60 ? 30 : 60;
|
ExampleWidgetState.framerate == 60 ? 30 : 60;
|
||||||
widget.controller.setFrameRate(ExampleWidgetState.framerate);
|
widget.controller.viewer.setFrameRate(ExampleWidgetState.framerate);
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
"Toggle framerate (currently ${ExampleWidgetState.framerate}) "),
|
"Toggle framerate (currently ${ExampleWidgetState.framerate}) "),
|
||||||
),
|
),
|
||||||
MenuItemButton(
|
MenuItemButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
widget.controller.setToneMapping(ToneMapper.LINEAR);
|
widget.controller.viewer.setToneMapping(ToneMapper.LINEAR);
|
||||||
},
|
},
|
||||||
child: const Text("Set tone mapping to linear"),
|
child: const Text("Set tone mapping to linear"),
|
||||||
),
|
),
|
||||||
@@ -50,7 +50,7 @@ class _RenderingSubmenuState extends State<RenderingSubmenu> {
|
|||||||
onPressed: () {
|
onPressed: () {
|
||||||
ExampleWidgetState.postProcessing =
|
ExampleWidgetState.postProcessing =
|
||||||
!ExampleWidgetState.postProcessing;
|
!ExampleWidgetState.postProcessing;
|
||||||
widget.controller
|
widget.controller.viewer
|
||||||
.setPostProcessing(ExampleWidgetState.postProcessing);
|
.setPostProcessing(ExampleWidgetState.postProcessing);
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
@@ -60,7 +60,7 @@ class _RenderingSubmenuState extends State<RenderingSubmenu> {
|
|||||||
onPressed: () {
|
onPressed: () {
|
||||||
ExampleWidgetState.antiAliasingMsaa =
|
ExampleWidgetState.antiAliasingMsaa =
|
||||||
!ExampleWidgetState.antiAliasingMsaa;
|
!ExampleWidgetState.antiAliasingMsaa;
|
||||||
widget.controller.setAntiAliasing(
|
widget.controller.viewer.setAntiAliasing(
|
||||||
ExampleWidgetState.antiAliasingMsaa,
|
ExampleWidgetState.antiAliasingMsaa,
|
||||||
ExampleWidgetState.antiAliasingFxaa,
|
ExampleWidgetState.antiAliasingFxaa,
|
||||||
ExampleWidgetState.antiAliasingTaa);
|
ExampleWidgetState.antiAliasingTaa);
|
||||||
@@ -72,7 +72,7 @@ class _RenderingSubmenuState extends State<RenderingSubmenu> {
|
|||||||
onPressed: () {
|
onPressed: () {
|
||||||
ExampleWidgetState.antiAliasingFxaa =
|
ExampleWidgetState.antiAliasingFxaa =
|
||||||
!ExampleWidgetState.antiAliasingFxaa;
|
!ExampleWidgetState.antiAliasingFxaa;
|
||||||
widget.controller.setAntiAliasing(
|
widget.controller.viewer.setAntiAliasing(
|
||||||
ExampleWidgetState.antiAliasingMsaa,
|
ExampleWidgetState.antiAliasingMsaa,
|
||||||
ExampleWidgetState.antiAliasingFxaa,
|
ExampleWidgetState.antiAliasingFxaa,
|
||||||
ExampleWidgetState.antiAliasingTaa);
|
ExampleWidgetState.antiAliasingTaa);
|
||||||
@@ -83,14 +83,14 @@ class _RenderingSubmenuState extends State<RenderingSubmenu> {
|
|||||||
MenuItemButton(
|
MenuItemButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
ExampleWidgetState.recording = !ExampleWidgetState.recording;
|
ExampleWidgetState.recording = !ExampleWidgetState.recording;
|
||||||
widget.controller.setRecording(ExampleWidgetState.recording);
|
widget.controller.viewer.setRecording(ExampleWidgetState.recording);
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
"Turn recording ${ExampleWidgetState.recording ? "OFF" : "ON"}) "),
|
"Turn recording ${ExampleWidgetState.recording ? "OFF" : "ON"}) "),
|
||||||
),
|
),
|
||||||
MenuItemButton(
|
MenuItemButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await widget.controller
|
await widget.controller.viewer
|
||||||
.addLight(2, 6000, 100000, 0, 0, 0, 0, 1, 0, false);
|
.addLight(2, 6000, 100000, 0, 0, 0, 0, 1, 0, false);
|
||||||
},
|
},
|
||||||
child: Text("Add light"),
|
child: Text("Add light"),
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_filament/flutter_filament.dart';
|
import 'package:dart_filament/dart_filament/abstract_filament_viewer.dart';
|
||||||
import 'package:dart_filament/dart_filament.dart';
|
|
||||||
|
|
||||||
class PickerResultWidget extends StatelessWidget {
|
class PickerResultWidget extends StatelessWidget {
|
||||||
final FilamentViewer controller;
|
final AbstractFilamentViewer controller;
|
||||||
|
|
||||||
const PickerResultWidget({required this.controller, super.key});
|
const PickerResultWidget({required this.controller, super.key});
|
||||||
|
|
||||||
|
|||||||
@@ -4,10 +4,11 @@ packages:
|
|||||||
animation_tools_dart:
|
animation_tools_dart:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: animation_tools_dart
|
path: "."
|
||||||
sha256: c4bc4096d43227b573345a3ea3cb26c3af47a70af31cd7d7d3a5b7c99e33d615
|
ref: HEAD
|
||||||
url: "https://pub.dev"
|
resolved-ref: "1a5ffc8a58353d43ba1864c8676c47948ee9b5ce"
|
||||||
source: hosted
|
url: "git@github.com:nmfisher/animation_tools_dart.git"
|
||||||
|
source: git
|
||||||
version: "0.0.2"
|
version: "0.0.2"
|
||||||
archive:
|
archive:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
@@ -136,14 +137,28 @@ packages:
|
|||||||
path: ".."
|
path: ".."
|
||||||
relative: true
|
relative: true
|
||||||
source: path
|
source: path
|
||||||
version: "0.6.0"
|
version: "0.7.0"
|
||||||
|
flutter_filament_ffi:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
path: "../../flutter_filament_ffi"
|
||||||
|
relative: true
|
||||||
|
source: path
|
||||||
|
version: "0.0.1"
|
||||||
flutter_filament_platform_interface:
|
flutter_filament_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
path: "../../flutter_filament_platform_interface"
|
path: "../../flutter_filament_platform_interface"
|
||||||
relative: true
|
relative: true
|
||||||
source: path
|
source: path
|
||||||
version: "2.0.5"
|
version: "0.0.1"
|
||||||
|
flutter_filament_web:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
path: "../../flutter_filament_web"
|
||||||
|
relative: true
|
||||||
|
source: path
|
||||||
|
version: "0.0.1"
|
||||||
flutter_lints:
|
flutter_lints:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
@@ -332,54 +347,6 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.2.1"
|
version: "2.2.1"
|
||||||
permission_handler:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: permission_handler
|
|
||||||
sha256: "18bf33f7fefbd812f37e72091a15575e72d5318854877e0e4035a24ac1113ecb"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "11.3.1"
|
|
||||||
permission_handler_android:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: permission_handler_android
|
|
||||||
sha256: "8bb852cd759488893805c3161d0b2b5db55db52f773dbb014420b304055ba2c5"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "12.0.6"
|
|
||||||
permission_handler_apple:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: permission_handler_apple
|
|
||||||
sha256: e9ad66020b89ff1b63908f247c2c6f931c6e62699b756ef8b3c4569350cd8662
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "9.4.4"
|
|
||||||
permission_handler_html:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: permission_handler_html
|
|
||||||
sha256: "54bf176b90f6eddd4ece307e2c06cf977fb3973719c35a93b85cc7093eb6070d"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "0.1.1"
|
|
||||||
permission_handler_platform_interface:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: permission_handler_platform_interface
|
|
||||||
sha256: "48d4fcf201a1dad93ee869ab0d4101d084f49136ec82a8a06ed9cfeacab9fd20"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "4.2.1"
|
|
||||||
permission_handler_windows:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: permission_handler_windows
|
|
||||||
sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "0.2.1"
|
|
||||||
petitparser:
|
petitparser:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -521,6 +488,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "14.2.2"
|
version: "14.2.2"
|
||||||
|
web:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: web
|
||||||
|
sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.5.1"
|
||||||
webdriver:
|
webdriver:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ description: Demonstrates how to use the flutter_filament plugin.
|
|||||||
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=3.0.0 <4.0.0"
|
sdk: ">=3.3.0 <4.0.0"
|
||||||
|
|
||||||
# Dependencies specify other packages that your package needs in order to work.
|
# Dependencies specify other packages that your package needs in order to work.
|
||||||
# To automatically upgrade your package dependencies to the latest versions
|
# To automatically upgrade your package dependencies to the latest versions
|
||||||
@@ -20,8 +20,8 @@ dependencies:
|
|||||||
path_provider:
|
path_provider:
|
||||||
flutter_filament:
|
flutter_filament:
|
||||||
path: ../
|
path: ../
|
||||||
permission_handler:
|
|
||||||
cupertino_icons: ^1.0.2
|
cupertino_icons: ^1.0.2
|
||||||
|
web:
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Binary file not shown.
@@ -0,0 +1,4 @@
|
|||||||
|
// This file is no longer used by emscripten and has been created as a placeholder
|
||||||
|
// to allow build systems to transition away from depending on it.
|
||||||
|
//
|
||||||
|
// Future versions of emscripten will likely stop generating this file at all.
|
||||||
@@ -15,6 +15,7 @@
|
|||||||
the `--base-href` argument provided to `flutter build`.
|
the `--base-href` argument provided to `flutter build`.
|
||||||
-->
|
-->
|
||||||
<base href="$FLUTTER_BASE_HREF">
|
<base href="$FLUTTER_BASE_HREF">
|
||||||
|
<script src="dart_filament.js"></script>
|
||||||
|
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
|
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
|
||||||
@@ -38,25 +39,151 @@
|
|||||||
</script>
|
</script>
|
||||||
<!-- This script adds the flutter initialization JS code -->
|
<!-- This script adds the flutter initialization JS code -->
|
||||||
<script src="flutter.js" defer></script>
|
<script src="flutter.js" defer></script>
|
||||||
|
<style>
|
||||||
|
html, body {
|
||||||
|
margin:0;
|
||||||
|
padding:0;
|
||||||
|
}
|
||||||
|
#flutter_host {
|
||||||
|
position:absolute;
|
||||||
|
left:200;
|
||||||
|
right:0;
|
||||||
|
top:200;
|
||||||
|
bottom:0;
|
||||||
|
}
|
||||||
|
canvas {
|
||||||
|
position:absolute;
|
||||||
|
left:0;
|
||||||
|
right:0;
|
||||||
|
top:0;
|
||||||
|
bottom:0;
|
||||||
|
width:100%;
|
||||||
|
height:100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<script type="module">
|
||||||
<div style="height:30px;background:blue;width:100%"></div>
|
window.resolveCallback = (cb, data) => {
|
||||||
<div style="height:100px; width:100px" id="flutter_host"></div>
|
const fn = window.df.wasmTable.get(cb);
|
||||||
<canvas id="drawHere"></canvas>
|
if(data) {
|
||||||
<script>
|
fn(data);
|
||||||
window.addEventListener('load', function(ev) {
|
} else {
|
||||||
|
fn();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
window.createVoidCallback = () => {
|
||||||
|
let res; //placeholder for resolver callback, outside of promise
|
||||||
|
const promise = new Promise((resolve, reject) => {
|
||||||
|
res = resolve;
|
||||||
|
});
|
||||||
|
try {
|
||||||
|
const callback = () => {
|
||||||
|
try {
|
||||||
|
res({});
|
||||||
|
} catch(err) {
|
||||||
|
console.log(err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const fnPtr = window.df.addFunction(callback, 'v');
|
||||||
|
return [promise, fnPtr];
|
||||||
|
} catch(err) {
|
||||||
|
console.log(err);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
window.createIntCallback = () => {
|
||||||
|
let res;
|
||||||
|
const promise = new Promise((resolve, reject) => {
|
||||||
|
res = resolve;
|
||||||
|
});
|
||||||
|
try {
|
||||||
|
const callback = (val) => {
|
||||||
|
try {
|
||||||
|
res(val);
|
||||||
|
} catch(err) {
|
||||||
|
console.log(err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const fnPtr = window.df.addFunction(callback, 'vi');
|
||||||
|
return [promise, fnPtr];
|
||||||
|
} catch(err) {
|
||||||
|
console.log(err);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
window.createVoidPointerCallback = () => {
|
||||||
|
let res; //placeholder for resolver callback, outside of promise
|
||||||
|
|
||||||
|
const promise = new Promise((resolve, reject) => {
|
||||||
|
res = resolve;
|
||||||
|
});
|
||||||
|
try {
|
||||||
|
const callback = (voidPtr) => {
|
||||||
|
try {
|
||||||
|
res(voidPtr);
|
||||||
|
} catch(err) {
|
||||||
|
console.log(err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const fnPtr = window.df.addFunction(callback, 'vi');
|
||||||
|
return [promise, fnPtr];
|
||||||
|
} catch(err) {
|
||||||
|
console.log(err);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
window.createBoolCallback = () => {
|
||||||
|
let res; //placeholder for resolver callback, outside of promise
|
||||||
|
|
||||||
|
const promise = new Promise((resolve, reject) => {
|
||||||
|
res = resolve;
|
||||||
|
});
|
||||||
|
try {
|
||||||
|
const callback = (val) => {
|
||||||
|
try {
|
||||||
|
res(val);
|
||||||
|
} catch(err) {
|
||||||
|
console.log(err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const fnPtr = window.df.addFunction(callback, 'vi');
|
||||||
|
return [promise, fnPtr];
|
||||||
|
} catch(err) {
|
||||||
|
console.log(err);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const df = await dart_filament();
|
||||||
|
window.df = df;
|
||||||
|
|
||||||
|
const dartModulePromise = WebAssembly.compileStreaming(fetch('main.wasm'));
|
||||||
|
const imports = {"dart_filament":df};
|
||||||
|
const dart2wasm_runtime = await import('./main.mjs');
|
||||||
|
const moduleInstance = await dart2wasm_runtime.instantiate(dartModulePromise, imports);
|
||||||
|
window.example = moduleInstance;
|
||||||
|
await dart2wasm_runtime.invoke(moduleInstance);
|
||||||
|
|
||||||
|
// window.addEventListener('load', function(ev) {
|
||||||
// Download main.dart.js
|
// Download main.dart.js
|
||||||
_flutter.loader.loadEntrypoint({
|
_flutter.loader.loadEntrypoint({
|
||||||
serviceWorker: {
|
serviceWorker: {
|
||||||
serviceWorkerVersion: serviceWorkerVersion,
|
serviceWorkerVersion: serviceWorkerVersion,
|
||||||
},
|
},
|
||||||
onEntrypointLoaded: function(engineInitializer) {
|
onEntrypointLoaded: function(engineInitializer) {
|
||||||
|
console.log("init engine");
|
||||||
engineInitializer.initializeEngine({ hostElement: document.querySelector("#flutter_host")}).then(function(appRunner) {
|
engineInitializer.initializeEngine({ hostElement: document.querySelector("#flutter_host")}).then(function(appRunner) {
|
||||||
appRunner.runApp();
|
appRunner.runApp();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
// });
|
||||||
</script>
|
|
||||||
|
</script>
|
||||||
|
<body>
|
||||||
|
<canvas id="canvas"></canvas>
|
||||||
|
<div style="position:absolute;height:100%; width:100%" id="flutter_host"></div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -0,0 +1,53 @@
|
|||||||
|
|
||||||
|
// import 'package:polyvox_engine/app/app.dart';
|
||||||
|
// import 'package:polyvox_engine/app/states/states.dart';
|
||||||
|
// import 'package:polyvox_engine/services/asr_service.dart';
|
||||||
|
// import 'package:polyvox_web/error_handler.dart';
|
||||||
|
// import 'package:polyvox_web/services/web_asr_service.dart';
|
||||||
|
// import 'package:polyvox_web/services/web_asset_repository.dart';
|
||||||
|
// import 'package:polyvox_web/services/web_audio_service.dart';
|
||||||
|
// import 'package:polyvox_web/services/web_auth_service.dart';
|
||||||
|
// import 'package:polyvox_web/services/web_data_provider.dart';
|
||||||
|
// import 'package:polyvox_web/services/web_purchase_service.dart';
|
||||||
|
// import 'package:polyvox_web/services/web_scoring_service.dart';
|
||||||
|
// import 'package:polyvox_web/web_canvas.dart';
|
||||||
|
import 'package:dart_filament/dart_filament/abstract_filament_viewer.dart';
|
||||||
|
import 'package:dart_filament/dart_filament/compatibility/web/compatibility.dart';
|
||||||
|
import 'package:dart_filament/dart_filament/filament_viewer_impl.dart';
|
||||||
|
import 'package:dart_filament/dart_filament/compatibility/web/interop/dart_filament_js_export_type.dart';
|
||||||
|
import 'package:dart_filament/dart_filament/compatibility/web/interop/dart_filament_js_extension_type.dart';
|
||||||
|
import 'package:web/web.dart';
|
||||||
|
|
||||||
|
void main(List<String> arguments) async {
|
||||||
|
var viewer = await WebViewer.initialize();
|
||||||
|
|
||||||
|
DartFilamentJSExportViewer.initializeBindings(viewer);
|
||||||
|
|
||||||
|
print("Set wrapper, running!");
|
||||||
|
|
||||||
|
while (true) {
|
||||||
|
await Future.delayed(Duration(milliseconds: 16));
|
||||||
|
}
|
||||||
|
print("Finisehd!");
|
||||||
|
}
|
||||||
|
|
||||||
|
class WebViewer {
|
||||||
|
static Future<AbstractFilamentViewer> initialize() async {
|
||||||
|
var fc = FooChar();
|
||||||
|
final canvas = document.getElementById("canvas") as HTMLCanvasElement;
|
||||||
|
canvas.width = window.innerWidth;
|
||||||
|
canvas.height = window.innerHeight;
|
||||||
|
|
||||||
|
var resourceLoader = flutter_filament_web_get_resource_loader_wrapper();
|
||||||
|
|
||||||
|
var viewer = FilamentViewer(resourceLoader: resourceLoader);
|
||||||
|
|
||||||
|
await viewer.initialized;
|
||||||
|
var width = window.innerWidth;
|
||||||
|
var height = window.innerHeight;
|
||||||
|
await viewer.createSwapChain(width.toDouble(), height.toDouble());
|
||||||
|
await viewer.updateViewportAndCameraProjection(
|
||||||
|
width.toDouble(), height.toDouble());
|
||||||
|
return viewer;
|
||||||
|
}
|
||||||
|
}
|
||||||
359
flutter_filament_federated/flutter_filament/example/web/main.mjs
Normal file
359
flutter_filament_federated/flutter_filament/example/web/main.mjs
Normal file
@@ -0,0 +1,359 @@
|
|||||||
|
let buildArgsList;
|
||||||
|
|
||||||
|
// `modulePromise` is a promise to the `WebAssembly.module` object to be
|
||||||
|
// instantiated.
|
||||||
|
// `importObjectPromise` is a promise to an object that contains any additional
|
||||||
|
// imports needed by the module that aren't provided by the standard runtime.
|
||||||
|
// The fields on this object will be merged into the importObject with which
|
||||||
|
// the module will be instantiated.
|
||||||
|
// This function returns a promise to the instantiated module.
|
||||||
|
export const instantiate = async (modulePromise, importObjectPromise) => {
|
||||||
|
let dartInstance;
|
||||||
|
|
||||||
|
function stringFromDartString(string) {
|
||||||
|
const totalLength = dartInstance.exports.$stringLength(string);
|
||||||
|
let result = '';
|
||||||
|
let index = 0;
|
||||||
|
while (index < totalLength) {
|
||||||
|
let chunkLength = Math.min(totalLength - index, 0xFFFF);
|
||||||
|
const array = new Array(chunkLength);
|
||||||
|
for (let i = 0; i < chunkLength; i++) {
|
||||||
|
array[i] = dartInstance.exports.$stringRead(string, index++);
|
||||||
|
}
|
||||||
|
result += String.fromCharCode(...array);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
function stringToDartString(string) {
|
||||||
|
const length = string.length;
|
||||||
|
let range = 0;
|
||||||
|
for (let i = 0; i < length; i++) {
|
||||||
|
range |= string.codePointAt(i);
|
||||||
|
}
|
||||||
|
if (range < 256) {
|
||||||
|
const dartString = dartInstance.exports.$stringAllocate1(length);
|
||||||
|
for (let i = 0; i < length; i++) {
|
||||||
|
dartInstance.exports.$stringWrite1(dartString, i, string.codePointAt(i));
|
||||||
|
}
|
||||||
|
return dartString;
|
||||||
|
} else {
|
||||||
|
const dartString = dartInstance.exports.$stringAllocate2(length);
|
||||||
|
for (let i = 0; i < length; i++) {
|
||||||
|
dartInstance.exports.$stringWrite2(dartString, i, string.charCodeAt(i));
|
||||||
|
}
|
||||||
|
return dartString;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Prints to the console
|
||||||
|
function printToConsole(value) {
|
||||||
|
if (typeof dartPrint == "function") {
|
||||||
|
dartPrint(value);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (typeof console == "object" && typeof console.log != "undefined") {
|
||||||
|
console.log(value);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (typeof print == "function") {
|
||||||
|
print(value);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
throw "Unable to print message: " + js;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Converts a Dart List to a JS array. Any Dart objects will be converted, but
|
||||||
|
// this will be cheap for JSValues.
|
||||||
|
function arrayFromDartList(constructor, list) {
|
||||||
|
const length = dartInstance.exports.$listLength(list);
|
||||||
|
const array = new constructor(length);
|
||||||
|
for (let i = 0; i < length; i++) {
|
||||||
|
array[i] = dartInstance.exports.$listRead(list, i);
|
||||||
|
}
|
||||||
|
return array;
|
||||||
|
}
|
||||||
|
|
||||||
|
buildArgsList = function(list) {
|
||||||
|
const dartList = dartInstance.exports.$makeStringList();
|
||||||
|
for (let i = 0; i < list.length; i++) {
|
||||||
|
dartInstance.exports.$listAdd(dartList, stringToDartString(list[i]));
|
||||||
|
}
|
||||||
|
return dartList;
|
||||||
|
}
|
||||||
|
|
||||||
|
// A special symbol attached to functions that wrap Dart functions.
|
||||||
|
const jsWrappedDartFunctionSymbol = Symbol("JSWrappedDartFunction");
|
||||||
|
|
||||||
|
function finalizeWrapper(dartFunction, wrapped) {
|
||||||
|
wrapped.dartFunction = dartFunction;
|
||||||
|
wrapped[jsWrappedDartFunctionSymbol] = true;
|
||||||
|
return wrapped;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Imports
|
||||||
|
const dart2wasm = {
|
||||||
|
|
||||||
|
_11: x0 => new Array(x0),
|
||||||
|
_12: x0 => new Promise(x0),
|
||||||
|
_17: (o,s,v) => o[s] = v,
|
||||||
|
_18: f => finalizeWrapper(f,x0 => dartInstance.exports._18(f,x0)),
|
||||||
|
_19: f => finalizeWrapper(f,x0 => dartInstance.exports._19(f,x0)),
|
||||||
|
_20: (x0,x1,x2) => x0.call(x1,x2),
|
||||||
|
_21: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._21(f,x0,x1)),
|
||||||
|
_22: (x0,x1) => x0.call(x1),
|
||||||
|
_23: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._23(f,x0,x1)),
|
||||||
|
_44: () => Symbol("jsBoxedDartObjectProperty"),
|
||||||
|
_75: (x0,x1) => x0.getElementById(x1),
|
||||||
|
_1495: (x0,x1) => x0.width = x1,
|
||||||
|
_1497: (x0,x1) => x0.height = x1,
|
||||||
|
_1874: () => globalThis.window,
|
||||||
|
_1916: x0 => x0.innerWidth,
|
||||||
|
_1917: x0 => x0.innerHeight,
|
||||||
|
_6850: () => globalThis.document,
|
||||||
|
_12719: () => globalThis.createVoidCallback(),
|
||||||
|
_12720: () => globalThis.createVoidPointerCallback(),
|
||||||
|
_12721: () => globalThis.createBoolCallback(),
|
||||||
|
_12722: () => globalThis.createBoolCallback(),
|
||||||
|
_12724: v => stringToDartString(v.toString()),
|
||||||
|
_12740: () => {
|
||||||
|
let stackString = new Error().stack.toString();
|
||||||
|
let frames = stackString.split('\n');
|
||||||
|
let drop = 2;
|
||||||
|
if (frames[0] === 'Error') {
|
||||||
|
drop += 1;
|
||||||
|
}
|
||||||
|
return frames.slice(drop).join('\n');
|
||||||
|
},
|
||||||
|
_12759: s => stringToDartString(JSON.stringify(stringFromDartString(s))),
|
||||||
|
_12760: s => printToConsole(stringFromDartString(s)),
|
||||||
|
_12761: f => finalizeWrapper(f,() => dartInstance.exports._12761(f)),
|
||||||
|
_12762: f => finalizeWrapper(f,() => dartInstance.exports._12762(f)),
|
||||||
|
_12763: f => finalizeWrapper(f,x0 => dartInstance.exports._12763(f,x0)),
|
||||||
|
_12764: f => finalizeWrapper(f,() => dartInstance.exports._12764(f)),
|
||||||
|
_12765: f => finalizeWrapper(f,x0 => dartInstance.exports._12765(f,x0)),
|
||||||
|
_12766: f => finalizeWrapper(f,() => dartInstance.exports._12766(f)),
|
||||||
|
_12767: f => finalizeWrapper(f,x0 => dartInstance.exports._12767(f,x0)),
|
||||||
|
_12768: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12768(f,x0,x1)),
|
||||||
|
_12769: f => finalizeWrapper(f,() => dartInstance.exports._12769(f)),
|
||||||
|
_12770: f => finalizeWrapper(f,(x0,x1,x2,x3) => dartInstance.exports._12770(f,x0,x1,x2,x3)),
|
||||||
|
_12771: f => finalizeWrapper(f,x0 => dartInstance.exports._12771(f,x0)),
|
||||||
|
_12772: f => finalizeWrapper(f,() => dartInstance.exports._12772(f)),
|
||||||
|
_12773: f => finalizeWrapper(f,x0 => dartInstance.exports._12773(f,x0)),
|
||||||
|
_12774: f => finalizeWrapper(f,x0 => dartInstance.exports._12774(f,x0)),
|
||||||
|
_12775: f => finalizeWrapper(f,() => dartInstance.exports._12775(f)),
|
||||||
|
_12776: f => finalizeWrapper(f,(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9) => dartInstance.exports._12776(f,x0,x1,x2,x3,x4,x5,x6,x7,x8,x9)),
|
||||||
|
_12777: f => finalizeWrapper(f,x0 => dartInstance.exports._12777(f,x0)),
|
||||||
|
_12778: f => finalizeWrapper(f,() => dartInstance.exports._12778(f)),
|
||||||
|
_12779: f => finalizeWrapper(f,x0 => dartInstance.exports._12779(f,x0)),
|
||||||
|
_12780: f => finalizeWrapper(f,x0 => dartInstance.exports._12780(f,x0)),
|
||||||
|
_12781: f => finalizeWrapper(f,x0 => dartInstance.exports._12781(f,x0)),
|
||||||
|
_12782: f => finalizeWrapper(f,x0 => dartInstance.exports._12782(f,x0)),
|
||||||
|
_12783: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12783(f,x0,x1)),
|
||||||
|
_12784: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12784(f,x0,x1)),
|
||||||
|
_12785: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12785(f,x0,x1)),
|
||||||
|
_12786: f => finalizeWrapper(f,() => dartInstance.exports._12786(f)),
|
||||||
|
_12787: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12787(f,x0,x1)),
|
||||||
|
_12788: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12788(f,x0,x1)),
|
||||||
|
_12789: f => finalizeWrapper(f,() => dartInstance.exports._12789(f)),
|
||||||
|
_12790: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12790(f,x0,x1)),
|
||||||
|
_12791: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12791(f,x0,x1)),
|
||||||
|
_12792: f => finalizeWrapper(f,x0 => dartInstance.exports._12792(f,x0)),
|
||||||
|
_12793: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12793(f,x0,x1)),
|
||||||
|
_12794: f => finalizeWrapper(f,(x0,x1,x2,x3) => dartInstance.exports._12794(f,x0,x1,x2,x3)),
|
||||||
|
_12795: f => finalizeWrapper(f,x0 => dartInstance.exports._12795(f,x0)),
|
||||||
|
_12796: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12796(f,x0,x1)),
|
||||||
|
_12797: f => finalizeWrapper(f,x0 => dartInstance.exports._12797(f,x0)),
|
||||||
|
_12798: f => finalizeWrapper(f,() => dartInstance.exports._12798(f)),
|
||||||
|
_12799: f => finalizeWrapper(f,() => dartInstance.exports._12799(f)),
|
||||||
|
_12800: f => finalizeWrapper(f,(x0,x1,x2) => dartInstance.exports._12800(f,x0,x1,x2)),
|
||||||
|
_12801: f => finalizeWrapper(f,() => dartInstance.exports._12801(f)),
|
||||||
|
_12802: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12802(f,x0,x1)),
|
||||||
|
_12803: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12803(f,x0,x1)),
|
||||||
|
_12804: f => finalizeWrapper(f,(x0,x1,x2) => dartInstance.exports._12804(f,x0,x1,x2)),
|
||||||
|
_12805: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12805(f,x0,x1)),
|
||||||
|
_12806: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12806(f,x0,x1)),
|
||||||
|
_12807: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12807(f,x0,x1)),
|
||||||
|
_12808: f => finalizeWrapper(f,() => dartInstance.exports._12808(f)),
|
||||||
|
_12809: f => finalizeWrapper(f,() => dartInstance.exports._12809(f)),
|
||||||
|
_12810: f => finalizeWrapper(f,(x0,x1,x2) => dartInstance.exports._12810(f,x0,x1,x2)),
|
||||||
|
_12811: f => finalizeWrapper(f,x0 => dartInstance.exports._12811(f,x0)),
|
||||||
|
_12812: f => finalizeWrapper(f,x0 => dartInstance.exports._12812(f,x0)),
|
||||||
|
_12813: f => finalizeWrapper(f,x0 => dartInstance.exports._12813(f,x0)),
|
||||||
|
_12814: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12814(f,x0,x1)),
|
||||||
|
_12815: f => finalizeWrapper(f,() => dartInstance.exports._12815(f)),
|
||||||
|
_12816: f => finalizeWrapper(f,() => dartInstance.exports._12816(f)),
|
||||||
|
_12817: f => finalizeWrapper(f,x0 => dartInstance.exports._12817(f,x0)),
|
||||||
|
_12818: f => finalizeWrapper(f,() => dartInstance.exports._12818(f)),
|
||||||
|
_12819: f => finalizeWrapper(f,() => dartInstance.exports._12819(f)),
|
||||||
|
_12820: f => finalizeWrapper(f,() => dartInstance.exports._12820(f)),
|
||||||
|
_12821: f => finalizeWrapper(f,() => dartInstance.exports._12821(f)),
|
||||||
|
_12822: f => finalizeWrapper(f,() => dartInstance.exports._12822(f)),
|
||||||
|
_12823: f => finalizeWrapper(f,() => dartInstance.exports._12823(f)),
|
||||||
|
_12824: f => finalizeWrapper(f,(x0,x1,x2) => dartInstance.exports._12824(f,x0,x1,x2)),
|
||||||
|
_12825: f => finalizeWrapper(f,() => dartInstance.exports._12825(f)),
|
||||||
|
_12826: f => finalizeWrapper(f,x0 => dartInstance.exports._12826(f,x0)),
|
||||||
|
_12827: f => finalizeWrapper(f,x0 => dartInstance.exports._12827(f,x0)),
|
||||||
|
_12828: f => finalizeWrapper(f,(x0,x1,x2) => dartInstance.exports._12828(f,x0,x1,x2)),
|
||||||
|
_12829: f => finalizeWrapper(f,x0 => dartInstance.exports._12829(f,x0)),
|
||||||
|
_12830: f => finalizeWrapper(f,x0 => dartInstance.exports._12830(f,x0)),
|
||||||
|
_12831: f => finalizeWrapper(f,(x0,x1,x2,x3,x4,x5,x6) => dartInstance.exports._12831(f,x0,x1,x2,x3,x4,x5,x6)),
|
||||||
|
_12832: f => finalizeWrapper(f,x0 => dartInstance.exports._12832(f,x0)),
|
||||||
|
_12833: f => finalizeWrapper(f,(x0,x1,x2,x3) => dartInstance.exports._12833(f,x0,x1,x2,x3)),
|
||||||
|
_12834: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12834(f,x0,x1)),
|
||||||
|
_12835: f => finalizeWrapper(f,(x0,x1,x2,x3,x4) => dartInstance.exports._12835(f,x0,x1,x2,x3,x4)),
|
||||||
|
_12836: f => finalizeWrapper(f,(x0,x1,x2,x3,x4) => dartInstance.exports._12836(f,x0,x1,x2,x3,x4)),
|
||||||
|
_12837: f => finalizeWrapper(f,(x0,x1,x2,x3,x4,x5) => dartInstance.exports._12837(f,x0,x1,x2,x3,x4,x5)),
|
||||||
|
_12838: f => finalizeWrapper(f,(x0,x1,x2) => dartInstance.exports._12838(f,x0,x1,x2)),
|
||||||
|
_12839: f => finalizeWrapper(f,x0 => dartInstance.exports._12839(f,x0)),
|
||||||
|
_12840: f => finalizeWrapper(f,(x0,x1,x2) => dartInstance.exports._12840(f,x0,x1,x2)),
|
||||||
|
_12841: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12841(f,x0,x1)),
|
||||||
|
_12842: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12842(f,x0,x1)),
|
||||||
|
_12843: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12843(f,x0,x1)),
|
||||||
|
_12844: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12844(f,x0,x1)),
|
||||||
|
_12845: f => finalizeWrapper(f,x0 => dartInstance.exports._12845(f,x0)),
|
||||||
|
_12846: f => finalizeWrapper(f,() => dartInstance.exports._12846(f)),
|
||||||
|
_12847: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12847(f,x0,x1)),
|
||||||
|
_12848: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12848(f,x0,x1)),
|
||||||
|
_12849: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12849(f,x0,x1)),
|
||||||
|
_12850: f => finalizeWrapper(f,x0 => dartInstance.exports._12850(f,x0)),
|
||||||
|
_12851: f => finalizeWrapper(f,x0 => dartInstance.exports._12851(f,x0)),
|
||||||
|
_12852: f => finalizeWrapper(f,x0 => dartInstance.exports._12852(f,x0)),
|
||||||
|
_12853: f => finalizeWrapper(f,x0 => dartInstance.exports._12853(f,x0)),
|
||||||
|
_12854: f => finalizeWrapper(f,() => dartInstance.exports._12854(f)),
|
||||||
|
_12868: (ms, c) =>
|
||||||
|
setTimeout(() => dartInstance.exports.$invokeCallback(c),ms),
|
||||||
|
_12872: (c) =>
|
||||||
|
queueMicrotask(() => dartInstance.exports.$invokeCallback(c)),
|
||||||
|
_12874: (a, i) => a.push(i),
|
||||||
|
_12885: a => a.length,
|
||||||
|
_12887: (a, i) => a[i],
|
||||||
|
_12888: (a, i, v) => a[i] = v,
|
||||||
|
_12890: a => a.join(''),
|
||||||
|
_12900: (s, p, i) => s.indexOf(p, i),
|
||||||
|
_12903: (o, start, length) => new Uint8Array(o.buffer, o.byteOffset + start, length),
|
||||||
|
_12904: (o, start, length) => new Int8Array(o.buffer, o.byteOffset + start, length),
|
||||||
|
_12905: (o, start, length) => new Uint8ClampedArray(o.buffer, o.byteOffset + start, length),
|
||||||
|
_12906: (o, start, length) => new Uint16Array(o.buffer, o.byteOffset + start, length),
|
||||||
|
_12907: (o, start, length) => new Int16Array(o.buffer, o.byteOffset + start, length),
|
||||||
|
_12908: (o, start, length) => new Uint32Array(o.buffer, o.byteOffset + start, length),
|
||||||
|
_12909: (o, start, length) => new Int32Array(o.buffer, o.byteOffset + start, length),
|
||||||
|
_12912: (o, start, length) => new Float32Array(o.buffer, o.byteOffset + start, length),
|
||||||
|
_12913: (o, start, length) => new Float64Array(o.buffer, o.byteOffset + start, length),
|
||||||
|
_12918: (o) => new DataView(o.buffer, o.byteOffset, o.byteLength),
|
||||||
|
_12922: Function.prototype.call.bind(Object.getOwnPropertyDescriptor(DataView.prototype, 'byteLength').get),
|
||||||
|
_12923: (b, o) => new DataView(b, o),
|
||||||
|
_12925: Function.prototype.call.bind(DataView.prototype.getUint8),
|
||||||
|
_12927: Function.prototype.call.bind(DataView.prototype.getInt8),
|
||||||
|
_12929: Function.prototype.call.bind(DataView.prototype.getUint16),
|
||||||
|
_12931: Function.prototype.call.bind(DataView.prototype.getInt16),
|
||||||
|
_12933: Function.prototype.call.bind(DataView.prototype.getUint32),
|
||||||
|
_12935: Function.prototype.call.bind(DataView.prototype.getInt32),
|
||||||
|
_12941: Function.prototype.call.bind(DataView.prototype.getFloat32),
|
||||||
|
_12942: Function.prototype.call.bind(DataView.prototype.setFloat32),
|
||||||
|
_12943: Function.prototype.call.bind(DataView.prototype.getFloat64),
|
||||||
|
_12962: (x0,x1,x2) => x0[x1] = x2,
|
||||||
|
_12964: o => o === undefined,
|
||||||
|
_12965: o => typeof o === 'boolean',
|
||||||
|
_12966: o => typeof o === 'number',
|
||||||
|
_12968: o => typeof o === 'string',
|
||||||
|
_12971: o => o instanceof Int8Array,
|
||||||
|
_12972: o => o instanceof Uint8Array,
|
||||||
|
_12973: o => o instanceof Uint8ClampedArray,
|
||||||
|
_12974: o => o instanceof Int16Array,
|
||||||
|
_12975: o => o instanceof Uint16Array,
|
||||||
|
_12976: o => o instanceof Int32Array,
|
||||||
|
_12977: o => o instanceof Uint32Array,
|
||||||
|
_12978: o => o instanceof Float32Array,
|
||||||
|
_12979: o => o instanceof Float64Array,
|
||||||
|
_12980: o => o instanceof ArrayBuffer,
|
||||||
|
_12981: o => o instanceof DataView,
|
||||||
|
_12982: o => o instanceof Array,
|
||||||
|
_12983: o => typeof o === 'function' && o[jsWrappedDartFunctionSymbol] === true,
|
||||||
|
_12987: (l, r) => l === r,
|
||||||
|
_12988: o => o,
|
||||||
|
_12989: o => o,
|
||||||
|
_12990: o => o,
|
||||||
|
_12991: b => !!b,
|
||||||
|
_12992: o => o.length,
|
||||||
|
_12995: (o, i) => o[i],
|
||||||
|
_12996: f => f.dartFunction,
|
||||||
|
_12997: l => arrayFromDartList(Int8Array, l),
|
||||||
|
_12998: l => arrayFromDartList(Uint8Array, l),
|
||||||
|
_12999: l => arrayFromDartList(Uint8ClampedArray, l),
|
||||||
|
_13000: l => arrayFromDartList(Int16Array, l),
|
||||||
|
_13001: l => arrayFromDartList(Uint16Array, l),
|
||||||
|
_13002: l => arrayFromDartList(Int32Array, l),
|
||||||
|
_13003: l => arrayFromDartList(Uint32Array, l),
|
||||||
|
_13004: l => arrayFromDartList(Float32Array, l),
|
||||||
|
_13005: l => arrayFromDartList(Float64Array, l),
|
||||||
|
_13006: (data, length) => {
|
||||||
|
const view = new DataView(new ArrayBuffer(length));
|
||||||
|
for (let i = 0; i < length; i++) {
|
||||||
|
view.setUint8(i, dartInstance.exports.$byteDataGetUint8(data, i));
|
||||||
|
}
|
||||||
|
return view;
|
||||||
|
},
|
||||||
|
_13007: l => arrayFromDartList(Array, l),
|
||||||
|
_13008: stringFromDartString,
|
||||||
|
_13009: stringToDartString,
|
||||||
|
_13010: () => ({}),
|
||||||
|
_13012: l => new Array(l),
|
||||||
|
_13013: () => globalThis,
|
||||||
|
_13014: (constructor, args) => {
|
||||||
|
const factoryFunction = constructor.bind.apply(
|
||||||
|
constructor, [null, ...args]);
|
||||||
|
return new factoryFunction();
|
||||||
|
},
|
||||||
|
_13016: (o, p) => o[p],
|
||||||
|
_13018: (o, m, a) => o[m].apply(o, a),
|
||||||
|
_13020: o => String(o),
|
||||||
|
_13021: (p, s, f) => p.then(s, f),
|
||||||
|
_13040: (o, p) => o[p],
|
||||||
|
_13041: (o, p, v) => o[p] = v
|
||||||
|
};
|
||||||
|
|
||||||
|
const baseImports = {
|
||||||
|
dart2wasm: dart2wasm,
|
||||||
|
|
||||||
|
|
||||||
|
Math: Math,
|
||||||
|
Date: Date,
|
||||||
|
Object: Object,
|
||||||
|
Array: Array,
|
||||||
|
Reflect: Reflect,
|
||||||
|
};
|
||||||
|
|
||||||
|
const jsStringPolyfill = {
|
||||||
|
"charCodeAt": (s, i) => s.charCodeAt(i),
|
||||||
|
"compare": (s1, s2) => {
|
||||||
|
if (s1 < s2) return -1;
|
||||||
|
if (s1 > s2) return 1;
|
||||||
|
return 0;
|
||||||
|
},
|
||||||
|
"concat": (s1, s2) => s1 + s2,
|
||||||
|
"equals": (s1, s2) => s1 === s2,
|
||||||
|
"fromCharCode": (i) => String.fromCharCode(i),
|
||||||
|
"length": (s) => s.length,
|
||||||
|
"substring": (s, a, b) => s.substring(a, b),
|
||||||
|
};
|
||||||
|
|
||||||
|
dartInstance = await WebAssembly.instantiate(await modulePromise, {
|
||||||
|
...baseImports,
|
||||||
|
...(await importObjectPromise),
|
||||||
|
"wasm:js-string": jsStringPolyfill,
|
||||||
|
});
|
||||||
|
|
||||||
|
return dartInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Call the main function for the instantiated module
|
||||||
|
// `moduleInstance` is the instantiated dart2wasm module
|
||||||
|
// `args` are any arguments that should be passed into the main function.
|
||||||
|
export const invoke = (moduleInstance, ...args) => {
|
||||||
|
const dartMain = moduleInstance.exports.$getMain();
|
||||||
|
const dartArgs = buildArgsList(args);
|
||||||
|
moduleInstance.exports.$invokeMain(dartMain, dartArgs);
|
||||||
|
}
|
||||||
|
|
||||||
Binary file not shown.
Binary file not shown.
3
flutter_filament_federated/flutter_filament/example/web_app/.gitignore
vendored
Normal file
3
flutter_filament_federated/flutter_filament/example/web_app/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# https://dart.dev/guides/libraries/private-files
|
||||||
|
# Created by `dart pub`
|
||||||
|
.dart_tool/
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
## 1.0.0
|
||||||
|
|
||||||
|
- Initial version.
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
A sample command-line application with an entrypoint in `bin/`, library code
|
||||||
|
in `lib/`, and example unit test in `test/`.
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
# This file configures the static analysis results for your project (errors,
|
||||||
|
# warnings, and lints).
|
||||||
|
#
|
||||||
|
# This enables the 'recommended' set of lints from `package:lints`.
|
||||||
|
# This set helps identify many issues that may lead to problems when running
|
||||||
|
# or consuming Dart code, and enforces writing Dart using a single, idiomatic
|
||||||
|
# style and format.
|
||||||
|
#
|
||||||
|
# If you want a smaller set of lints you can change this to specify
|
||||||
|
# 'package:lints/core.yaml'. These are just the most critical lints
|
||||||
|
# (the recommended set includes the core lints).
|
||||||
|
# The core lints are also what is used by pub.dev for scoring packages.
|
||||||
|
|
||||||
|
include: package:lints/recommended.yaml
|
||||||
|
|
||||||
|
# Uncomment the following section to specify additional rules.
|
||||||
|
|
||||||
|
# linter:
|
||||||
|
# rules:
|
||||||
|
# - camel_case_types
|
||||||
|
|
||||||
|
# analyzer:
|
||||||
|
# exclude:
|
||||||
|
# - path/to/excluded/files/**
|
||||||
|
|
||||||
|
# For more information about the core and recommended set of lints, see
|
||||||
|
# https://dart.dev/go/core-lints
|
||||||
|
|
||||||
|
# For additional information about configuring this file, see
|
||||||
|
# https://dart.dev/guides/language/analysis-options
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
|
||||||
|
// import 'package:polyvox_engine/app/app.dart';
|
||||||
|
// import 'package:polyvox_engine/app/states/states.dart';
|
||||||
|
// import 'package:polyvox_engine/services/asr_service.dart';
|
||||||
|
// import 'package:polyvox_web/error_handler.dart';
|
||||||
|
// import 'package:polyvox_web/services/web_asr_service.dart';
|
||||||
|
// import 'package:polyvox_web/services/web_asset_repository.dart';
|
||||||
|
// import 'package:polyvox_web/services/web_audio_service.dart';
|
||||||
|
// import 'package:polyvox_web/services/web_auth_service.dart';
|
||||||
|
// import 'package:polyvox_web/services/web_data_provider.dart';
|
||||||
|
// import 'package:polyvox_web/services/web_purchase_service.dart';
|
||||||
|
// import 'package:polyvox_web/services/web_scoring_service.dart';
|
||||||
|
// import 'package:polyvox_web/web_canvas.dart';
|
||||||
|
import 'package:dart_filament/dart_filament/abstract_filament_viewer.dart';
|
||||||
|
import 'package:dart_filament/dart_filament/compatibility/web/compatibility.dart';
|
||||||
|
import 'package:dart_filament/dart_filament/filament_viewer_impl.dart';
|
||||||
|
import 'package:dart_filament/dart_filament/compatibility/web/interop/dart_filament_js_export_type.dart';
|
||||||
|
import 'package:dart_filament/dart_filament/compatibility/web/interop/dart_filament_js_extension_type.dart';
|
||||||
|
import 'package:web/web.dart';
|
||||||
|
|
||||||
|
void main(List<String> arguments) async {
|
||||||
|
var viewer = await WebViewer.initialize();
|
||||||
|
|
||||||
|
DartFilamentJSExportViewer.initializeBindings(viewer);
|
||||||
|
|
||||||
|
print("Set wrapper, running!");
|
||||||
|
|
||||||
|
while (true) {
|
||||||
|
await Future.delayed(Duration(milliseconds: 16));
|
||||||
|
}
|
||||||
|
print("Finisehd!");
|
||||||
|
}
|
||||||
|
|
||||||
|
class WebViewer {
|
||||||
|
static Future<AbstractFilamentViewer> initialize() async {
|
||||||
|
var fc = FooChar();
|
||||||
|
final canvas = document.getElementById("canvas") as HTMLCanvasElement;
|
||||||
|
canvas.width = window.innerWidth;
|
||||||
|
canvas.height = window.innerHeight;
|
||||||
|
|
||||||
|
var resourceLoader = flutter_filament_web_get_resource_loader_wrapper();
|
||||||
|
|
||||||
|
var viewer = FilamentViewer(resourceLoader: resourceLoader);
|
||||||
|
|
||||||
|
await viewer.initialized;
|
||||||
|
var width = window.innerWidth;
|
||||||
|
var height = window.innerHeight;
|
||||||
|
await viewer.createSwapChain(width.toDouble(), height.toDouble());
|
||||||
|
await viewer.updateViewportAndCameraProjection(
|
||||||
|
width.toDouble(), height.toDouble());
|
||||||
|
return viewer;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,359 @@
|
|||||||
|
let buildArgsList;
|
||||||
|
|
||||||
|
// `modulePromise` is a promise to the `WebAssembly.module` object to be
|
||||||
|
// instantiated.
|
||||||
|
// `importObjectPromise` is a promise to an object that contains any additional
|
||||||
|
// imports needed by the module that aren't provided by the standard runtime.
|
||||||
|
// The fields on this object will be merged into the importObject with which
|
||||||
|
// the module will be instantiated.
|
||||||
|
// This function returns a promise to the instantiated module.
|
||||||
|
export const instantiate = async (modulePromise, importObjectPromise) => {
|
||||||
|
let dartInstance;
|
||||||
|
|
||||||
|
function stringFromDartString(string) {
|
||||||
|
const totalLength = dartInstance.exports.$stringLength(string);
|
||||||
|
let result = '';
|
||||||
|
let index = 0;
|
||||||
|
while (index < totalLength) {
|
||||||
|
let chunkLength = Math.min(totalLength - index, 0xFFFF);
|
||||||
|
const array = new Array(chunkLength);
|
||||||
|
for (let i = 0; i < chunkLength; i++) {
|
||||||
|
array[i] = dartInstance.exports.$stringRead(string, index++);
|
||||||
|
}
|
||||||
|
result += String.fromCharCode(...array);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
function stringToDartString(string) {
|
||||||
|
const length = string.length;
|
||||||
|
let range = 0;
|
||||||
|
for (let i = 0; i < length; i++) {
|
||||||
|
range |= string.codePointAt(i);
|
||||||
|
}
|
||||||
|
if (range < 256) {
|
||||||
|
const dartString = dartInstance.exports.$stringAllocate1(length);
|
||||||
|
for (let i = 0; i < length; i++) {
|
||||||
|
dartInstance.exports.$stringWrite1(dartString, i, string.codePointAt(i));
|
||||||
|
}
|
||||||
|
return dartString;
|
||||||
|
} else {
|
||||||
|
const dartString = dartInstance.exports.$stringAllocate2(length);
|
||||||
|
for (let i = 0; i < length; i++) {
|
||||||
|
dartInstance.exports.$stringWrite2(dartString, i, string.charCodeAt(i));
|
||||||
|
}
|
||||||
|
return dartString;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Prints to the console
|
||||||
|
function printToConsole(value) {
|
||||||
|
if (typeof dartPrint == "function") {
|
||||||
|
dartPrint(value);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (typeof console == "object" && typeof console.log != "undefined") {
|
||||||
|
console.log(value);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (typeof print == "function") {
|
||||||
|
print(value);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
throw "Unable to print message: " + js;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Converts a Dart List to a JS array. Any Dart objects will be converted, but
|
||||||
|
// this will be cheap for JSValues.
|
||||||
|
function arrayFromDartList(constructor, list) {
|
||||||
|
const length = dartInstance.exports.$listLength(list);
|
||||||
|
const array = new constructor(length);
|
||||||
|
for (let i = 0; i < length; i++) {
|
||||||
|
array[i] = dartInstance.exports.$listRead(list, i);
|
||||||
|
}
|
||||||
|
return array;
|
||||||
|
}
|
||||||
|
|
||||||
|
buildArgsList = function(list) {
|
||||||
|
const dartList = dartInstance.exports.$makeStringList();
|
||||||
|
for (let i = 0; i < list.length; i++) {
|
||||||
|
dartInstance.exports.$listAdd(dartList, stringToDartString(list[i]));
|
||||||
|
}
|
||||||
|
return dartList;
|
||||||
|
}
|
||||||
|
|
||||||
|
// A special symbol attached to functions that wrap Dart functions.
|
||||||
|
const jsWrappedDartFunctionSymbol = Symbol("JSWrappedDartFunction");
|
||||||
|
|
||||||
|
function finalizeWrapper(dartFunction, wrapped) {
|
||||||
|
wrapped.dartFunction = dartFunction;
|
||||||
|
wrapped[jsWrappedDartFunctionSymbol] = true;
|
||||||
|
return wrapped;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Imports
|
||||||
|
const dart2wasm = {
|
||||||
|
|
||||||
|
_11: x0 => new Array(x0),
|
||||||
|
_12: x0 => new Promise(x0),
|
||||||
|
_17: (o,s,v) => o[s] = v,
|
||||||
|
_18: f => finalizeWrapper(f,x0 => dartInstance.exports._18(f,x0)),
|
||||||
|
_19: f => finalizeWrapper(f,x0 => dartInstance.exports._19(f,x0)),
|
||||||
|
_20: (x0,x1,x2) => x0.call(x1,x2),
|
||||||
|
_21: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._21(f,x0,x1)),
|
||||||
|
_22: (x0,x1) => x0.call(x1),
|
||||||
|
_23: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._23(f,x0,x1)),
|
||||||
|
_44: () => Symbol("jsBoxedDartObjectProperty"),
|
||||||
|
_75: (x0,x1) => x0.getElementById(x1),
|
||||||
|
_1495: (x0,x1) => x0.width = x1,
|
||||||
|
_1497: (x0,x1) => x0.height = x1,
|
||||||
|
_1874: () => globalThis.window,
|
||||||
|
_1916: x0 => x0.innerWidth,
|
||||||
|
_1917: x0 => x0.innerHeight,
|
||||||
|
_6850: () => globalThis.document,
|
||||||
|
_12719: () => globalThis.createVoidCallback(),
|
||||||
|
_12720: () => globalThis.createVoidPointerCallback(),
|
||||||
|
_12721: () => globalThis.createBoolCallback(),
|
||||||
|
_12722: () => globalThis.createBoolCallback(),
|
||||||
|
_12724: v => stringToDartString(v.toString()),
|
||||||
|
_12740: () => {
|
||||||
|
let stackString = new Error().stack.toString();
|
||||||
|
let frames = stackString.split('\n');
|
||||||
|
let drop = 2;
|
||||||
|
if (frames[0] === 'Error') {
|
||||||
|
drop += 1;
|
||||||
|
}
|
||||||
|
return frames.slice(drop).join('\n');
|
||||||
|
},
|
||||||
|
_12759: s => stringToDartString(JSON.stringify(stringFromDartString(s))),
|
||||||
|
_12760: s => printToConsole(stringFromDartString(s)),
|
||||||
|
_12761: f => finalizeWrapper(f,() => dartInstance.exports._12761(f)),
|
||||||
|
_12762: f => finalizeWrapper(f,() => dartInstance.exports._12762(f)),
|
||||||
|
_12763: f => finalizeWrapper(f,x0 => dartInstance.exports._12763(f,x0)),
|
||||||
|
_12764: f => finalizeWrapper(f,() => dartInstance.exports._12764(f)),
|
||||||
|
_12765: f => finalizeWrapper(f,x0 => dartInstance.exports._12765(f,x0)),
|
||||||
|
_12766: f => finalizeWrapper(f,() => dartInstance.exports._12766(f)),
|
||||||
|
_12767: f => finalizeWrapper(f,x0 => dartInstance.exports._12767(f,x0)),
|
||||||
|
_12768: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12768(f,x0,x1)),
|
||||||
|
_12769: f => finalizeWrapper(f,() => dartInstance.exports._12769(f)),
|
||||||
|
_12770: f => finalizeWrapper(f,(x0,x1,x2,x3) => dartInstance.exports._12770(f,x0,x1,x2,x3)),
|
||||||
|
_12771: f => finalizeWrapper(f,x0 => dartInstance.exports._12771(f,x0)),
|
||||||
|
_12772: f => finalizeWrapper(f,() => dartInstance.exports._12772(f)),
|
||||||
|
_12773: f => finalizeWrapper(f,x0 => dartInstance.exports._12773(f,x0)),
|
||||||
|
_12774: f => finalizeWrapper(f,x0 => dartInstance.exports._12774(f,x0)),
|
||||||
|
_12775: f => finalizeWrapper(f,() => dartInstance.exports._12775(f)),
|
||||||
|
_12776: f => finalizeWrapper(f,(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9) => dartInstance.exports._12776(f,x0,x1,x2,x3,x4,x5,x6,x7,x8,x9)),
|
||||||
|
_12777: f => finalizeWrapper(f,x0 => dartInstance.exports._12777(f,x0)),
|
||||||
|
_12778: f => finalizeWrapper(f,() => dartInstance.exports._12778(f)),
|
||||||
|
_12779: f => finalizeWrapper(f,x0 => dartInstance.exports._12779(f,x0)),
|
||||||
|
_12780: f => finalizeWrapper(f,x0 => dartInstance.exports._12780(f,x0)),
|
||||||
|
_12781: f => finalizeWrapper(f,x0 => dartInstance.exports._12781(f,x0)),
|
||||||
|
_12782: f => finalizeWrapper(f,x0 => dartInstance.exports._12782(f,x0)),
|
||||||
|
_12783: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12783(f,x0,x1)),
|
||||||
|
_12784: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12784(f,x0,x1)),
|
||||||
|
_12785: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12785(f,x0,x1)),
|
||||||
|
_12786: f => finalizeWrapper(f,() => dartInstance.exports._12786(f)),
|
||||||
|
_12787: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12787(f,x0,x1)),
|
||||||
|
_12788: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12788(f,x0,x1)),
|
||||||
|
_12789: f => finalizeWrapper(f,() => dartInstance.exports._12789(f)),
|
||||||
|
_12790: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12790(f,x0,x1)),
|
||||||
|
_12791: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12791(f,x0,x1)),
|
||||||
|
_12792: f => finalizeWrapper(f,x0 => dartInstance.exports._12792(f,x0)),
|
||||||
|
_12793: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12793(f,x0,x1)),
|
||||||
|
_12794: f => finalizeWrapper(f,(x0,x1,x2,x3) => dartInstance.exports._12794(f,x0,x1,x2,x3)),
|
||||||
|
_12795: f => finalizeWrapper(f,x0 => dartInstance.exports._12795(f,x0)),
|
||||||
|
_12796: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12796(f,x0,x1)),
|
||||||
|
_12797: f => finalizeWrapper(f,x0 => dartInstance.exports._12797(f,x0)),
|
||||||
|
_12798: f => finalizeWrapper(f,() => dartInstance.exports._12798(f)),
|
||||||
|
_12799: f => finalizeWrapper(f,() => dartInstance.exports._12799(f)),
|
||||||
|
_12800: f => finalizeWrapper(f,(x0,x1,x2) => dartInstance.exports._12800(f,x0,x1,x2)),
|
||||||
|
_12801: f => finalizeWrapper(f,() => dartInstance.exports._12801(f)),
|
||||||
|
_12802: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12802(f,x0,x1)),
|
||||||
|
_12803: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12803(f,x0,x1)),
|
||||||
|
_12804: f => finalizeWrapper(f,(x0,x1,x2) => dartInstance.exports._12804(f,x0,x1,x2)),
|
||||||
|
_12805: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12805(f,x0,x1)),
|
||||||
|
_12806: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12806(f,x0,x1)),
|
||||||
|
_12807: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12807(f,x0,x1)),
|
||||||
|
_12808: f => finalizeWrapper(f,() => dartInstance.exports._12808(f)),
|
||||||
|
_12809: f => finalizeWrapper(f,() => dartInstance.exports._12809(f)),
|
||||||
|
_12810: f => finalizeWrapper(f,(x0,x1,x2) => dartInstance.exports._12810(f,x0,x1,x2)),
|
||||||
|
_12811: f => finalizeWrapper(f,x0 => dartInstance.exports._12811(f,x0)),
|
||||||
|
_12812: f => finalizeWrapper(f,x0 => dartInstance.exports._12812(f,x0)),
|
||||||
|
_12813: f => finalizeWrapper(f,x0 => dartInstance.exports._12813(f,x0)),
|
||||||
|
_12814: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12814(f,x0,x1)),
|
||||||
|
_12815: f => finalizeWrapper(f,() => dartInstance.exports._12815(f)),
|
||||||
|
_12816: f => finalizeWrapper(f,() => dartInstance.exports._12816(f)),
|
||||||
|
_12817: f => finalizeWrapper(f,x0 => dartInstance.exports._12817(f,x0)),
|
||||||
|
_12818: f => finalizeWrapper(f,() => dartInstance.exports._12818(f)),
|
||||||
|
_12819: f => finalizeWrapper(f,() => dartInstance.exports._12819(f)),
|
||||||
|
_12820: f => finalizeWrapper(f,() => dartInstance.exports._12820(f)),
|
||||||
|
_12821: f => finalizeWrapper(f,() => dartInstance.exports._12821(f)),
|
||||||
|
_12822: f => finalizeWrapper(f,() => dartInstance.exports._12822(f)),
|
||||||
|
_12823: f => finalizeWrapper(f,() => dartInstance.exports._12823(f)),
|
||||||
|
_12824: f => finalizeWrapper(f,(x0,x1,x2) => dartInstance.exports._12824(f,x0,x1,x2)),
|
||||||
|
_12825: f => finalizeWrapper(f,() => dartInstance.exports._12825(f)),
|
||||||
|
_12826: f => finalizeWrapper(f,x0 => dartInstance.exports._12826(f,x0)),
|
||||||
|
_12827: f => finalizeWrapper(f,x0 => dartInstance.exports._12827(f,x0)),
|
||||||
|
_12828: f => finalizeWrapper(f,(x0,x1,x2) => dartInstance.exports._12828(f,x0,x1,x2)),
|
||||||
|
_12829: f => finalizeWrapper(f,x0 => dartInstance.exports._12829(f,x0)),
|
||||||
|
_12830: f => finalizeWrapper(f,x0 => dartInstance.exports._12830(f,x0)),
|
||||||
|
_12831: f => finalizeWrapper(f,(x0,x1,x2,x3,x4,x5,x6) => dartInstance.exports._12831(f,x0,x1,x2,x3,x4,x5,x6)),
|
||||||
|
_12832: f => finalizeWrapper(f,x0 => dartInstance.exports._12832(f,x0)),
|
||||||
|
_12833: f => finalizeWrapper(f,(x0,x1,x2,x3) => dartInstance.exports._12833(f,x0,x1,x2,x3)),
|
||||||
|
_12834: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12834(f,x0,x1)),
|
||||||
|
_12835: f => finalizeWrapper(f,(x0,x1,x2,x3,x4) => dartInstance.exports._12835(f,x0,x1,x2,x3,x4)),
|
||||||
|
_12836: f => finalizeWrapper(f,(x0,x1,x2,x3,x4) => dartInstance.exports._12836(f,x0,x1,x2,x3,x4)),
|
||||||
|
_12837: f => finalizeWrapper(f,(x0,x1,x2,x3,x4,x5) => dartInstance.exports._12837(f,x0,x1,x2,x3,x4,x5)),
|
||||||
|
_12838: f => finalizeWrapper(f,(x0,x1,x2) => dartInstance.exports._12838(f,x0,x1,x2)),
|
||||||
|
_12839: f => finalizeWrapper(f,x0 => dartInstance.exports._12839(f,x0)),
|
||||||
|
_12840: f => finalizeWrapper(f,(x0,x1,x2) => dartInstance.exports._12840(f,x0,x1,x2)),
|
||||||
|
_12841: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12841(f,x0,x1)),
|
||||||
|
_12842: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12842(f,x0,x1)),
|
||||||
|
_12843: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12843(f,x0,x1)),
|
||||||
|
_12844: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12844(f,x0,x1)),
|
||||||
|
_12845: f => finalizeWrapper(f,x0 => dartInstance.exports._12845(f,x0)),
|
||||||
|
_12846: f => finalizeWrapper(f,() => dartInstance.exports._12846(f)),
|
||||||
|
_12847: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12847(f,x0,x1)),
|
||||||
|
_12848: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12848(f,x0,x1)),
|
||||||
|
_12849: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12849(f,x0,x1)),
|
||||||
|
_12850: f => finalizeWrapper(f,x0 => dartInstance.exports._12850(f,x0)),
|
||||||
|
_12851: f => finalizeWrapper(f,x0 => dartInstance.exports._12851(f,x0)),
|
||||||
|
_12852: f => finalizeWrapper(f,x0 => dartInstance.exports._12852(f,x0)),
|
||||||
|
_12853: f => finalizeWrapper(f,x0 => dartInstance.exports._12853(f,x0)),
|
||||||
|
_12854: f => finalizeWrapper(f,() => dartInstance.exports._12854(f)),
|
||||||
|
_12868: (ms, c) =>
|
||||||
|
setTimeout(() => dartInstance.exports.$invokeCallback(c),ms),
|
||||||
|
_12872: (c) =>
|
||||||
|
queueMicrotask(() => dartInstance.exports.$invokeCallback(c)),
|
||||||
|
_12874: (a, i) => a.push(i),
|
||||||
|
_12885: a => a.length,
|
||||||
|
_12887: (a, i) => a[i],
|
||||||
|
_12888: (a, i, v) => a[i] = v,
|
||||||
|
_12890: a => a.join(''),
|
||||||
|
_12900: (s, p, i) => s.indexOf(p, i),
|
||||||
|
_12903: (o, start, length) => new Uint8Array(o.buffer, o.byteOffset + start, length),
|
||||||
|
_12904: (o, start, length) => new Int8Array(o.buffer, o.byteOffset + start, length),
|
||||||
|
_12905: (o, start, length) => new Uint8ClampedArray(o.buffer, o.byteOffset + start, length),
|
||||||
|
_12906: (o, start, length) => new Uint16Array(o.buffer, o.byteOffset + start, length),
|
||||||
|
_12907: (o, start, length) => new Int16Array(o.buffer, o.byteOffset + start, length),
|
||||||
|
_12908: (o, start, length) => new Uint32Array(o.buffer, o.byteOffset + start, length),
|
||||||
|
_12909: (o, start, length) => new Int32Array(o.buffer, o.byteOffset + start, length),
|
||||||
|
_12912: (o, start, length) => new Float32Array(o.buffer, o.byteOffset + start, length),
|
||||||
|
_12913: (o, start, length) => new Float64Array(o.buffer, o.byteOffset + start, length),
|
||||||
|
_12918: (o) => new DataView(o.buffer, o.byteOffset, o.byteLength),
|
||||||
|
_12922: Function.prototype.call.bind(Object.getOwnPropertyDescriptor(DataView.prototype, 'byteLength').get),
|
||||||
|
_12923: (b, o) => new DataView(b, o),
|
||||||
|
_12925: Function.prototype.call.bind(DataView.prototype.getUint8),
|
||||||
|
_12927: Function.prototype.call.bind(DataView.prototype.getInt8),
|
||||||
|
_12929: Function.prototype.call.bind(DataView.prototype.getUint16),
|
||||||
|
_12931: Function.prototype.call.bind(DataView.prototype.getInt16),
|
||||||
|
_12933: Function.prototype.call.bind(DataView.prototype.getUint32),
|
||||||
|
_12935: Function.prototype.call.bind(DataView.prototype.getInt32),
|
||||||
|
_12941: Function.prototype.call.bind(DataView.prototype.getFloat32),
|
||||||
|
_12942: Function.prototype.call.bind(DataView.prototype.setFloat32),
|
||||||
|
_12943: Function.prototype.call.bind(DataView.prototype.getFloat64),
|
||||||
|
_12962: (x0,x1,x2) => x0[x1] = x2,
|
||||||
|
_12964: o => o === undefined,
|
||||||
|
_12965: o => typeof o === 'boolean',
|
||||||
|
_12966: o => typeof o === 'number',
|
||||||
|
_12968: o => typeof o === 'string',
|
||||||
|
_12971: o => o instanceof Int8Array,
|
||||||
|
_12972: o => o instanceof Uint8Array,
|
||||||
|
_12973: o => o instanceof Uint8ClampedArray,
|
||||||
|
_12974: o => o instanceof Int16Array,
|
||||||
|
_12975: o => o instanceof Uint16Array,
|
||||||
|
_12976: o => o instanceof Int32Array,
|
||||||
|
_12977: o => o instanceof Uint32Array,
|
||||||
|
_12978: o => o instanceof Float32Array,
|
||||||
|
_12979: o => o instanceof Float64Array,
|
||||||
|
_12980: o => o instanceof ArrayBuffer,
|
||||||
|
_12981: o => o instanceof DataView,
|
||||||
|
_12982: o => o instanceof Array,
|
||||||
|
_12983: o => typeof o === 'function' && o[jsWrappedDartFunctionSymbol] === true,
|
||||||
|
_12987: (l, r) => l === r,
|
||||||
|
_12988: o => o,
|
||||||
|
_12989: o => o,
|
||||||
|
_12990: o => o,
|
||||||
|
_12991: b => !!b,
|
||||||
|
_12992: o => o.length,
|
||||||
|
_12995: (o, i) => o[i],
|
||||||
|
_12996: f => f.dartFunction,
|
||||||
|
_12997: l => arrayFromDartList(Int8Array, l),
|
||||||
|
_12998: l => arrayFromDartList(Uint8Array, l),
|
||||||
|
_12999: l => arrayFromDartList(Uint8ClampedArray, l),
|
||||||
|
_13000: l => arrayFromDartList(Int16Array, l),
|
||||||
|
_13001: l => arrayFromDartList(Uint16Array, l),
|
||||||
|
_13002: l => arrayFromDartList(Int32Array, l),
|
||||||
|
_13003: l => arrayFromDartList(Uint32Array, l),
|
||||||
|
_13004: l => arrayFromDartList(Float32Array, l),
|
||||||
|
_13005: l => arrayFromDartList(Float64Array, l),
|
||||||
|
_13006: (data, length) => {
|
||||||
|
const view = new DataView(new ArrayBuffer(length));
|
||||||
|
for (let i = 0; i < length; i++) {
|
||||||
|
view.setUint8(i, dartInstance.exports.$byteDataGetUint8(data, i));
|
||||||
|
}
|
||||||
|
return view;
|
||||||
|
},
|
||||||
|
_13007: l => arrayFromDartList(Array, l),
|
||||||
|
_13008: stringFromDartString,
|
||||||
|
_13009: stringToDartString,
|
||||||
|
_13010: () => ({}),
|
||||||
|
_13012: l => new Array(l),
|
||||||
|
_13013: () => globalThis,
|
||||||
|
_13014: (constructor, args) => {
|
||||||
|
const factoryFunction = constructor.bind.apply(
|
||||||
|
constructor, [null, ...args]);
|
||||||
|
return new factoryFunction();
|
||||||
|
},
|
||||||
|
_13016: (o, p) => o[p],
|
||||||
|
_13018: (o, m, a) => o[m].apply(o, a),
|
||||||
|
_13020: o => String(o),
|
||||||
|
_13021: (p, s, f) => p.then(s, f),
|
||||||
|
_13040: (o, p) => o[p],
|
||||||
|
_13041: (o, p, v) => o[p] = v
|
||||||
|
};
|
||||||
|
|
||||||
|
const baseImports = {
|
||||||
|
dart2wasm: dart2wasm,
|
||||||
|
|
||||||
|
|
||||||
|
Math: Math,
|
||||||
|
Date: Date,
|
||||||
|
Object: Object,
|
||||||
|
Array: Array,
|
||||||
|
Reflect: Reflect,
|
||||||
|
};
|
||||||
|
|
||||||
|
const jsStringPolyfill = {
|
||||||
|
"charCodeAt": (s, i) => s.charCodeAt(i),
|
||||||
|
"compare": (s1, s2) => {
|
||||||
|
if (s1 < s2) return -1;
|
||||||
|
if (s1 > s2) return 1;
|
||||||
|
return 0;
|
||||||
|
},
|
||||||
|
"concat": (s1, s2) => s1 + s2,
|
||||||
|
"equals": (s1, s2) => s1 === s2,
|
||||||
|
"fromCharCode": (i) => String.fromCharCode(i),
|
||||||
|
"length": (s) => s.length,
|
||||||
|
"substring": (s, a, b) => s.substring(a, b),
|
||||||
|
};
|
||||||
|
|
||||||
|
dartInstance = await WebAssembly.instantiate(await modulePromise, {
|
||||||
|
...baseImports,
|
||||||
|
...(await importObjectPromise),
|
||||||
|
"wasm:js-string": jsStringPolyfill,
|
||||||
|
});
|
||||||
|
|
||||||
|
return dartInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Call the main function for the instantiated module
|
||||||
|
// `moduleInstance` is the instantiated dart2wasm module
|
||||||
|
// `args` are any arguments that should be passed into the main function.
|
||||||
|
export const invoke = (moduleInstance, ...args) => {
|
||||||
|
const dartMain = moduleInstance.exports.$getMain();
|
||||||
|
const dartArgs = buildArgsList(args);
|
||||||
|
moduleInstance.exports.$invokeMain(dartMain, dartArgs);
|
||||||
|
}
|
||||||
|
|
||||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,329 @@
|
|||||||
|
// @JS()
|
||||||
|
// library flutter_filament_js;
|
||||||
|
// import 'dart:js_interop';
|
||||||
|
|
||||||
|
// import 'package:dart_filament/dart_filament/entities/filament_entity.dart';
|
||||||
|
// extension type DartFilamentJSShim(JSObject _) implements JSObject {
|
||||||
|
|
||||||
|
// @JS('initialized')
|
||||||
|
// external JSPromise<JSBoolean> get initialized;
|
||||||
|
|
||||||
|
// @JS('rendering')
|
||||||
|
// external bool get rendering;
|
||||||
|
|
||||||
|
// @JS('setRendering')
|
||||||
|
// external JSPromise setRendering(bool render);
|
||||||
|
|
||||||
|
// @JS('render')
|
||||||
|
// external JSPromise render();
|
||||||
|
|
||||||
|
// @JS('setFrameRate')
|
||||||
|
// external JSPromise setFrameRate(int framerate);
|
||||||
|
|
||||||
|
// @JS('dispose')
|
||||||
|
// external JSPromise dispose();
|
||||||
|
|
||||||
|
// @JS('setBackgroundImage')
|
||||||
|
// external JSPromise setBackgroundImage(String path, bool fillHeight);
|
||||||
|
|
||||||
|
// @JS('setBackgroundImagePosition')
|
||||||
|
// external JSPromise setBackgroundImagePosition(double x, double y,
|
||||||
|
// bool clamp);
|
||||||
|
|
||||||
|
// @JS('clearBackgroundImage')
|
||||||
|
// external JSPromise clearBackgroundImage();
|
||||||
|
|
||||||
|
// @JS('setBackgroundColor')
|
||||||
|
// external JSPromise setBackgroundColor(
|
||||||
|
// double r, double g, double b, double alpha);
|
||||||
|
|
||||||
|
// @JS('loadSkybox')
|
||||||
|
// external JSPromise loadSkybox(String skyboxPath);
|
||||||
|
|
||||||
|
// @JS('removeSkybox')
|
||||||
|
// external JSPromise removeSkybox();
|
||||||
|
|
||||||
|
// @JS('loadIbl')
|
||||||
|
// external JSPromise loadIbl(String lightingPath, double intensity);
|
||||||
|
|
||||||
|
// @JS('rotateIbl')
|
||||||
|
// external JSPromise rotateIbl(JSArray<JSNumber> rotationMatrix);
|
||||||
|
|
||||||
|
// @JS('removeIbl')
|
||||||
|
// external JSPromise removeIbl();
|
||||||
|
|
||||||
|
// @JS('addLight')
|
||||||
|
// external JSPromise<JSNumber> addLight(
|
||||||
|
// int type,
|
||||||
|
// double colour,
|
||||||
|
// double intensity,
|
||||||
|
// double posX,
|
||||||
|
// double posY,
|
||||||
|
// double posZ,
|
||||||
|
// double dirX,
|
||||||
|
// double dirY,
|
||||||
|
// double dirZ,
|
||||||
|
// bool castShadows,
|
||||||
|
// );
|
||||||
|
|
||||||
|
// @JS('removeLight')
|
||||||
|
// external JSPromise removeLight(FilamentEntity light);
|
||||||
|
|
||||||
|
// @JS('clearLights')
|
||||||
|
// external JSPromise clearLights();
|
||||||
|
|
||||||
|
// @JS('loadGlb')
|
||||||
|
// external JSPromise<JSNumber> loadGlb(String path, int numInstances);
|
||||||
|
|
||||||
|
// @JS('createInstance')
|
||||||
|
// external JSPromise<JSNumber> createInstance(FilamentEntity entity);
|
||||||
|
|
||||||
|
// @JS('getInstanceCount')
|
||||||
|
// external JSPromise<JSNumber> getInstanceCount(FilamentEntity entity);
|
||||||
|
|
||||||
|
// @JS('getInstances')
|
||||||
|
// external JSPromise<JSArray<JSNumber>> getInstances(FilamentEntity entity);
|
||||||
|
|
||||||
|
// @JS('loadGltf')
|
||||||
|
// external JSPromise<JSNumber> loadGltf(
|
||||||
|
// String path,
|
||||||
|
// String relativeResourcePath
|
||||||
|
// );
|
||||||
|
|
||||||
|
// @JS('panStart')
|
||||||
|
// external JSPromise panStart(double x, double y);
|
||||||
|
|
||||||
|
// @JS('panUpdate')
|
||||||
|
// external JSPromise panUpdate(double x, double y);
|
||||||
|
|
||||||
|
// @JS('panEnd')
|
||||||
|
// external JSPromise panEnd();
|
||||||
|
|
||||||
|
// @JS('rotateStart')
|
||||||
|
// external JSPromise rotateStart(double x, double y);
|
||||||
|
|
||||||
|
// @JS('rotateUpdate')
|
||||||
|
// external JSPromise rotateUpdate(double x, double y);
|
||||||
|
|
||||||
|
// @JS('rotateEnd')
|
||||||
|
// external JSPromise rotateEnd();
|
||||||
|
|
||||||
|
// @JS('setMorphTargetWeights')
|
||||||
|
// external JSPromise setMorphTargetWeights(
|
||||||
|
// FilamentEntity entity, JSArray<JSNumber> weights);
|
||||||
|
|
||||||
|
// @JS('getMorphTargetNames')
|
||||||
|
// external JSPromise<JSArray<JSString>> getMorphTargetNames(
|
||||||
|
// FilamentEntity entity, String meshName);
|
||||||
|
|
||||||
|
// @JS('getAnimationNames')
|
||||||
|
// external JSPromise<JSArray<JSString>> getAnimationNames(FilamentEntity entity);
|
||||||
|
|
||||||
|
// @JS('getAnimationDuration')
|
||||||
|
// external JSPromise<JSNumber> getAnimationDuration(
|
||||||
|
// FilamentEntity entity, int animationIndex);
|
||||||
|
|
||||||
|
// @JS('setMorphAnimationData')
|
||||||
|
// external JSPromise setMorphAnimationData(
|
||||||
|
// FilamentEntity entity,
|
||||||
|
// JSArray<JSArray<JSNumber>> animation,
|
||||||
|
// JSArray<JSString> morphTargets,
|
||||||
|
// JSArray<JSString>? targetMeshNames,
|
||||||
|
// );
|
||||||
|
|
||||||
|
// @JS('resetBones')
|
||||||
|
// external JSPromise resetBones(FilamentEntity entity);
|
||||||
|
|
||||||
|
// @JS('addBoneAnimation')
|
||||||
|
// external JSPromise addBoneAnimation(FilamentEntity entity, JSObject animation);
|
||||||
|
|
||||||
|
// @JS('removeEntity')
|
||||||
|
// external JSPromise removeEntity(FilamentEntity entity);
|
||||||
|
|
||||||
|
// @JS('clearEntities')
|
||||||
|
// external JSPromise clearEntities();
|
||||||
|
|
||||||
|
// @JS('zoomBegin')
|
||||||
|
// external JSPromise zoomBegin();
|
||||||
|
|
||||||
|
// @JS('zoomUpdate')
|
||||||
|
// external JSPromise zoomUpdate(double x, double y, double z);
|
||||||
|
|
||||||
|
// @JS('zoomEnd')
|
||||||
|
// external JSPromise zoomEnd();
|
||||||
|
|
||||||
|
// @JS('playAnimation')
|
||||||
|
// external JSPromise playAnimation(
|
||||||
|
// FilamentEntity entity,
|
||||||
|
// int index,
|
||||||
|
// bool loop,
|
||||||
|
// bool reverse,
|
||||||
|
// bool replaceActive,
|
||||||
|
// double crossfade,
|
||||||
|
// );
|
||||||
|
|
||||||
|
// @JS('playAnimationByName')
|
||||||
|
// external JSPromise playAnimationByName(
|
||||||
|
// FilamentEntity entity,
|
||||||
|
// String name,
|
||||||
|
// bool loop,
|
||||||
|
// bool reverse,
|
||||||
|
// bool replaceActive,
|
||||||
|
// double crossfade,
|
||||||
|
// );
|
||||||
|
|
||||||
|
// @JS('setAnimationFrame')
|
||||||
|
// external JSPromise setAnimationFrame(
|
||||||
|
// FilamentEntity entity, int index, int animationFrame);
|
||||||
|
|
||||||
|
// @JS('stopAnimation')
|
||||||
|
// external JSPromise stopAnimation(FilamentEntity entity, int animationIndex);
|
||||||
|
|
||||||
|
// @JS('stopAnimationByName')
|
||||||
|
// external JSPromise stopAnimationByName(FilamentEntity entity, String name);
|
||||||
|
|
||||||
|
// @JS('setCamera')
|
||||||
|
// external JSPromise setCamera(FilamentEntity entity, String? name);
|
||||||
|
|
||||||
|
// @JS('setMainCamera')
|
||||||
|
// external JSPromise setMainCamera();
|
||||||
|
|
||||||
|
// @JS('getMainCamera')
|
||||||
|
// external JSPromise<JSNumber> getMainCamera();
|
||||||
|
|
||||||
|
// @JS('setCameraFov')
|
||||||
|
// external JSPromise setCameraFov(double degrees, double width, double height);
|
||||||
|
|
||||||
|
// @JS('setToneMapping')
|
||||||
|
// external JSPromise setToneMapping(int mapper);
|
||||||
|
|
||||||
|
// @JS('setBloom')
|
||||||
|
// external JSPromise setBloom(double bloom);
|
||||||
|
|
||||||
|
// @JS('setCameraFocalLength')
|
||||||
|
// external JSPromise setCameraFocalLength(double focalLength);
|
||||||
|
|
||||||
|
// @JS('setCameraCulling')
|
||||||
|
// external JSPromise setCameraCulling(double near, double far);
|
||||||
|
|
||||||
|
// @JS('getCameraCullingNear')
|
||||||
|
// external JSPromise<JSNumber> getCameraCullingNear();
|
||||||
|
|
||||||
|
// @JS('getCameraCullingFar')
|
||||||
|
// external JSPromise<JSNumber> getCameraCullingFar();
|
||||||
|
|
||||||
|
// @JS('setCameraFocusDistance')
|
||||||
|
// external JSPromise setCameraFocusDistance(double focusDistance);
|
||||||
|
|
||||||
|
// @JS('getCameraPosition')
|
||||||
|
// external JSPromise<JSArray<JSNumber>> getCameraPosition();
|
||||||
|
|
||||||
|
// @JS('getCameraModelMatrix')
|
||||||
|
// external JSPromise<JSArray<JSNumber>> getCameraModelMatrix();
|
||||||
|
|
||||||
|
// @JS('getCameraViewMatrix')
|
||||||
|
// external JSPromise<JSArray<JSNumber>> getCameraViewMatrix();
|
||||||
|
|
||||||
|
// @JS('getCameraProjectionMatrix')
|
||||||
|
// external JSPromise<JSArray<JSNumber>> getCameraProjectionMatrix();
|
||||||
|
|
||||||
|
// @JS('getCameraCullingProjectionMatrix')
|
||||||
|
// external JSPromise<JSArray<JSNumber>> getCameraCullingProjectionMatrix();
|
||||||
|
|
||||||
|
// @JS('getCameraFrustum')
|
||||||
|
// external JSPromise<JSObject> getCameraFrustum();
|
||||||
|
|
||||||
|
// @JS('setCameraPosition')
|
||||||
|
// external JSPromise setCameraPosition(double x, double y, double z);
|
||||||
|
// @JS('getCameraRotation')
|
||||||
|
// external JSPromise<JSArray<JSNumber>> getCameraRotation();
|
||||||
|
// @JS('moveCameraToAsset')
|
||||||
|
// external JSPromise moveCameraToAsset(FilamentEntity entity);
|
||||||
|
// @JS('setViewFrustumCulling')
|
||||||
|
// external JSPromise setViewFrustumCulling(JSBoolean enabled);
|
||||||
|
// @JS('setCameraExposure')
|
||||||
|
// external JSPromise setCameraExposure(
|
||||||
|
// double aperture, double shutterSpeed, double sensitivity);
|
||||||
|
// @JS('setCameraRotation')
|
||||||
|
// external JSPromise setCameraRotation(JSArray<JSNumber> quaternion);
|
||||||
|
// @JS('setCameraModelMatrix')
|
||||||
|
// external JSPromise setCameraModelMatrix(JSArray<JSNumber> matrix);
|
||||||
|
// @JS('setMaterialColor')
|
||||||
|
// external JSPromise setMaterialColor(FilamentEntity entity, String meshName,
|
||||||
|
// int materialIndex, double r, double g, double b, double a);
|
||||||
|
// @JS('transformToUnitCube')
|
||||||
|
// external JSPromise transformToUnitCube(FilamentEntity entity);
|
||||||
|
// @JS('setPosition')
|
||||||
|
// external JSPromise setPosition(FilamentEntity entity, double x, double y, double z);
|
||||||
|
// @JS('setScale')
|
||||||
|
// external JSPromise setScale(FilamentEntity entity, double scale);
|
||||||
|
// @JS('setRotation')
|
||||||
|
// external JSPromise setRotation(
|
||||||
|
// FilamentEntity entity, double rads, double x, double y, double z);
|
||||||
|
// @JS('queuePositionUpdate')
|
||||||
|
// external JSPromise queuePositionUpdate(
|
||||||
|
// FilamentEntity entity, double x, double y, double z,
|
||||||
|
// bool relative);
|
||||||
|
// @JS('queueRotationUpdate')
|
||||||
|
// external JSPromise queueRotationUpdate(
|
||||||
|
// FilamentEntity entity, double rads, double x, double y, double z,
|
||||||
|
// bool relative);
|
||||||
|
// @JS('queueRotationUpdateQuat')
|
||||||
|
// external JSPromise queueRotationUpdateQuat(
|
||||||
|
// FilamentEntity entity, JSArray<JSNumber> quat,
|
||||||
|
// bool relative);
|
||||||
|
// @JS('setPostProcessing')
|
||||||
|
// external JSPromise setPostProcessing(JSBoolean enabled);
|
||||||
|
// @JS('setAntiAliasing')
|
||||||
|
// external JSPromise setAntiAliasing(
|
||||||
|
// JSBoolean msaa, JSBoolean fxaa, JSBoolean taa);
|
||||||
|
// @JS('setRotationQuat')
|
||||||
|
// external JSPromise setRotationQuat(
|
||||||
|
// FilamentEntity entity, JSArray<JSNumber> rotation);
|
||||||
|
// @JS('reveal')
|
||||||
|
// external JSPromise reveal(FilamentEntity entity, String? meshName);
|
||||||
|
// @JS('hide')
|
||||||
|
// external JSPromise hide(FilamentEntity entity, String? meshName);
|
||||||
|
// @JS('pick')
|
||||||
|
// external void pick(int x, int y);
|
||||||
|
// @JS('getNameForEntity')
|
||||||
|
// external String? getNameForEntity(FilamentEntity entity);
|
||||||
|
// @JS('setCameraManipulatorOptions')
|
||||||
|
// external JSPromise setCameraManipulatorOptions(
|
||||||
|
// int mode,
|
||||||
|
// double orbitSpeedX ,
|
||||||
|
// double orbitSpeedY ,
|
||||||
|
// double zoomSpeed ,
|
||||||
|
// );
|
||||||
|
// @JS('getChildEntities')
|
||||||
|
// external JSPromise<JSArray<JSNumber>> getChildEntities(
|
||||||
|
// FilamentEntity parent, bool renderableOnly);
|
||||||
|
// @JS('getChildEntity')
|
||||||
|
// external JSPromise<JSNumber> getChildEntity(
|
||||||
|
// FilamentEntity parent, String childName);
|
||||||
|
// @JS('getChildEntityNames')
|
||||||
|
// external JSPromise<JSArray<JSString>> getChildEntityNames(
|
||||||
|
// FilamentEntity entity,
|
||||||
|
// );
|
||||||
|
// @JS('setRecording')
|
||||||
|
// external JSPromise setRecording(JSBoolean recording);
|
||||||
|
// @JS('setRecordingOutputDirectory')
|
||||||
|
// external JSPromise setRecordingOutputDirectory(String outputDirectory);
|
||||||
|
// @JS('addAnimationComponent')
|
||||||
|
// external JSPromise addAnimationComponent(FilamentEntity entity);
|
||||||
|
// @JS('addCollisionComponent')
|
||||||
|
// external JSPromise addCollisionComponent(FilamentEntity entity);
|
||||||
|
// @JS('removeCollisionComponent')
|
||||||
|
// external JSPromise removeCollisionComponent(FilamentEntity entity);
|
||||||
|
// @JS('createGeometry')
|
||||||
|
// external JSPromise<JSNumber> createGeometry(
|
||||||
|
// JSArray<JSNumber> vertices, JSArray<JSNumber> indices,
|
||||||
|
// String? materialPath, int primitiveType);
|
||||||
|
// @JS('setParent')
|
||||||
|
// external JSPromise setParent(FilamentEntity child, FilamentEntity parent);
|
||||||
|
// @JS('testCollisions')
|
||||||
|
// external JSPromise testCollisions(FilamentEntity entity);
|
||||||
|
// @JS('setPriority')
|
||||||
|
// external JSPromise setPriority(FilamentEntity entityId, int priority);
|
||||||
|
|
||||||
|
// }
|
||||||
@@ -0,0 +1,545 @@
|
|||||||
|
// @JS()
|
||||||
|
// library flutter_filament_js;
|
||||||
|
|
||||||
|
// import 'dart:js_interop';
|
||||||
|
|
||||||
|
// import 'package:animation_tools_dart/src/morph_animation_data.dart';
|
||||||
|
// import 'package:dart_filament/dart_filament/abstract_filament_viewer.dart';
|
||||||
|
// import 'package:dart_filament/dart_filament/entities/filament_entity.dart';
|
||||||
|
// import 'dart:js_interop';
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// class DartFilamentJSExportViewer {
|
||||||
|
// final AbstractFilamentViewer viewer;
|
||||||
|
|
||||||
|
// DartFilamentJSExportViewer(this.viewer);
|
||||||
|
|
||||||
|
// JSPromise<JSBoolean> get initialized {
|
||||||
|
// return viewer.initialized.then((v) => v.toJS).toJS;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSBoolean get rendering => viewer.rendering.toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise setRendering(bool render) {
|
||||||
|
// return viewer.setRendering(render).toJS;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise render() => viewer.render().toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise setFrameRate(int framerate) => viewer.setFrameRate(framerate).toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise dispose() => viewer.dispose().toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise setBackgroundImage(String path, {bool fillHeight = false}) =>
|
||||||
|
// viewer.setBackgroundImage(path, fillHeight: fillHeight).toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise setBackgroundImagePosition(double x, double y,
|
||||||
|
// {bool clamp = false}) =>
|
||||||
|
// viewer.setBackgroundImagePosition(x, y, clamp: clamp).toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise clearBackgroundImage() => viewer.clearBackgroundImage().toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise setBackgroundColor(double r, double g, double b, double alpha) =>
|
||||||
|
// viewer.setBackgroundColor(r, g, b, alpha).toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise loadSkybox(String skyboxPath) => viewer.loadSkybox(skyboxPath).toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise removeSkybox() => viewer.removeSkybox().toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise loadIbl(String lightingPath, {double intensity = 30000}) =>
|
||||||
|
// viewer.loadIbl(lightingPath, intensity: intensity).toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise rotateIbl(JSArray<JSNumber> rotation) => throw UnimplementedError();
|
||||||
|
// // viewer.rotateIbl(rotation.toDartMatrix3()).toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise removeIbl() => viewer.removeIbl().toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise<JSNumber> addLight(
|
||||||
|
// int type,
|
||||||
|
// double colour,
|
||||||
|
// double intensity,
|
||||||
|
// double posX,
|
||||||
|
// double posY,
|
||||||
|
// double posZ,
|
||||||
|
// double dirX,
|
||||||
|
// double dirY,
|
||||||
|
// double dirZ,
|
||||||
|
// bool castShadows) {
|
||||||
|
// return viewer
|
||||||
|
// .addLight(type, colour, intensity, posX, posY, posZ, dirX, dirY, dirZ,
|
||||||
|
// castShadows)
|
||||||
|
// .then((entity) => entity.toJS)
|
||||||
|
// .toJS;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise removeLight(FilamentEntity light) => viewer.removeLight(light).toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise clearLights() => viewer.clearLights().toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise<JSNumber> loadGlb(String path, {int numInstances = 1}) {
|
||||||
|
// return viewer
|
||||||
|
// .loadGlb(path, numInstances: numInstances)
|
||||||
|
// .then((entity) => entity.toJS)
|
||||||
|
// .toJS;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise<JSNumber> createInstance(FilamentEntity entity) {
|
||||||
|
// return viewer.createInstance(entity).then((instance) => instance.toJS).toJS;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise<JSNumber> getInstanceCount(FilamentEntity entity) =>
|
||||||
|
// viewer.getInstanceCount(entity).then((v) => v.toJS).toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise<JSArray<JSNumber>> getInstances(FilamentEntity entity) {
|
||||||
|
// return viewer
|
||||||
|
// .getInstances(entity)
|
||||||
|
// .then((instances) =>
|
||||||
|
// instances.map((instance) => instance.toJS).toList().toJS)
|
||||||
|
// .toJS;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise<JSNumber> loadGltf(String path, String relativeResourcePath,
|
||||||
|
// {bool force = false}) {
|
||||||
|
// return viewer
|
||||||
|
// .loadGltf(path, relativeResourcePath, force: force)
|
||||||
|
// .then((entity) => entity.toJS)
|
||||||
|
// .toJS;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise panStart(double x, double y) => viewer.panStart(x, y).toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise panUpdate(double x, double y) => viewer.panUpdate(x, y).toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise panEnd() => viewer.panEnd().toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise rotateStart(double x, double y) => viewer.rotateStart(x, y).toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise rotateUpdate(double x, double y) => viewer.rotateUpdate(x, y).toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise rotateEnd() => viewer.rotateEnd().toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise setMorphTargetWeights(
|
||||||
|
// FilamentEntity entity, List<double> weights) =>
|
||||||
|
// viewer.setMorphTargetWeights(entity, weights).toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise<JSArray<JSString>> getMorphTargetNames(
|
||||||
|
// FilamentEntity entity, String meshName) =>
|
||||||
|
// viewer
|
||||||
|
// .getMorphTargetNames(entity, meshName)
|
||||||
|
// .then((v) => v.map((s) => s.toJS).toList().toJS)
|
||||||
|
// .toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise<JSArray<JSString>> getAnimationNames(FilamentEntity entity) =>
|
||||||
|
// viewer
|
||||||
|
// .getAnimationNames(entity)
|
||||||
|
// .then((v) => v.map((s) => s.toJS).toList().toJS)
|
||||||
|
// .toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise<JSNumber> getAnimationDuration(
|
||||||
|
// FilamentEntity entity, int animationIndex) =>
|
||||||
|
// viewer
|
||||||
|
// .getAnimationDuration(entity, animationIndex)
|
||||||
|
// .then((v) => v.toJS)
|
||||||
|
// .toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise setMorphAnimationData(
|
||||||
|
// FilamentEntity entity,
|
||||||
|
// JSArray<JSArray<JSNumber>> animation,
|
||||||
|
// JSArray<JSString> morphTargets,
|
||||||
|
// JSArray<JSString> targetMeshNames) =>
|
||||||
|
// viewer
|
||||||
|
// .setMorphAnimationData(
|
||||||
|
// entity,
|
||||||
|
// MorphAnimationData(
|
||||||
|
// animation.toDart
|
||||||
|
// .map((x) => x.toDart.map((y) => y.toDartDouble).toList())
|
||||||
|
// .toList(),
|
||||||
|
// morphTargets.toDart.map((m) => m.toDart).toList()),
|
||||||
|
// targetMeshNames:
|
||||||
|
// targetMeshNames.toDart.map((x) => x.toDart).toList(),
|
||||||
|
// )
|
||||||
|
// .toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise resetBones(FilamentEntity entity) => viewer.resetBones(entity).toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise addBoneAnimation(FilamentEntity entity, JSObject animation) {
|
||||||
|
// throw Exception();
|
||||||
|
// }
|
||||||
|
// // viewer
|
||||||
|
// // .addBoneAnimation(
|
||||||
|
// // entity,
|
||||||
|
// // BoneAnimationData._fromJSObject(animation),
|
||||||
|
// // )
|
||||||
|
// // .toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise removeEntity(FilamentEntity entity) =>
|
||||||
|
// viewer.removeEntity(entity).toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise clearEntities() => viewer.clearEntities().toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise zoomBegin() => viewer.zoomBegin().toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise zoomUpdate(double x, double y, double z) =>
|
||||||
|
// viewer.zoomUpdate(x, y, z).toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise zoomEnd() => viewer.zoomEnd().toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise playAnimation(FilamentEntity entity, int index,
|
||||||
|
// {bool loop = false,
|
||||||
|
// bool reverse = false,
|
||||||
|
// bool replaceActive = true,
|
||||||
|
// double crossfade = 0.0}) =>
|
||||||
|
// viewer
|
||||||
|
// .playAnimation(
|
||||||
|
// entity,
|
||||||
|
// index,
|
||||||
|
// loop: loop,
|
||||||
|
// reverse: reverse,
|
||||||
|
// replaceActive: replaceActive,
|
||||||
|
// crossfade: crossfade,
|
||||||
|
// )
|
||||||
|
// .toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise playAnimationByName(FilamentEntity entity, String name,
|
||||||
|
// {bool loop = false,
|
||||||
|
// bool reverse = false,
|
||||||
|
// bool replaceActive = true,
|
||||||
|
// double crossfade = 0.0}) =>
|
||||||
|
// viewer
|
||||||
|
// .playAnimationByName(
|
||||||
|
// entity,
|
||||||
|
// name,
|
||||||
|
// loop: loop,
|
||||||
|
// reverse: reverse,
|
||||||
|
// replaceActive: replaceActive,
|
||||||
|
// crossfade: crossfade,
|
||||||
|
// )
|
||||||
|
// .toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise setAnimationFrame(
|
||||||
|
// FilamentEntity entity, int index, int animationFrame) =>
|
||||||
|
// viewer
|
||||||
|
// .setAnimationFrame(
|
||||||
|
// entity,
|
||||||
|
// index,
|
||||||
|
// animationFrame,
|
||||||
|
// )
|
||||||
|
// .toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise stopAnimation(FilamentEntity entity, int animationIndex) =>
|
||||||
|
// viewer.stopAnimation(entity, animationIndex).toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise stopAnimationByName(FilamentEntity entity, String name) =>
|
||||||
|
// viewer.stopAnimationByName(entity, name).toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise setCamera(FilamentEntity entity, String? name) =>
|
||||||
|
// viewer.setCamera(entity, name).toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise setMainCamera() => viewer.setMainCamera().toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise<JSNumber> getMainCamera() {
|
||||||
|
// return viewer.getMainCamera().then((camera) => camera.toJS).toJS;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise setCameraFov(double degrees, double width, double height) =>
|
||||||
|
// viewer.setCameraFov(degrees, width, height).toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise setToneMapping(int mapper) =>
|
||||||
|
// viewer.setToneMapping(ToneMapper.values[mapper]).toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise setBloom(double bloom) => viewer.setBloom(bloom).toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise setCameraFocalLength(double focalLength) =>
|
||||||
|
// viewer.setCameraFocalLength(focalLength).toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise setCameraCulling(double near, double far) =>
|
||||||
|
// viewer.setCameraCulling(near, far).toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise<JSNumber> getCameraCullingNear() =>
|
||||||
|
// viewer.getCameraCullingNear().then((v) => v.toJS).toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise<JSNumber> getCameraCullingFar() =>
|
||||||
|
// viewer.getCameraCullingFar().then((v) => v.toJS).toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise setCameraFocusDistance(double focusDistance) =>
|
||||||
|
// viewer.setCameraFocusDistance(focusDistance).toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise<JSArray<JSNumber>> getCameraPosition() {
|
||||||
|
// throw UnimplementedError();
|
||||||
|
// // return viewer.getCameraPosition().then((position) => position.toJS).toJS;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise<JSArray<JSNumber>> getCameraModelMatrix() {
|
||||||
|
// throw UnimplementedError();
|
||||||
|
// // return viewer.getCameraModelMatrix().then((matrix) => matrix.toJSArray<JSNumber>()).toJS;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise<JSArray<JSNumber>> getCameraViewMatrix() {
|
||||||
|
// throw UnimplementedError();
|
||||||
|
// // return viewer.getCameraViewMatrix().then((matrix) => matrix.toJSArray<JSNumber>()).toJS;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise<JSArray<JSNumber>> getCameraProjectionMatrix() {
|
||||||
|
// throw UnimplementedError();
|
||||||
|
// // return viewer.getCameraProjectionMatrix().then((matrix) => matrix.toJSArray<JSNumber>()).toJS;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise<JSArray<JSNumber>> getCameraCullingProjectionMatrix() {
|
||||||
|
// throw UnimplementedError();
|
||||||
|
// // return viewer.getCameraCullingProjectionMatrix().then((matrix) => matrix.toJSArray<JSNumber>()).toJS;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise<JSNumber> getCameraFrustum() {
|
||||||
|
// throw UnimplementedError();
|
||||||
|
// // return viewer.getCameraFrustum().then((frustum) => frustum.toJS).toJS;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise setCameraPosition(double x, double y, double z) =>
|
||||||
|
// viewer.setCameraPosition(x, y, z).toJS;
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise<JSArray<JSNumber>> getCameraRotation() {
|
||||||
|
// return viewer
|
||||||
|
// .getCameraRotation()
|
||||||
|
// .then((rotation) => rotation.storage.map((v) => v.toJS).toList().toJS)
|
||||||
|
// .toJS;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise moveCameraToAsset(FilamentEntity entity) =>
|
||||||
|
// throw UnimplementedError();
|
||||||
|
// // viewer.moveCameraToAsset(entity)).toJS;
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise setViewFrustumCulling(JSBoolean enabled) =>
|
||||||
|
// throw UnimplementedError();
|
||||||
|
// // viewer.setViewFrustumCulling(enabled).toJS;
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise setCameraExposure(
|
||||||
|
// double aperture, double shutterSpeed, double sensitivity) =>
|
||||||
|
// viewer.setCameraExposure(aperture, shutterSpeed, sensitivity).toJS;
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise setCameraRotation(JSArray<JSNumber> quaternion) =>
|
||||||
|
// throw UnimplementedError();
|
||||||
|
// // viewer.setCameraRotation(quaternion.toDartQuaternion()).toJS;
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise setCameraModelMatrix(List<double> matrix) =>
|
||||||
|
// viewer.setCameraModelMatrix(matrix).toJS;
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise setMaterialColor(FilamentEntity entity, String meshName,
|
||||||
|
// int materialIndex, double r, double g, double b, double a) =>
|
||||||
|
// throw UnimplementedError();
|
||||||
|
// // viewer.setMaterialColor(
|
||||||
|
// // entity),
|
||||||
|
// // meshName,
|
||||||
|
// // materialIndex,
|
||||||
|
// // r,
|
||||||
|
// // g,
|
||||||
|
// // b,
|
||||||
|
// // a,
|
||||||
|
// // ).toJS;
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise transformToUnitCube(FilamentEntity entity) =>
|
||||||
|
// viewer.transformToUnitCube(entity).toJS;
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise setPosition(FilamentEntity entity, double x, double y, double z) =>
|
||||||
|
// viewer.setPosition(entity, x, y, z).toJS;
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise setScale(FilamentEntity entity, double scale) =>
|
||||||
|
// viewer.setScale(entity, scale).toJS;
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise setRotation(
|
||||||
|
// FilamentEntity entity, double rads, double x, double y, double z) =>
|
||||||
|
// viewer.setRotation(entity, rads, x, y, z).toJS;
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise queuePositionUpdate(
|
||||||
|
// FilamentEntity entity, double x, double y, double z, bool relative) =>
|
||||||
|
// viewer
|
||||||
|
// .queuePositionUpdate(
|
||||||
|
// entity,
|
||||||
|
// x,
|
||||||
|
// y,
|
||||||
|
// z,
|
||||||
|
// relative: relative,
|
||||||
|
// )
|
||||||
|
// .toJS;
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise queueRotationUpdate(FilamentEntity entity, double rads, double x,
|
||||||
|
// double y, double z, bool relative) =>
|
||||||
|
// viewer
|
||||||
|
// .queueRotationUpdate(
|
||||||
|
// entity,
|
||||||
|
// rads,
|
||||||
|
// x,
|
||||||
|
// y,
|
||||||
|
// z,
|
||||||
|
// relative: relative,
|
||||||
|
// )
|
||||||
|
// .toJS;
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise queueRotationUpdateQuat(
|
||||||
|
// FilamentEntity entity, JSArray<JSNumber> quat, JSBoolean relative) =>
|
||||||
|
// throw UnimplementedError();
|
||||||
|
// // viewer.queueRotationUpdateQuat(
|
||||||
|
// // entity,
|
||||||
|
// // quat.toDartQuaternion(),
|
||||||
|
// // relative: relative,
|
||||||
|
// // ).toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise setPostProcessing(bool enabled) =>
|
||||||
|
// viewer.setPostProcessing(enabled).toJS;
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise setAntiAliasing(bool msaa, bool fxaa, bool taa) =>
|
||||||
|
// viewer.setAntiAliasing(msaa, fxaa, taa).toJS;
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise setRotationQuat(
|
||||||
|
// FilamentEntity entity, JSArray<JSNumber> rotation) =>
|
||||||
|
// throw UnimplementedError();
|
||||||
|
// // viewer.setRotationQuat(
|
||||||
|
// // entity,
|
||||||
|
// // rotation.toDartQuaternion(),
|
||||||
|
// // ).toJS;
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise reveal(FilamentEntity entity, String? meshName) =>
|
||||||
|
// viewer.reveal(entity, meshName).toJS;
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise hide(FilamentEntity entity, String? meshName) =>
|
||||||
|
// viewer.hide(entity, meshName).toJS;
|
||||||
|
// @JSExport()
|
||||||
|
// void pick(int x, int y) => viewer.pick(x, y);
|
||||||
|
// @JSExport()
|
||||||
|
// String? getNameForEntity(FilamentEntity entity) =>
|
||||||
|
// viewer.getNameForEntity(entity);
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise setCameraManipulatorOptions({
|
||||||
|
// int mode = 0,
|
||||||
|
// double orbitSpeedX = 0.01,
|
||||||
|
// double orbitSpeedY = 0.01,
|
||||||
|
// double zoomSpeed = 0.01,
|
||||||
|
// }) =>
|
||||||
|
// viewer
|
||||||
|
// .setCameraManipulatorOptions(
|
||||||
|
// mode: ManipulatorMode.values[mode],
|
||||||
|
// orbitSpeedX: orbitSpeedX,
|
||||||
|
// orbitSpeedY: orbitSpeedY,
|
||||||
|
// zoomSpeed: zoomSpeed,
|
||||||
|
// )
|
||||||
|
// .toJS;
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise<JSArray<JSNumber>> getChildEntities(
|
||||||
|
// FilamentEntity parent, bool renderableOnly) {
|
||||||
|
// return viewer
|
||||||
|
// .getChildEntities(
|
||||||
|
// parent,
|
||||||
|
// renderableOnly,
|
||||||
|
// )
|
||||||
|
// .then((entities) => entities.map((entity) => entity.toJS).toList().toJS)
|
||||||
|
// .toJS;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise<JSNumber> getChildEntity(FilamentEntity parent, String childName) {
|
||||||
|
// return viewer
|
||||||
|
// .getChildEntity(
|
||||||
|
// parent,
|
||||||
|
// childName,
|
||||||
|
// )
|
||||||
|
// .then((entity) => entity.toJS)
|
||||||
|
// .toJS;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise<JSArray<JSString>> getChildEntityNames(
|
||||||
|
// FilamentEntity entity, bool renderableOnly) =>
|
||||||
|
// viewer
|
||||||
|
// .getChildEntityNames(
|
||||||
|
// entity,
|
||||||
|
// renderableOnly: renderableOnly,
|
||||||
|
// )
|
||||||
|
// .then((v) => v.map((s) => s.toJS).toList().toJS)
|
||||||
|
// .toJS;
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise setRecording(bool recording) => viewer.setRecording(recording).toJS;
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise setRecordingOutputDirectory(String outputDirectory) =>
|
||||||
|
// viewer.setRecordingOutputDirectory(outputDirectory).toJS;
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise addAnimationComponent(FilamentEntity entity) =>
|
||||||
|
// viewer.addAnimationComponent(entity).toJS;
|
||||||
|
|
||||||
|
// @JSExport()
|
||||||
|
// JSPromise addCollisionComponent(FilamentEntity entity,
|
||||||
|
// {JSFunction? callback, bool affectsTransform = false}) {
|
||||||
|
// throw UnimplementedError();
|
||||||
|
// // final Function? dartCallback = callback != null
|
||||||
|
// // ? allowInterop((int entityId1, int entityId2) => callback.apply([entityId1, entityId2]))
|
||||||
|
// // : null;
|
||||||
|
// // return viewer.addCollisionComponent(
|
||||||
|
// // entity),
|
||||||
|
// // callback: dartCallback,
|
||||||
|
// // affectsTransform: affectsTransform,
|
||||||
|
// // ).toJs
|
||||||
|
// }
|
||||||
|
// }
|
||||||
@@ -0,0 +1,450 @@
|
|||||||
|
# Generated by pub
|
||||||
|
# See https://dart.dev/tools/pub/glossary#lockfile
|
||||||
|
packages:
|
||||||
|
_fe_analyzer_shared:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: _fe_analyzer_shared
|
||||||
|
sha256: "5aaf60d96c4cd00fe7f21594b5ad6a1b699c80a27420f8a837f4d68473ef09e3"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "68.0.0"
|
||||||
|
_macros:
|
||||||
|
dependency: transitive
|
||||||
|
description: dart
|
||||||
|
source: sdk
|
||||||
|
version: "0.1.3"
|
||||||
|
analyzer:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: analyzer
|
||||||
|
sha256: "21f1d3720fd1c70316399d5e2bccaebb415c434592d778cce8acb967b8578808"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "6.5.0"
|
||||||
|
animation_tools_dart:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
path: "."
|
||||||
|
ref: HEAD
|
||||||
|
resolved-ref: "1a5ffc8a58353d43ba1864c8676c47948ee9b5ce"
|
||||||
|
url: "git@github.com:nmfisher/animation_tools_dart.git"
|
||||||
|
source: git
|
||||||
|
version: "0.0.2"
|
||||||
|
args:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: args
|
||||||
|
sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.5.0"
|
||||||
|
async:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: async
|
||||||
|
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.11.0"
|
||||||
|
boolean_selector:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: boolean_selector
|
||||||
|
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.1"
|
||||||
|
collection:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: collection
|
||||||
|
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.18.0"
|
||||||
|
convert:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: convert
|
||||||
|
sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.1.1"
|
||||||
|
coverage:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: coverage
|
||||||
|
sha256: "3945034e86ea203af7a056d98e98e42a5518fff200d6e8e6647e1886b07e936e"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.8.0"
|
||||||
|
crypto:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: crypto
|
||||||
|
sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.0.3"
|
||||||
|
dart_filament:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
path: "../../../../dart_filament"
|
||||||
|
relative: true
|
||||||
|
source: path
|
||||||
|
version: "0.5.0"
|
||||||
|
ffi:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: ffi
|
||||||
|
sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.2"
|
||||||
|
file:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: file
|
||||||
|
sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "7.0.0"
|
||||||
|
frontend_server_client:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: frontend_server_client
|
||||||
|
sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "4.0.0"
|
||||||
|
glob:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: glob
|
||||||
|
sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.2"
|
||||||
|
http_multi_server:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: http_multi_server
|
||||||
|
sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.2.1"
|
||||||
|
http_parser:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: http_parser
|
||||||
|
sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "4.0.2"
|
||||||
|
io:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: io
|
||||||
|
sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.0.4"
|
||||||
|
js:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: js
|
||||||
|
sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.7.1"
|
||||||
|
lints:
|
||||||
|
dependency: "direct dev"
|
||||||
|
description:
|
||||||
|
name: lints
|
||||||
|
sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.0.0"
|
||||||
|
logging:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: logging
|
||||||
|
sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.2.0"
|
||||||
|
macros:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: macros
|
||||||
|
sha256: e4a273c4a7a81fdbea1f3faed45faa6a7c0b78a50076e89d3f02350caefc8939
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.1.0-main.3"
|
||||||
|
matcher:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: matcher
|
||||||
|
sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.12.16+1"
|
||||||
|
meta:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: meta
|
||||||
|
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.15.0"
|
||||||
|
mime:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: mime
|
||||||
|
sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.0.5"
|
||||||
|
node_preamble:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: node_preamble
|
||||||
|
sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.2"
|
||||||
|
package_config:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: package_config
|
||||||
|
sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.0"
|
||||||
|
path:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: path
|
||||||
|
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.9.0"
|
||||||
|
plugin_platform_interface:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: plugin_platform_interface
|
||||||
|
sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.8"
|
||||||
|
pool:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: pool
|
||||||
|
sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.5.1"
|
||||||
|
pub_semver:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: pub_semver
|
||||||
|
sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.4"
|
||||||
|
shelf:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: shelf
|
||||||
|
sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.4.1"
|
||||||
|
shelf_packages_handler:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: shelf_packages_handler
|
||||||
|
sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.0.2"
|
||||||
|
shelf_static:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: shelf_static
|
||||||
|
sha256: a41d3f53c4adf0f57480578c1d61d90342cd617de7fc8077b1304643c2d85c1e
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.1.2"
|
||||||
|
shelf_web_socket:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: shelf_web_socket
|
||||||
|
sha256: "073c147238594ecd0d193f3456a5fe91c4b0abbcc68bf5cd95b36c4e194ac611"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.0"
|
||||||
|
source_map_stack_trace:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: source_map_stack_trace
|
||||||
|
sha256: "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.1"
|
||||||
|
source_maps:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: source_maps
|
||||||
|
sha256: "708b3f6b97248e5781f493b765c3337db11c5d2c81c3094f10904bfa8004c703"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.10.12"
|
||||||
|
source_span:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: source_span
|
||||||
|
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.10.0"
|
||||||
|
stack_trace:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: stack_trace
|
||||||
|
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.11.1"
|
||||||
|
stream_channel:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: stream_channel
|
||||||
|
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.2"
|
||||||
|
string_scanner:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: string_scanner
|
||||||
|
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.2.0"
|
||||||
|
term_glyph:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: term_glyph
|
||||||
|
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.2.1"
|
||||||
|
test:
|
||||||
|
dependency: "direct dev"
|
||||||
|
description:
|
||||||
|
name: test
|
||||||
|
sha256: d11b55850c68c1f6c0cf00eabded4e66c4043feaf6c0d7ce4a36785137df6331
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.25.5"
|
||||||
|
test_api:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: test_api
|
||||||
|
sha256: "2419f20b0c8677b2d67c8ac4d1ac7372d862dc6c460cdbb052b40155408cd794"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.7.1"
|
||||||
|
test_core:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: test_core
|
||||||
|
sha256: "4d070a6bc36c1c4e89f20d353bfd71dc30cdf2bd0e14349090af360a029ab292"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.6.2"
|
||||||
|
tuple:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: tuple
|
||||||
|
sha256: a97ce2013f240b2f3807bcbaf218765b6f301c3eff91092bcfa23a039e7dd151
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.2"
|
||||||
|
typed_data:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: typed_data
|
||||||
|
sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.3.2"
|
||||||
|
vector_math:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: vector_math
|
||||||
|
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.4"
|
||||||
|
vm_service:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: vm_service
|
||||||
|
sha256: "7475cb4dd713d57b6f7464c0e13f06da0d535d8b2067e188962a59bac2cf280b"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "14.2.2"
|
||||||
|
watcher:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: watcher
|
||||||
|
sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.1.0"
|
||||||
|
web:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: web
|
||||||
|
sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.5.1"
|
||||||
|
web_socket:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: web_socket
|
||||||
|
sha256: bfe704c186c6e32a46f6607f94d079cd0b747b9a489fceeecc93cd3adb98edd5
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.1.3"
|
||||||
|
web_socket_channel:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: web_socket_channel
|
||||||
|
sha256: a2d56211ee4d35d9b344d9d4ce60f362e4f5d1aafb988302906bd732bc731276
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.0.0"
|
||||||
|
webkit_inspection_protocol:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: webkit_inspection_protocol
|
||||||
|
sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.2.1"
|
||||||
|
yaml:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: yaml
|
||||||
|
sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.1.2"
|
||||||
|
sdks:
|
||||||
|
dart: ">=3.4.0-256.0.dev <4.0.0"
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
name: web_app
|
||||||
|
description: A sample command-line application.
|
||||||
|
version: 1.0.0
|
||||||
|
# repository: https://github.com/my_org/my_repo
|
||||||
|
|
||||||
|
environment:
|
||||||
|
sdk: ^3.3.0
|
||||||
|
|
||||||
|
# Add regular dependencies here.
|
||||||
|
dependencies:
|
||||||
|
dart_filament:
|
||||||
|
path: ../../../../dart_filament
|
||||||
|
|
||||||
|
dev_dependencies:
|
||||||
|
lints: ^3.0.0
|
||||||
|
test: ^1.24.0
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
import 'package:web_app/web_app.dart';
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
test('calculate', () {
|
||||||
|
expect(calculate(), 42);
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -7,11 +7,8 @@
|
|||||||
#include "generated_plugin_registrant.h"
|
#include "generated_plugin_registrant.h"
|
||||||
|
|
||||||
#include <flutter_filament/flutter_filament_plugin_c_api.h>
|
#include <flutter_filament/flutter_filament_plugin_c_api.h>
|
||||||
#include <permission_handler_windows/permission_handler_windows_plugin.h>
|
|
||||||
|
|
||||||
void RegisterPlugins(flutter::PluginRegistry* registry) {
|
void RegisterPlugins(flutter::PluginRegistry* registry) {
|
||||||
FlutterFilamentPluginCApiRegisterWithRegistrar(
|
FlutterFilamentPluginCApiRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("FlutterFilamentPluginCApi"));
|
registry->GetRegistrarForPlugin("FlutterFilamentPluginCApi"));
|
||||||
PermissionHandlerWindowsPluginRegisterWithRegistrar(
|
|
||||||
registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin"));
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
list(APPEND FLUTTER_PLUGIN_LIST
|
list(APPEND FLUTTER_PLUGIN_LIST
|
||||||
flutter_filament
|
flutter_filament
|
||||||
permission_handler_windows
|
|
||||||
)
|
)
|
||||||
|
|
||||||
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -18,8 +18,11 @@ class FlutterFilamentPlugin {
|
|||||||
}
|
}
|
||||||
await FlutterFilamentPlatform.instance
|
await FlutterFilamentPlatform.instance
|
||||||
.initialize(uberArchivePath: uberArchivePath);
|
.initialize(uberArchivePath: uberArchivePath);
|
||||||
|
print("instance init completed");
|
||||||
_initialized.complete(true);
|
_initialized.complete(true);
|
||||||
|
print("completed compelter");
|
||||||
await viewer.initialized;
|
await viewer.initialized;
|
||||||
|
print("viewer init complete");
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<FlutterFilamentTexture?> createTexture(
|
Future<FlutterFilamentTexture?> createTexture(
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import 'package:dart_filament/dart_filament/entities/filament_entity.dart';
|
import 'package:dart_filament/dart_filament/entities/filament_entity.dart';
|
||||||
import 'package:dart_filament/dart_filament/filament_viewer_impl.dart';
|
import 'package:dart_filament/dart_filament/abstract_filament_viewer.dart';import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import '../../utils/camera_orientation.dart';
|
import '../../utils/camera_orientation.dart';
|
||||||
|
|
||||||
@@ -8,7 +7,7 @@ import 'dart:math';
|
|||||||
import 'package:vector_math/vector_math_64.dart' as v64;
|
import 'package:vector_math/vector_math_64.dart' as v64;
|
||||||
|
|
||||||
class CameraOptionsWidget extends StatefulWidget {
|
class CameraOptionsWidget extends StatefulWidget {
|
||||||
final FilamentViewer controller;
|
final AbstractFilamentViewer controller;
|
||||||
final CameraOrientation cameraOrientation;
|
final CameraOrientation cameraOrientation;
|
||||||
final List<({FilamentEntity entity, String name})> cameras;
|
final List<({FilamentEntity entity, String name})> cameras;
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
|
|||||||
|
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:dart_filament/dart_filament.dart';
|
import 'package:dart_filament/dart_filament/entities/entity_transform_controller.dart';
|
||||||
|
|
||||||
///
|
///
|
||||||
/// A widget that translates mouse gestures to zoom/pan/rotate actions.
|
/// A widget that translates mouse gestures to zoom/pan/rotate actions.
|
||||||
|
|||||||
@@ -65,9 +65,7 @@ class FilamentGestureDetector extends StatelessWidget {
|
|||||||
if (initialized.data != true) {
|
if (initialized.data != true) {
|
||||||
return Container();
|
return Container();
|
||||||
}
|
}
|
||||||
if (kIsWeb) {
|
if (kIsWeb || Platform.isLinux ||
|
||||||
throw Exception("TODO");
|
|
||||||
} else if (Platform.isLinux ||
|
|
||||||
Platform.isWindows ||
|
Platform.isWindows ||
|
||||||
Platform.isMacOS) {
|
Platform.isMacOS) {
|
||||||
return FilamentGestureDetectorDesktop(
|
return FilamentGestureDetectorDesktop(
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:dart_filament/dart_filament/abstract_filament_viewer.dart';
|
import 'package:dart_filament/dart_filament/abstract_filament_viewer.dart';
|
||||||
import 'package:dart_filament/dart_filament/entities/gizmo.dart';
|
|
||||||
import 'package:flutter/gestures.dart';
|
import 'package:flutter/gestures.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
@@ -66,10 +65,7 @@ class _FilamentGestureDetectorDesktopState
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
widget.controller.scene.gizmo.then((g) {
|
_gizmo = widget.controller.gizmo;
|
||||||
_gizmo = g;
|
|
||||||
setState(() {});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -107,9 +103,6 @@ class _FilamentGestureDetectorDesktopState
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
if (_gizmo == null) {
|
|
||||||
return Container();
|
|
||||||
}
|
|
||||||
return Listener(
|
return Listener(
|
||||||
// onPointerHover: (event) async {
|
// onPointerHover: (event) async {
|
||||||
// if (_gizmo.isActive) {
|
// if (_gizmo.isActive) {
|
||||||
@@ -134,7 +127,7 @@ class _FilamentGestureDetectorDesktopState
|
|||||||
throw Exception("TODO - is this a pinch zoom on laptop trackpad?");
|
throw Exception("TODO - is this a pinch zoom on laptop trackpad?");
|
||||||
},
|
},
|
||||||
onPointerDown: (d) async {
|
onPointerDown: (d) async {
|
||||||
if (_gizmo!.isActive) {
|
if (_gizmo?.isActive == true) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (d.buttons != kTertiaryButton && widget.enablePicking) {
|
if (d.buttons != kTertiaryButton && widget.enablePicking) {
|
||||||
@@ -145,7 +138,7 @@ class _FilamentGestureDetectorDesktopState
|
|||||||
},
|
},
|
||||||
// holding/moving the left mouse button is interpreted as a pan, middle mouse button as a rotate
|
// holding/moving the left mouse button is interpreted as a pan, middle mouse button as a rotate
|
||||||
onPointerMove: (PointerMoveEvent d) async {
|
onPointerMove: (PointerMoveEvent d) async {
|
||||||
if (_gizmo!.isActive) {
|
if (_gizmo?.isActive == true) {
|
||||||
_gizmo!.translate(d.delta.dx, d.delta.dy);
|
_gizmo!.translate(d.delta.dx, d.delta.dy);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -173,7 +166,7 @@ class _FilamentGestureDetectorDesktopState
|
|||||||
// 2) if _pointerMoving is false, this is interpreted as a pick
|
// 2) if _pointerMoving is false, this is interpreted as a pick
|
||||||
// same applies to middle mouse button, but this is ignored as a pick
|
// same applies to middle mouse button, but this is ignored as a pick
|
||||||
onPointerUp: (PointerUpEvent d) async {
|
onPointerUp: (PointerUpEvent d) async {
|
||||||
if (_gizmo!.isActive) {
|
if (_gizmo?.isActive == true) {
|
||||||
_gizmo!.reset();
|
_gizmo!.reset();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'dart:math';
|
import 'dart:math';
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
@@ -129,7 +130,7 @@ class _FilamentWidgetState extends State<FilamentWidget> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
if (_texture == null) {
|
if (_texture == null) {
|
||||||
return widget.initial ?? Container(color: Colors.red);
|
return widget.initial ?? Container(color: kIsWeb ? Colors.transparent : Colors.red);
|
||||||
}
|
}
|
||||||
|
|
||||||
var textureWidget = Texture(
|
var textureWidget = Texture(
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
import 'dart:math';
|
|
||||||
|
|
||||||
import 'package:dart_filament/dart_filament/entities/filament_entity.dart';
|
import 'package:dart_filament/dart_filament/entities/filament_entity.dart';
|
||||||
import 'package:dart_filament/dart_filament/filament_viewer_impl.dart';
|
import 'package:dart_filament/dart_filament/abstract_filament_viewer.dart';
|
||||||
import 'package:dart_filament/dart_filament/utils/light_options.dart';
|
import 'package:dart_filament/dart_filament/utils/light_options.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
@@ -9,7 +7,7 @@ import 'package:flutter/widgets.dart';
|
|||||||
import 'package:vector_math/vector_math_64.dart' as v;
|
import 'package:vector_math/vector_math_64.dart' as v;
|
||||||
|
|
||||||
class LightSliderWidget extends StatefulWidget {
|
class LightSliderWidget extends StatefulWidget {
|
||||||
final FilamentViewer controller;
|
final AbstractFilamentViewer controller;
|
||||||
|
|
||||||
final LightOptions options;
|
final LightOptions options;
|
||||||
final bool showControls;
|
final bool showControls;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
library flutter_filament;
|
library flutter_filament;
|
||||||
|
|
||||||
export 'filament/flutter_filament_plugin.dart';
|
export 'filament/flutter_filament_plugin.dart';
|
||||||
export 'package:dart_filament/dart_filament.dart';
|
// export 'package:dart_filament/dart_filament.dart';
|
||||||
|
|
||||||
|
|||||||
@@ -4,10 +4,11 @@ packages:
|
|||||||
animation_tools_dart:
|
animation_tools_dart:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: animation_tools_dart
|
path: "."
|
||||||
sha256: c4bc4096d43227b573345a3ea3cb26c3af47a70af31cd7d7d3a5b7c99e33d615
|
ref: HEAD
|
||||||
url: "https://pub.dev"
|
resolved-ref: "1a5ffc8a58353d43ba1864c8676c47948ee9b5ce"
|
||||||
source: hosted
|
url: "git@github.com:nmfisher/animation_tools_dart.git"
|
||||||
|
source: git
|
||||||
version: "0.0.2"
|
version: "0.0.2"
|
||||||
args:
|
args:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
@@ -129,7 +130,7 @@ packages:
|
|||||||
path: "../flutter_filament_web"
|
path: "../flutter_filament_web"
|
||||||
relative: true
|
relative: true
|
||||||
source: path
|
source: path
|
||||||
version: "2.0.5"
|
version: "0.0.1"
|
||||||
flutter_lints:
|
flutter_lints:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
@@ -345,6 +346,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "14.2.2"
|
version: "14.2.2"
|
||||||
|
web:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: web
|
||||||
|
sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.5.1"
|
||||||
yaml:
|
yaml:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
name: flutter_filament
|
name: flutter_filament
|
||||||
description: A Flutter plugin to wrap the Filament rendering engine.
|
description: A Flutter plugin to wrap the Filament rendering engine.
|
||||||
version: 0.6.0
|
version: 0.7.0
|
||||||
homepage:
|
homepage:
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
@@ -16,7 +16,9 @@ dependencies:
|
|||||||
plugin_platform_interface: ^2.0.0
|
plugin_platform_interface: ^2.0.0
|
||||||
tuple:
|
tuple:
|
||||||
ffi:
|
ffi:
|
||||||
animation_tools_dart: ^0.0.2
|
animation_tools_dart:
|
||||||
|
git:
|
||||||
|
url: git@github.com:nmfisher/animation_tools_dart.git
|
||||||
dart_filament:
|
dart_filament:
|
||||||
path: ../../dart_filament
|
path: ../../dart_filament
|
||||||
flutter_filament_platform_interface:
|
flutter_filament_platform_interface:
|
||||||
|
|||||||
@@ -0,0 +1,342 @@
|
|||||||
|
#ifndef __egl_h_
|
||||||
|
#define __egl_h_ 1
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Copyright 2013-2020 The Khronos Group Inc.
|
||||||
|
** SPDX-License-Identifier: Apache-2.0
|
||||||
|
**
|
||||||
|
** This header is generated from the Khronos EGL XML API Registry.
|
||||||
|
** The current version of the Registry, generator scripts
|
||||||
|
** used to make the header, and the header can be found at
|
||||||
|
** http://www.khronos.org/registry/egl
|
||||||
|
**
|
||||||
|
** Khronos $Git commit SHA1: 5a9a7e3fcb $ on $Git commit date: 2020-08-24 11:05:32 -0700 $
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <EGL/eglplatform.h>
|
||||||
|
|
||||||
|
#ifndef EGL_EGL_PROTOTYPES
|
||||||
|
#define EGL_EGL_PROTOTYPES 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Generated on date 20201001 */
|
||||||
|
|
||||||
|
/* Generated C header for:
|
||||||
|
* API: egl
|
||||||
|
* Versions considered: .*
|
||||||
|
* Versions emitted: .*
|
||||||
|
* Default extensions included: None
|
||||||
|
* Additional extensions included: _nomatch_^
|
||||||
|
* Extensions removed: _nomatch_^
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef EGL_VERSION_1_0
|
||||||
|
#define EGL_VERSION_1_0 1
|
||||||
|
typedef unsigned int EGLBoolean;
|
||||||
|
typedef void *EGLDisplay;
|
||||||
|
#include <EGL/eglplatform.h>
|
||||||
|
#include <KHR/khrplatform.h>
|
||||||
|
typedef void *EGLConfig;
|
||||||
|
typedef void *EGLSurface;
|
||||||
|
typedef void *EGLContext;
|
||||||
|
typedef void (*__eglMustCastToProperFunctionPointerType)(void);
|
||||||
|
#define EGL_ALPHA_SIZE 0x3021
|
||||||
|
#define EGL_BAD_ACCESS 0x3002
|
||||||
|
#define EGL_BAD_ALLOC 0x3003
|
||||||
|
#define EGL_BAD_ATTRIBUTE 0x3004
|
||||||
|
#define EGL_BAD_CONFIG 0x3005
|
||||||
|
#define EGL_BAD_CONTEXT 0x3006
|
||||||
|
#define EGL_BAD_CURRENT_SURFACE 0x3007
|
||||||
|
#define EGL_BAD_DISPLAY 0x3008
|
||||||
|
#define EGL_BAD_MATCH 0x3009
|
||||||
|
#define EGL_BAD_NATIVE_PIXMAP 0x300A
|
||||||
|
#define EGL_BAD_NATIVE_WINDOW 0x300B
|
||||||
|
#define EGL_BAD_PARAMETER 0x300C
|
||||||
|
#define EGL_BAD_SURFACE 0x300D
|
||||||
|
#define EGL_BLUE_SIZE 0x3022
|
||||||
|
#define EGL_BUFFER_SIZE 0x3020
|
||||||
|
#define EGL_CONFIG_CAVEAT 0x3027
|
||||||
|
#define EGL_CONFIG_ID 0x3028
|
||||||
|
#define EGL_CORE_NATIVE_ENGINE 0x305B
|
||||||
|
#define EGL_DEPTH_SIZE 0x3025
|
||||||
|
#define EGL_DONT_CARE EGL_CAST(EGLint,-1)
|
||||||
|
#define EGL_DRAW 0x3059
|
||||||
|
#define EGL_EXTENSIONS 0x3055
|
||||||
|
#define EGL_FALSE 0
|
||||||
|
#define EGL_GREEN_SIZE 0x3023
|
||||||
|
#define EGL_HEIGHT 0x3056
|
||||||
|
#define EGL_LARGEST_PBUFFER 0x3058
|
||||||
|
#define EGL_LEVEL 0x3029
|
||||||
|
#define EGL_MAX_PBUFFER_HEIGHT 0x302A
|
||||||
|
#define EGL_MAX_PBUFFER_PIXELS 0x302B
|
||||||
|
#define EGL_MAX_PBUFFER_WIDTH 0x302C
|
||||||
|
#define EGL_NATIVE_RENDERABLE 0x302D
|
||||||
|
#define EGL_NATIVE_VISUAL_ID 0x302E
|
||||||
|
#define EGL_NATIVE_VISUAL_TYPE 0x302F
|
||||||
|
#define EGL_NONE 0x3038
|
||||||
|
#define EGL_NON_CONFORMANT_CONFIG 0x3051
|
||||||
|
#define EGL_NOT_INITIALIZED 0x3001
|
||||||
|
#define EGL_NO_CONTEXT EGL_CAST(EGLContext,0)
|
||||||
|
#define EGL_NO_DISPLAY EGL_CAST(EGLDisplay,0)
|
||||||
|
#define EGL_NO_SURFACE EGL_CAST(EGLSurface,0)
|
||||||
|
#define EGL_PBUFFER_BIT 0x0001
|
||||||
|
#define EGL_PIXMAP_BIT 0x0002
|
||||||
|
#define EGL_READ 0x305A
|
||||||
|
#define EGL_RED_SIZE 0x3024
|
||||||
|
#define EGL_SAMPLES 0x3031
|
||||||
|
#define EGL_SAMPLE_BUFFERS 0x3032
|
||||||
|
#define EGL_SLOW_CONFIG 0x3050
|
||||||
|
#define EGL_STENCIL_SIZE 0x3026
|
||||||
|
#define EGL_SUCCESS 0x3000
|
||||||
|
#define EGL_SURFACE_TYPE 0x3033
|
||||||
|
#define EGL_TRANSPARENT_BLUE_VALUE 0x3035
|
||||||
|
#define EGL_TRANSPARENT_GREEN_VALUE 0x3036
|
||||||
|
#define EGL_TRANSPARENT_RED_VALUE 0x3037
|
||||||
|
#define EGL_TRANSPARENT_RGB 0x3052
|
||||||
|
#define EGL_TRANSPARENT_TYPE 0x3034
|
||||||
|
#define EGL_TRUE 1
|
||||||
|
#define EGL_VENDOR 0x3053
|
||||||
|
#define EGL_VERSION 0x3054
|
||||||
|
#define EGL_WIDTH 0x3057
|
||||||
|
#define EGL_WINDOW_BIT 0x0004
|
||||||
|
typedef EGLBoolean (EGLAPIENTRYP PFNEGLCHOOSECONFIGPROC) (EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config);
|
||||||
|
typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOPYBUFFERSPROC) (EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target);
|
||||||
|
typedef EGLContext (EGLAPIENTRYP PFNEGLCREATECONTEXTPROC) (EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list);
|
||||||
|
typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPBUFFERSURFACEPROC) (EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list);
|
||||||
|
typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPIXMAPSURFACEPROC) (EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list);
|
||||||
|
typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEWINDOWSURFACEPROC) (EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list);
|
||||||
|
typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYCONTEXTPROC) (EGLDisplay dpy, EGLContext ctx);
|
||||||
|
typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSURFACEPROC) (EGLDisplay dpy, EGLSurface surface);
|
||||||
|
typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETCONFIGATTRIBPROC) (EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value);
|
||||||
|
typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETCONFIGSPROC) (EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config);
|
||||||
|
typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETCURRENTDISPLAYPROC) (void);
|
||||||
|
typedef EGLSurface (EGLAPIENTRYP PFNEGLGETCURRENTSURFACEPROC) (EGLint readdraw);
|
||||||
|
typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETDISPLAYPROC) (EGLNativeDisplayType display_id);
|
||||||
|
typedef EGLint (EGLAPIENTRYP PFNEGLGETERRORPROC) (void);
|
||||||
|
typedef __eglMustCastToProperFunctionPointerType (EGLAPIENTRYP PFNEGLGETPROCADDRESSPROC) (const char *procname);
|
||||||
|
typedef EGLBoolean (EGLAPIENTRYP PFNEGLINITIALIZEPROC) (EGLDisplay dpy, EGLint *major, EGLint *minor);
|
||||||
|
typedef EGLBoolean (EGLAPIENTRYP PFNEGLMAKECURRENTPROC) (EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx);
|
||||||
|
typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYCONTEXTPROC) (EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value);
|
||||||
|
typedef const char *(EGLAPIENTRYP PFNEGLQUERYSTRINGPROC) (EGLDisplay dpy, EGLint name);
|
||||||
|
typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSURFACEPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value);
|
||||||
|
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSPROC) (EGLDisplay dpy, EGLSurface surface);
|
||||||
|
typedef EGLBoolean (EGLAPIENTRYP PFNEGLTERMINATEPROC) (EGLDisplay dpy);
|
||||||
|
typedef EGLBoolean (EGLAPIENTRYP PFNEGLWAITGLPROC) (void);
|
||||||
|
typedef EGLBoolean (EGLAPIENTRYP PFNEGLWAITNATIVEPROC) (EGLint engine);
|
||||||
|
#if EGL_EGL_PROTOTYPES
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig (EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers (EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target);
|
||||||
|
EGLAPI EGLContext EGLAPIENTRY eglCreateContext (EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list);
|
||||||
|
EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface (EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list);
|
||||||
|
EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface (EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list);
|
||||||
|
EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface (EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglDestroyContext (EGLDisplay dpy, EGLContext ctx);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglDestroySurface (EGLDisplay dpy, EGLSurface surface);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigAttrib (EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigs (EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config);
|
||||||
|
EGLAPI EGLDisplay EGLAPIENTRY eglGetCurrentDisplay (void);
|
||||||
|
EGLAPI EGLSurface EGLAPIENTRY eglGetCurrentSurface (EGLint readdraw);
|
||||||
|
EGLAPI EGLDisplay EGLAPIENTRY eglGetDisplay (EGLNativeDisplayType display_id);
|
||||||
|
EGLAPI EGLint EGLAPIENTRY eglGetError (void);
|
||||||
|
EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY eglGetProcAddress (const char *procname);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglInitialize (EGLDisplay dpy, EGLint *major, EGLint *minor);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglMakeCurrent (EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglQueryContext (EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value);
|
||||||
|
EGLAPI const char *EGLAPIENTRY eglQueryString (EGLDisplay dpy, EGLint name);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers (EGLDisplay dpy, EGLSurface surface);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglTerminate (EGLDisplay dpy);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglWaitGL (void);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative (EGLint engine);
|
||||||
|
#endif
|
||||||
|
#endif /* EGL_VERSION_1_0 */
|
||||||
|
|
||||||
|
#ifndef EGL_VERSION_1_1
|
||||||
|
#define EGL_VERSION_1_1 1
|
||||||
|
#define EGL_BACK_BUFFER 0x3084
|
||||||
|
#define EGL_BIND_TO_TEXTURE_RGB 0x3039
|
||||||
|
#define EGL_BIND_TO_TEXTURE_RGBA 0x303A
|
||||||
|
#define EGL_CONTEXT_LOST 0x300E
|
||||||
|
#define EGL_MIN_SWAP_INTERVAL 0x303B
|
||||||
|
#define EGL_MAX_SWAP_INTERVAL 0x303C
|
||||||
|
#define EGL_MIPMAP_TEXTURE 0x3082
|
||||||
|
#define EGL_MIPMAP_LEVEL 0x3083
|
||||||
|
#define EGL_NO_TEXTURE 0x305C
|
||||||
|
#define EGL_TEXTURE_2D 0x305F
|
||||||
|
#define EGL_TEXTURE_FORMAT 0x3080
|
||||||
|
#define EGL_TEXTURE_RGB 0x305D
|
||||||
|
#define EGL_TEXTURE_RGBA 0x305E
|
||||||
|
#define EGL_TEXTURE_TARGET 0x3081
|
||||||
|
typedef EGLBoolean (EGLAPIENTRYP PFNEGLBINDTEXIMAGEPROC) (EGLDisplay dpy, EGLSurface surface, EGLint buffer);
|
||||||
|
typedef EGLBoolean (EGLAPIENTRYP PFNEGLRELEASETEXIMAGEPROC) (EGLDisplay dpy, EGLSurface surface, EGLint buffer);
|
||||||
|
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSURFACEATTRIBPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value);
|
||||||
|
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPINTERVALPROC) (EGLDisplay dpy, EGLint interval);
|
||||||
|
#if EGL_EGL_PROTOTYPES
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglSurfaceAttrib (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval (EGLDisplay dpy, EGLint interval);
|
||||||
|
#endif
|
||||||
|
#endif /* EGL_VERSION_1_1 */
|
||||||
|
|
||||||
|
#ifndef EGL_VERSION_1_2
|
||||||
|
#define EGL_VERSION_1_2 1
|
||||||
|
typedef unsigned int EGLenum;
|
||||||
|
typedef void *EGLClientBuffer;
|
||||||
|
#define EGL_ALPHA_FORMAT 0x3088
|
||||||
|
#define EGL_ALPHA_FORMAT_NONPRE 0x308B
|
||||||
|
#define EGL_ALPHA_FORMAT_PRE 0x308C
|
||||||
|
#define EGL_ALPHA_MASK_SIZE 0x303E
|
||||||
|
#define EGL_BUFFER_PRESERVED 0x3094
|
||||||
|
#define EGL_BUFFER_DESTROYED 0x3095
|
||||||
|
#define EGL_CLIENT_APIS 0x308D
|
||||||
|
#define EGL_COLORSPACE 0x3087
|
||||||
|
#define EGL_COLORSPACE_sRGB 0x3089
|
||||||
|
#define EGL_COLORSPACE_LINEAR 0x308A
|
||||||
|
#define EGL_COLOR_BUFFER_TYPE 0x303F
|
||||||
|
#define EGL_CONTEXT_CLIENT_TYPE 0x3097
|
||||||
|
#define EGL_DISPLAY_SCALING 10000
|
||||||
|
#define EGL_HORIZONTAL_RESOLUTION 0x3090
|
||||||
|
#define EGL_LUMINANCE_BUFFER 0x308F
|
||||||
|
#define EGL_LUMINANCE_SIZE 0x303D
|
||||||
|
#define EGL_OPENGL_ES_BIT 0x0001
|
||||||
|
#define EGL_OPENVG_BIT 0x0002
|
||||||
|
#define EGL_OPENGL_ES_API 0x30A0
|
||||||
|
#define EGL_OPENVG_API 0x30A1
|
||||||
|
#define EGL_OPENVG_IMAGE 0x3096
|
||||||
|
#define EGL_PIXEL_ASPECT_RATIO 0x3092
|
||||||
|
#define EGL_RENDERABLE_TYPE 0x3040
|
||||||
|
#define EGL_RENDER_BUFFER 0x3086
|
||||||
|
#define EGL_RGB_BUFFER 0x308E
|
||||||
|
#define EGL_SINGLE_BUFFER 0x3085
|
||||||
|
#define EGL_SWAP_BEHAVIOR 0x3093
|
||||||
|
#define EGL_UNKNOWN EGL_CAST(EGLint,-1)
|
||||||
|
#define EGL_VERTICAL_RESOLUTION 0x3091
|
||||||
|
typedef EGLBoolean (EGLAPIENTRYP PFNEGLBINDAPIPROC) (EGLenum api);
|
||||||
|
typedef EGLenum (EGLAPIENTRYP PFNEGLQUERYAPIPROC) (void);
|
||||||
|
typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPBUFFERFROMCLIENTBUFFERPROC) (EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list);
|
||||||
|
typedef EGLBoolean (EGLAPIENTRYP PFNEGLRELEASETHREADPROC) (void);
|
||||||
|
typedef EGLBoolean (EGLAPIENTRYP PFNEGLWAITCLIENTPROC) (void);
|
||||||
|
#if EGL_EGL_PROTOTYPES
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglBindAPI (EGLenum api);
|
||||||
|
EGLAPI EGLenum EGLAPIENTRY eglQueryAPI (void);
|
||||||
|
EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer (EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglReleaseThread (void);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglWaitClient (void);
|
||||||
|
#endif
|
||||||
|
#endif /* EGL_VERSION_1_2 */
|
||||||
|
|
||||||
|
#ifndef EGL_VERSION_1_3
|
||||||
|
#define EGL_VERSION_1_3 1
|
||||||
|
#define EGL_CONFORMANT 0x3042
|
||||||
|
#define EGL_CONTEXT_CLIENT_VERSION 0x3098
|
||||||
|
#define EGL_MATCH_NATIVE_PIXMAP 0x3041
|
||||||
|
#define EGL_OPENGL_ES2_BIT 0x0004
|
||||||
|
#define EGL_VG_ALPHA_FORMAT 0x3088
|
||||||
|
#define EGL_VG_ALPHA_FORMAT_NONPRE 0x308B
|
||||||
|
#define EGL_VG_ALPHA_FORMAT_PRE 0x308C
|
||||||
|
#define EGL_VG_ALPHA_FORMAT_PRE_BIT 0x0040
|
||||||
|
#define EGL_VG_COLORSPACE 0x3087
|
||||||
|
#define EGL_VG_COLORSPACE_sRGB 0x3089
|
||||||
|
#define EGL_VG_COLORSPACE_LINEAR 0x308A
|
||||||
|
#define EGL_VG_COLORSPACE_LINEAR_BIT 0x0020
|
||||||
|
#endif /* EGL_VERSION_1_3 */
|
||||||
|
|
||||||
|
#ifndef EGL_VERSION_1_4
|
||||||
|
#define EGL_VERSION_1_4 1
|
||||||
|
#define EGL_DEFAULT_DISPLAY EGL_CAST(EGLNativeDisplayType,0)
|
||||||
|
#define EGL_MULTISAMPLE_RESOLVE_BOX_BIT 0x0200
|
||||||
|
#define EGL_MULTISAMPLE_RESOLVE 0x3099
|
||||||
|
#define EGL_MULTISAMPLE_RESOLVE_DEFAULT 0x309A
|
||||||
|
#define EGL_MULTISAMPLE_RESOLVE_BOX 0x309B
|
||||||
|
#define EGL_OPENGL_API 0x30A2
|
||||||
|
#define EGL_OPENGL_BIT 0x0008
|
||||||
|
#define EGL_SWAP_BEHAVIOR_PRESERVED_BIT 0x0400
|
||||||
|
typedef EGLContext (EGLAPIENTRYP PFNEGLGETCURRENTCONTEXTPROC) (void);
|
||||||
|
#if EGL_EGL_PROTOTYPES
|
||||||
|
EGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext (void);
|
||||||
|
#endif
|
||||||
|
#endif /* EGL_VERSION_1_4 */
|
||||||
|
|
||||||
|
#ifndef EGL_VERSION_1_5
|
||||||
|
#define EGL_VERSION_1_5 1
|
||||||
|
typedef void *EGLSync;
|
||||||
|
typedef intptr_t EGLAttrib;
|
||||||
|
typedef khronos_utime_nanoseconds_t EGLTime;
|
||||||
|
typedef void *EGLImage;
|
||||||
|
#define EGL_CONTEXT_MAJOR_VERSION 0x3098
|
||||||
|
#define EGL_CONTEXT_MINOR_VERSION 0x30FB
|
||||||
|
#define EGL_CONTEXT_OPENGL_PROFILE_MASK 0x30FD
|
||||||
|
#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY 0x31BD
|
||||||
|
#define EGL_NO_RESET_NOTIFICATION 0x31BE
|
||||||
|
#define EGL_LOSE_CONTEXT_ON_RESET 0x31BF
|
||||||
|
#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT 0x00000001
|
||||||
|
#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT 0x00000002
|
||||||
|
#define EGL_CONTEXT_OPENGL_DEBUG 0x31B0
|
||||||
|
#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE 0x31B1
|
||||||
|
#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS 0x31B2
|
||||||
|
#define EGL_OPENGL_ES3_BIT 0x00000040
|
||||||
|
#define EGL_CL_EVENT_HANDLE 0x309C
|
||||||
|
#define EGL_SYNC_CL_EVENT 0x30FE
|
||||||
|
#define EGL_SYNC_CL_EVENT_COMPLETE 0x30FF
|
||||||
|
#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE 0x30F0
|
||||||
|
#define EGL_SYNC_TYPE 0x30F7
|
||||||
|
#define EGL_SYNC_STATUS 0x30F1
|
||||||
|
#define EGL_SYNC_CONDITION 0x30F8
|
||||||
|
#define EGL_SIGNALED 0x30F2
|
||||||
|
#define EGL_UNSIGNALED 0x30F3
|
||||||
|
#define EGL_SYNC_FLUSH_COMMANDS_BIT 0x0001
|
||||||
|
#define EGL_FOREVER 0xFFFFFFFFFFFFFFFFull
|
||||||
|
#define EGL_TIMEOUT_EXPIRED 0x30F5
|
||||||
|
#define EGL_CONDITION_SATISFIED 0x30F6
|
||||||
|
#define EGL_NO_SYNC EGL_CAST(EGLSync,0)
|
||||||
|
#define EGL_SYNC_FENCE 0x30F9
|
||||||
|
#define EGL_GL_COLORSPACE 0x309D
|
||||||
|
#define EGL_GL_COLORSPACE_SRGB 0x3089
|
||||||
|
#define EGL_GL_COLORSPACE_LINEAR 0x308A
|
||||||
|
#define EGL_GL_RENDERBUFFER 0x30B9
|
||||||
|
#define EGL_GL_TEXTURE_2D 0x30B1
|
||||||
|
#define EGL_GL_TEXTURE_LEVEL 0x30BC
|
||||||
|
#define EGL_GL_TEXTURE_3D 0x30B2
|
||||||
|
#define EGL_GL_TEXTURE_ZOFFSET 0x30BD
|
||||||
|
#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x30B3
|
||||||
|
#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x30B4
|
||||||
|
#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x30B5
|
||||||
|
#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x30B6
|
||||||
|
#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x30B7
|
||||||
|
#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x30B8
|
||||||
|
#define EGL_IMAGE_PRESERVED 0x30D2
|
||||||
|
#define EGL_NO_IMAGE EGL_CAST(EGLImage,0)
|
||||||
|
typedef EGLSync (EGLAPIENTRYP PFNEGLCREATESYNCPROC) (EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list);
|
||||||
|
typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCPROC) (EGLDisplay dpy, EGLSync sync);
|
||||||
|
typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCPROC) (EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout);
|
||||||
|
typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBPROC) (EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib *value);
|
||||||
|
typedef EGLImage (EGLAPIENTRYP PFNEGLCREATEIMAGEPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib *attrib_list);
|
||||||
|
typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEPROC) (EGLDisplay dpy, EGLImage image);
|
||||||
|
typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYPROC) (EGLenum platform, void *native_display, const EGLAttrib *attrib_list);
|
||||||
|
typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMWINDOWSURFACEPROC) (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLAttrib *attrib_list);
|
||||||
|
typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMPIXMAPSURFACEPROC) (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLAttrib *attrib_list);
|
||||||
|
typedef EGLBoolean (EGLAPIENTRYP PFNEGLWAITSYNCPROC) (EGLDisplay dpy, EGLSync sync, EGLint flags);
|
||||||
|
#if EGL_EGL_PROTOTYPES
|
||||||
|
EGLAPI EGLSync EGLAPIENTRY eglCreateSync (EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglDestroySync (EGLDisplay dpy, EGLSync sync);
|
||||||
|
EGLAPI EGLint EGLAPIENTRY eglClientWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttrib (EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib *value);
|
||||||
|
EGLAPI EGLImage EGLAPIENTRY eglCreateImage (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib *attrib_list);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImage (EGLDisplay dpy, EGLImage image);
|
||||||
|
EGLAPI EGLDisplay EGLAPIENTRY eglGetPlatformDisplay (EGLenum platform, void *native_display, const EGLAttrib *attrib_list);
|
||||||
|
EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurface (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLAttrib *attrib_list);
|
||||||
|
EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurface (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLAttrib *attrib_list);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags);
|
||||||
|
#endif
|
||||||
|
#endif /* EGL_VERSION_1_5 */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,403 @@
|
|||||||
|
//
|
||||||
|
// Copyright 2017 The ANGLE Project Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
|
// found in the LICENSE file.
|
||||||
|
//
|
||||||
|
// eglext_angle.h: ANGLE modifications to the eglext.h header file.
|
||||||
|
// Currently we don't include this file directly, we patch eglext.h
|
||||||
|
// to include it implicitly so it is visible throughout our code.
|
||||||
|
|
||||||
|
#ifndef INCLUDE_EGL_EGLEXT_ANGLE_
|
||||||
|
#define INCLUDE_EGL_EGLEXT_ANGLE_
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_robust_resource_initialization
|
||||||
|
#define EGL_ANGLE_robust_resource_initialization 1
|
||||||
|
#define EGL_ROBUST_RESOURCE_INITIALIZATION_ANGLE 0x3453
|
||||||
|
#endif /* EGL_ANGLE_robust_resource_initialization */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_keyed_mutex
|
||||||
|
#define EGL_ANGLE_keyed_mutex 1
|
||||||
|
#define EGL_DXGI_KEYED_MUTEX_ANGLE 0x33A2
|
||||||
|
#endif /* EGL_ANGLE_keyed_mutex */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_d3d_texture_client_buffer
|
||||||
|
#define EGL_ANGLE_d3d_texture_client_buffer 1
|
||||||
|
#define EGL_D3D_TEXTURE_ANGLE 0x33A3
|
||||||
|
#define EGL_TEXTURE_OFFSET_X_ANGLE 0x3490
|
||||||
|
#define EGL_TEXTURE_OFFSET_Y_ANGLE 0x3491
|
||||||
|
#define EGL_D3D11_TEXTURE_PLANE_ANGLE 0x3492
|
||||||
|
#define EGL_D3D11_TEXTURE_ARRAY_SLICE_ANGLE 0x3493
|
||||||
|
#endif /* EGL_ANGLE_d3d_texture_client_buffer */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_software_display
|
||||||
|
#define EGL_ANGLE_software_display 1
|
||||||
|
#define EGL_SOFTWARE_DISPLAY_ANGLE ((EGLNativeDisplayType)-1)
|
||||||
|
#endif /* EGL_ANGLE_software_display */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_direct3d_display
|
||||||
|
#define EGL_ANGLE_direct3d_display 1
|
||||||
|
#define EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE ((EGLNativeDisplayType)-2)
|
||||||
|
#define EGL_D3D11_ONLY_DISPLAY_ANGLE ((EGLNativeDisplayType)-3)
|
||||||
|
#endif /* EGL_ANGLE_direct3d_display */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_direct_composition
|
||||||
|
#define EGL_ANGLE_direct_composition 1
|
||||||
|
#define EGL_DIRECT_COMPOSITION_ANGLE 0x33A5
|
||||||
|
#endif /* EGL_ANGLE_direct_composition */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_platform_angle
|
||||||
|
#define EGL_ANGLE_platform_angle 1
|
||||||
|
#define EGL_PLATFORM_ANGLE_ANGLE 0x3202
|
||||||
|
#define EGL_PLATFORM_ANGLE_TYPE_ANGLE 0x3203
|
||||||
|
#define EGL_PLATFORM_ANGLE_MAX_VERSION_MAJOR_ANGLE 0x3204
|
||||||
|
#define EGL_PLATFORM_ANGLE_MAX_VERSION_MINOR_ANGLE 0x3205
|
||||||
|
#define EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE 0x3206
|
||||||
|
#define EGL_PLATFORM_ANGLE_DEBUG_LAYERS_ENABLED_ANGLE 0x3451
|
||||||
|
#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE 0x3209
|
||||||
|
#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE 0x320A
|
||||||
|
#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE 0x345E
|
||||||
|
#define EGL_PLATFORM_ANGLE_NATIVE_PLATFORM_TYPE_ANGLE 0x348F
|
||||||
|
#endif /* EGL_ANGLE_platform_angle */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_platform_angle_d3d
|
||||||
|
#define EGL_ANGLE_platform_angle_d3d 1
|
||||||
|
#define EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE 0x3207
|
||||||
|
#define EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE 0x3208
|
||||||
|
#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_WARP_ANGLE 0x320B
|
||||||
|
#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_REFERENCE_ANGLE 0x320C
|
||||||
|
#define EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE 0x320F
|
||||||
|
#endif /* EGL_ANGLE_platform_angle_d3d */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_platform_angle_d3d_luid
|
||||||
|
#define EGL_ANGLE_platform_angle_d3d_luid 1
|
||||||
|
#define EGL_PLATFORM_ANGLE_D3D_LUID_HIGH_ANGLE 0x34A0
|
||||||
|
#define EGL_PLATFORM_ANGLE_D3D_LUID_LOW_ANGLE 0x34A1
|
||||||
|
#endif /* EGL_ANGLE_platform_angle_d3d_luid */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_platform_angle_d3d11on12
|
||||||
|
#define EGL_ANGLE_platform_angle_d3d11on12 1
|
||||||
|
#define EGL_PLATFORM_ANGLE_D3D11ON12_ANGLE 0x3488
|
||||||
|
#endif /* EGL_ANGLE_platform_angle_d3d11on12 */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_platform_angle_opengl
|
||||||
|
#define EGL_ANGLE_platform_angle_opengl 1
|
||||||
|
#define EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE 0x320D
|
||||||
|
#define EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE 0x320E
|
||||||
|
#define EGL_PLATFORM_ANGLE_EGL_HANDLE_ANGLE 0x3480
|
||||||
|
#endif /* EGL_ANGLE_platform_angle_opengl */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_platform_angle_null
|
||||||
|
#define EGL_ANGLE_platform_angle_null 1
|
||||||
|
#define EGL_PLATFORM_ANGLE_TYPE_NULL_ANGLE 0x33AE
|
||||||
|
#endif /* EGL_ANGLE_platform_angle_null */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_platform_angle_vulkan
|
||||||
|
#define EGL_ANGLE_platform_angle_vulkan 1
|
||||||
|
#define EGL_PLATFORM_ANGLE_TYPE_VULKAN_ANGLE 0x3450
|
||||||
|
#define EGL_PLATFORM_VULKAN_DISPLAY_MODE_SIMPLE_ANGLE 0x34A4
|
||||||
|
#define EGL_PLATFORM_VULKAN_DISPLAY_MODE_HEADLESS_ANGLE 0x34A5
|
||||||
|
#endif /* EGL_ANGLE_platform_angle_vulkan */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_platform_angle_metal
|
||||||
|
#define EGL_ANGLE_platform_angle_metal 1
|
||||||
|
#define EGL_PLATFORM_ANGLE_TYPE_METAL_ANGLE 0x3489
|
||||||
|
#endif /* EGL_ANGLE_platform_angle_metal */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_platform_angle_device_type_swiftshader
|
||||||
|
#define EGL_ANGLE_platform_angle_device_type_swiftshader
|
||||||
|
#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_SWIFTSHADER_ANGLE 0x3487
|
||||||
|
#endif /* EGL_ANGLE_platform_angle_device_type_swiftshader */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_platform_angle_device_type_egl_angle
|
||||||
|
#define EGL_ANGLE_platform_angle_device_type_egl_angle
|
||||||
|
#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_EGL_ANGLE 0x348E
|
||||||
|
#endif /* EGL_ANGLE_platform_angle_device_type_egl_angle */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_context_virtualization
|
||||||
|
#define EGL_ANGLE_context_virtualization 1
|
||||||
|
#define EGL_CONTEXT_VIRTUALIZATION_GROUP_ANGLE 0x3481
|
||||||
|
#endif /* EGL_ANGLE_context_virtualization */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_platform_angle_device_context_volatile_eagl
|
||||||
|
#define EGL_ANGLE_platform_angle_device_context_volatile_eagl 1
|
||||||
|
#define EGL_PLATFORM_ANGLE_DEVICE_CONTEXT_VOLATILE_EAGL_ANGLE 0x34A2
|
||||||
|
#endif /* EGL_ANGLE_platform_angle_device_context_volatile_eagl */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_platform_angle_device_context_volatile_cgl
|
||||||
|
#define EGL_ANGLE_platform_angle_device_context_volatile_cgl 1
|
||||||
|
#define EGL_PLATFORM_ANGLE_DEVICE_CONTEXT_VOLATILE_CGL_ANGLE 0x34A3
|
||||||
|
#endif /* EGL_ANGLE_platform_angle_device_context_volatile_cgl */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_platform_angle_device_id
|
||||||
|
#define EGL_ANGLE_platform_angle_device_id
|
||||||
|
#define EGL_PLATFORM_ANGLE_DEVICE_ID_HIGH_ANGLE 0x34D6
|
||||||
|
#define EGL_PLATFORM_ANGLE_DEVICE_ID_LOW_ANGLE 0x34D7
|
||||||
|
#endif /* EGL_ANGLE_platform_angle_device_id */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_x11_visual
|
||||||
|
#define EGL_ANGLE_x11_visual
|
||||||
|
#define EGL_X11_VISUAL_ID_ANGLE 0x33A3
|
||||||
|
#endif /* EGL_ANGLE_x11_visual */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_surface_orientation
|
||||||
|
#define EGL_ANGLE_surface_orientation
|
||||||
|
#define EGL_OPTIMAL_SURFACE_ORIENTATION_ANGLE 0x33A7
|
||||||
|
#define EGL_SURFACE_ORIENTATION_ANGLE 0x33A8
|
||||||
|
#define EGL_SURFACE_ORIENTATION_INVERT_X_ANGLE 0x0001
|
||||||
|
#define EGL_SURFACE_ORIENTATION_INVERT_Y_ANGLE 0x0002
|
||||||
|
#endif /* EGL_ANGLE_surface_orientation */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_experimental_present_path
|
||||||
|
#define EGL_ANGLE_experimental_present_path
|
||||||
|
#define EGL_EXPERIMENTAL_PRESENT_PATH_ANGLE 0x33A4
|
||||||
|
#define EGL_EXPERIMENTAL_PRESENT_PATH_FAST_ANGLE 0x33A9
|
||||||
|
#define EGL_EXPERIMENTAL_PRESENT_PATH_COPY_ANGLE 0x33AA
|
||||||
|
#endif /* EGL_ANGLE_experimental_present_path */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_stream_producer_d3d_texture
|
||||||
|
#define EGL_ANGLE_stream_producer_d3d_texture
|
||||||
|
#define EGL_D3D_TEXTURE_SUBRESOURCE_ID_ANGLE 0x33AB
|
||||||
|
typedef EGLBoolean(EGLAPIENTRYP PFNEGLCREATESTREAMPRODUCERD3DTEXTUREANGLEPROC)(EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list);
|
||||||
|
typedef EGLBoolean(EGLAPIENTRYP PFNEGLSTREAMPOSTD3DTEXTUREANGLEPROC)(EGLDisplay dpy, EGLStreamKHR stream, void *texture, const EGLAttrib *attrib_list);
|
||||||
|
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglCreateStreamProducerD3DTextureANGLE(EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglStreamPostD3DTextureANGLE(EGLDisplay dpy, EGLStreamKHR stream, void *texture, const EGLAttrib *attrib_list);
|
||||||
|
#endif
|
||||||
|
#endif /* EGL_ANGLE_stream_producer_d3d_texture */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_create_context_webgl_compatibility
|
||||||
|
#define EGL_ANGLE_create_context_webgl_compatibility 1
|
||||||
|
#define EGL_CONTEXT_WEBGL_COMPATIBILITY_ANGLE 0x33AC
|
||||||
|
#endif /* EGL_ANGLE_create_context_webgl_compatibility */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_display_texture_share_group
|
||||||
|
#define EGL_ANGLE_display_texture_share_group 1
|
||||||
|
#define EGL_DISPLAY_TEXTURE_SHARE_GROUP_ANGLE 0x33AF
|
||||||
|
#endif /* EGL_ANGLE_display_texture_share_group */
|
||||||
|
|
||||||
|
#ifndef EGL_CHROMIUM_create_context_bind_generates_resource
|
||||||
|
#define EGL_CHROMIUM_create_context_bind_generates_resource 1
|
||||||
|
#define EGL_CONTEXT_BIND_GENERATES_RESOURCE_CHROMIUM 0x33AD
|
||||||
|
#endif /* EGL_CHROMIUM_create_context_bind_generates_resource */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_metal_create_context_ownership_identity
|
||||||
|
#define EGL_ANGLE_metal_create_context_ownership_identity 1
|
||||||
|
#define EGL_CONTEXT_METAL_OWNERSHIP_IDENTITY_ANGLE 0x34D2
|
||||||
|
#endif /* EGL_ANGLE_metal_create_context_ownership_identity */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_create_context_client_arrays
|
||||||
|
#define EGL_ANGLE_create_context_client_arrays 1
|
||||||
|
#define EGL_CONTEXT_CLIENT_ARRAYS_ENABLED_ANGLE 0x3452
|
||||||
|
#endif /* EGL_ANGLE_create_context_client_arrays */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_device_creation
|
||||||
|
#define EGL_ANGLE_device_creation 1
|
||||||
|
typedef EGLDeviceEXT(EGLAPIENTRYP PFNEGLCREATEDEVICEANGLEPROC) (EGLint device_type, void *native_device, const EGLAttrib *attrib_list);
|
||||||
|
typedef EGLBoolean(EGLAPIENTRYP PFNEGLRELEASEDEVICEANGLEPROC) (EGLDeviceEXT device);
|
||||||
|
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||||
|
EGLAPI EGLDeviceEXT EGLAPIENTRY eglCreateDeviceANGLE(EGLint device_type, void *native_device, const EGLAttrib *attrib_list);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglReleaseDeviceANGLE(EGLDeviceEXT device);
|
||||||
|
#endif
|
||||||
|
#endif /* EGL_ANGLE_device_creation */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_program_cache_control
|
||||||
|
#define EGL_ANGLE_program_cache_control 1
|
||||||
|
#define EGL_PROGRAM_CACHE_SIZE_ANGLE 0x3455
|
||||||
|
#define EGL_PROGRAM_CACHE_KEY_LENGTH_ANGLE 0x3456
|
||||||
|
#define EGL_PROGRAM_CACHE_RESIZE_ANGLE 0x3457
|
||||||
|
#define EGL_PROGRAM_CACHE_TRIM_ANGLE 0x3458
|
||||||
|
#define EGL_CONTEXT_PROGRAM_BINARY_CACHE_ENABLED_ANGLE 0x3459
|
||||||
|
typedef EGLint (EGLAPIENTRYP PFNEGLPROGRAMCACHEGETATTRIBANGLEPROC) (EGLDisplay dpy, EGLenum attrib);
|
||||||
|
typedef void (EGLAPIENTRYP PFNEGLPROGRAMCACHEQUERYANGLEPROC) (EGLDisplay dpy, EGLint index, void *key, EGLint *keysize, void *binary, EGLint *binarysize);
|
||||||
|
typedef void (EGLAPIENTRYP PFNEGLPROGRAMCACHEPOPULATEANGLEPROC) (EGLDisplay dpy, const void *key, EGLint keysize, const void *binary, EGLint binarysize);
|
||||||
|
typedef EGLint (EGLAPIENTRYP PFNEGLPROGRAMCACHERESIZEANGLEPROC) (EGLDisplay dpy, EGLint limit, EGLint mode);
|
||||||
|
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||||
|
EGLAPI EGLint EGLAPIENTRY eglProgramCacheGetAttribANGLE(EGLDisplay dpy, EGLenum attrib);
|
||||||
|
EGLAPI void EGLAPIENTRY eglProgramCacheQueryANGLE(EGLDisplay dpy, EGLint index, void *key, EGLint *keysize, void *binary, EGLint *binarysize);
|
||||||
|
EGLAPI void EGLAPIENTRY eglProgramCachePopulateANGLE(EGLDisplay dpy, const void *key, EGLint keysize, const void *binary, EGLint binarysize);
|
||||||
|
EGLAPI EGLint EGLAPIENTRY eglProgramCacheResizeANGLE(EGLDisplay dpy, EGLint limit, EGLint mode);
|
||||||
|
#endif
|
||||||
|
#endif /* EGL_ANGLE_program_cache_control */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_iosurface_client_buffer
|
||||||
|
#define EGL_ANGLE_iosurface_client_buffer 1
|
||||||
|
#define EGL_IOSURFACE_ANGLE 0x3454
|
||||||
|
#define EGL_IOSURFACE_PLANE_ANGLE 0x345A
|
||||||
|
#define EGL_TEXTURE_RECTANGLE_ANGLE 0x345B
|
||||||
|
#define EGL_TEXTURE_TYPE_ANGLE 0x345C
|
||||||
|
#define EGL_TEXTURE_INTERNAL_FORMAT_ANGLE 0x345D
|
||||||
|
#define EGL_IOSURFACE_USAGE_HINT_ANGLE 0x348A
|
||||||
|
#define EGL_IOSURFACE_READ_HINT_ANGLE 0x0001
|
||||||
|
#define EGL_IOSURFACE_WRITE_HINT_ANGLE 0x0002
|
||||||
|
#define EGL_BIND_TO_TEXTURE_TARGET_ANGLE 0x348D
|
||||||
|
#endif /* EGL_ANGLE_iosurface_client_buffer */
|
||||||
|
|
||||||
|
#ifndef ANGLE_metal_texture_client_buffer
|
||||||
|
#define ANGLE_metal_texture_client_buffer 1
|
||||||
|
#define EGL_METAL_TEXTURE_ANGLE 0x34A7
|
||||||
|
#endif /* ANGLE_metal_texture_client_buffer */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_create_context_extensions_enabled
|
||||||
|
#define EGL_ANGLE_create_context_extensions_enabled 1
|
||||||
|
#define EGL_EXTENSIONS_ENABLED_ANGLE 0x345F
|
||||||
|
#endif /* EGL_ANGLE_create_context_extensions_enabled */
|
||||||
|
|
||||||
|
#ifndef EGL_CHROMIUM_sync_control
|
||||||
|
#define EGL_CHROMIUM_sync_control 1
|
||||||
|
typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCVALUESCHROMIUMPROC) (EGLDisplay dpy,
|
||||||
|
EGLSurface surface,
|
||||||
|
EGLuint64KHR *ust,
|
||||||
|
EGLuint64KHR *msc,
|
||||||
|
EGLuint64KHR *sbc);
|
||||||
|
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncValuesCHROMIUM(EGLDisplay dpy,
|
||||||
|
EGLSurface surface,
|
||||||
|
EGLuint64KHR *ust,
|
||||||
|
EGLuint64KHR *msc,
|
||||||
|
EGLuint64KHR *sbc);
|
||||||
|
#endif
|
||||||
|
#endif /* EGL_CHROMIUM_sync_control */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_sync_control_rate
|
||||||
|
#define EGL_ANGLE_sync_control_rate 1
|
||||||
|
typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETMSCRATEANGLEPROC) (EGLDisplay dpy,
|
||||||
|
EGLSurface surface,
|
||||||
|
EGLint *numerator,
|
||||||
|
EGLint *denominator);
|
||||||
|
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglGetMscRateANGLE(EGLDisplay dpy,
|
||||||
|
EGLSurface surface,
|
||||||
|
EGLint *numerator,
|
||||||
|
EGLint *denominator);
|
||||||
|
#endif
|
||||||
|
#endif /* EGL_ANGLE_sync_control_rate */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_power_preference
|
||||||
|
#define EGL_ANGLE_power_preference 1
|
||||||
|
#define EGL_POWER_PREFERENCE_ANGLE 0x3482
|
||||||
|
#define EGL_LOW_POWER_ANGLE 0x0001
|
||||||
|
#define EGL_HIGH_POWER_ANGLE 0x0002
|
||||||
|
typedef void(EGLAPIENTRYP PFNEGLRELEASEHIGHPOWERGPUANGLEPROC) (EGLDisplay dpy, EGLContext ctx);
|
||||||
|
typedef void(EGLAPIENTRYP PFNEGLREACQUIREHIGHPOWERGPUANGLEPROC) (EGLDisplay dpy, EGLContext ctx);
|
||||||
|
typedef void(EGLAPIENTRYP PFNEGLHANDLEGPUSWITCHANGLEPROC) (EGLDisplay dpy);
|
||||||
|
typedef void(EGLAPIENTRYP PFNEGLFORCEGPUSWITCHANGLEPROC) (EGLDisplay dpy, EGLint gpuIDHigh, EGLint gpuIDLow);
|
||||||
|
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||||
|
EGLAPI void EGLAPIENTRY eglReleaseHighPowerGPUANGLE(EGLDisplay dpy, EGLContext ctx);
|
||||||
|
EGLAPI void EGLAPIENTRY eglReacquireHighPowerGPUANGLE(EGLDisplay dpy, EGLContext ctx);
|
||||||
|
EGLAPI void EGLAPIENTRY eglHandleGPUSwitchANGLE(EGLDisplay dpy);
|
||||||
|
EGLAPI void EGLAPIENTRY eglForceGPUSwitchANGLE(EGLDisplay dpy, EGLint gpuIDHigh, EGLint gpuIDLow);
|
||||||
|
#endif
|
||||||
|
#endif /* EGL_ANGLE_power_preference */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_feature_control
|
||||||
|
#define EGL_ANGLE_feature_control 1
|
||||||
|
#define EGL_FEATURE_NAME_ANGLE 0x3460
|
||||||
|
#define EGL_FEATURE_CATEGORY_ANGLE 0x3461
|
||||||
|
#define EGL_FEATURE_DESCRIPTION_ANGLE 0x3462
|
||||||
|
#define EGL_FEATURE_BUG_ANGLE 0x3463
|
||||||
|
#define EGL_FEATURE_STATUS_ANGLE 0x3464
|
||||||
|
#define EGL_FEATURE_COUNT_ANGLE 0x3465
|
||||||
|
#define EGL_FEATURE_OVERRIDES_ENABLED_ANGLE 0x3466
|
||||||
|
#define EGL_FEATURE_OVERRIDES_DISABLED_ANGLE 0x3467
|
||||||
|
#define EGL_FEATURE_CONDITION_ANGLE 0x3468
|
||||||
|
#define EGL_FEATURE_ALL_DISABLED_ANGLE 0x3469
|
||||||
|
typedef const char *(EGLAPIENTRYP PFNEGLQUERYSTRINGIANGLEPROC) (EGLDisplay dpy, EGLint name, EGLint index);
|
||||||
|
typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDISPLAYATTRIBANGLEPROC) (EGLDisplay dpy, EGLint attribute, EGLAttrib *value);
|
||||||
|
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||||
|
EGLAPI const char *EGLAPIENTRY eglQueryStringiANGLE(EGLDisplay dpy, EGLint name, EGLint index);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglQueryDisplayAttribANGLE(EGLDisplay dpy, EGLint attribute, EGLAttrib *value);
|
||||||
|
#endif
|
||||||
|
#endif /* EGL_ANGLE_feature_control */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_image_d3d11_texture
|
||||||
|
#define EGL_D3D11_TEXTURE_ANGLE 0x3484
|
||||||
|
#define EGL_TEXTURE_INTERNAL_FORMAT_ANGLE 0x345D
|
||||||
|
#endif /* EGL_ANGLE_image_d3d11_texture */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_create_context_backwards_compatible
|
||||||
|
#define EGL_ANGLE_create_context_backwards_compatible 1
|
||||||
|
#define EGL_CONTEXT_OPENGL_BACKWARDS_COMPATIBLE_ANGLE 0x3483
|
||||||
|
#endif /* EGL_ANGLE_create_context_backwards_compatible */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_device_cgl
|
||||||
|
#define EGL_ANGLE_device_cgl 1
|
||||||
|
#define EGL_CGL_CONTEXT_ANGLE 0x3485
|
||||||
|
#define EGL_CGL_PIXEL_FORMAT_ANGLE 0x3486
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_ggp_stream_descriptor
|
||||||
|
#define EGL_ANGLE_ggp_stream_descriptor 1
|
||||||
|
#define EGL_GGP_STREAM_DESCRIPTOR_ANGLE 0x348B
|
||||||
|
#endif /* EGL_ANGLE_ggp_stream_descriptor */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_swap_with_frame_token
|
||||||
|
#define EGL_ANGLE_swap_with_frame_token 1
|
||||||
|
typedef khronos_uint64_t EGLFrameTokenANGLE;
|
||||||
|
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHFRAMETOKENANGLEPROC)(EGLDisplay dpy, EGLSurface surface, EGLFrameTokenANGLE frametoken);
|
||||||
|
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersWithFrameTokenANGLE(EGLDisplay dpy, EGLSurface surface, EGLFrameTokenANGLE frametoken);
|
||||||
|
#endif
|
||||||
|
#endif /* EGL_ANGLE_swap_with_frame_token */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_prepare_swap_buffers
|
||||||
|
#define EGL_ANGLE_prepare_swap_buffers 1
|
||||||
|
typedef EGLBoolean (EGLAPIENTRYP PFNEGLPREPARESWAPBUFFERSANGLEPROC)(EGLDisplay dpy, EGLSurface surface);
|
||||||
|
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglPrepareSwapBuffersANGLE(EGLDisplay dpy, EGLSurface surface);
|
||||||
|
#endif
|
||||||
|
#endif /* EGL_ANGLE_prepare_swap_buffers */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_device_eagl
|
||||||
|
#define EGL_ANGLE_device_eagl 1
|
||||||
|
#define EGL_EAGL_CONTEXT_ANGLE 0x348C
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_device_metal
|
||||||
|
#define EGL_ANGLE_device_metal 1
|
||||||
|
#define EGL_METAL_DEVICE_ANGLE 0x34A6
|
||||||
|
#endif /* EGL_ANGLE_device_metal */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_display_semaphore_share_group
|
||||||
|
#define EGL_ANGLE_display_semaphore_share_group 1
|
||||||
|
#define EGL_DISPLAY_SEMAPHORE_SHARE_GROUP_ANGLE 0x348D
|
||||||
|
#endif /* EGL_ANGLE_display_semaphore_share_group */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_external_context_and_surface
|
||||||
|
#define EGL_ANGLE_external_context_and_surface 1
|
||||||
|
#define EGL_EXTERNAL_CONTEXT_ANGLE 0x348E
|
||||||
|
#define EGL_EXTERNAL_SURFACE_ANGLE 0x348F
|
||||||
|
#define EGL_EXTERNAL_CONTEXT_SAVE_STATE_ANGLE 0x3490
|
||||||
|
#endif /* EGL_ANGLE_external_context_and_surface */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_create_surface_swap_interval
|
||||||
|
#define EGL_ANGLE_create_surface_swap_interval 1
|
||||||
|
#define EGL_SWAP_INTERVAL_ANGLE 0x322F
|
||||||
|
#endif /* EGL_ANGLE_create_surface_swap_interval */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_device_vulkan
|
||||||
|
#define EGL_ANGLE_device_vulkan 1
|
||||||
|
#define EGL_VULKAN_VERSION_ANGLE 0x34A8
|
||||||
|
#define EGL_VULKAN_INSTANCE_ANGLE 0x34A9
|
||||||
|
#define EGL_VULKAN_INSTANCE_EXTENSIONS_ANGLE 0x34AA
|
||||||
|
#define EGL_VULKAN_PHYSICAL_DEVICE_ANGLE 0x34AB
|
||||||
|
#define EGL_VULKAN_DEVICE_ANGLE 0x34AC
|
||||||
|
#define EGL_VULKAN_DEVICE_EXTENSIONS_ANGLE 0x34AD
|
||||||
|
#define EGL_VULKAN_FEATURES_ANGLE 0x34AE
|
||||||
|
#define EGL_VULKAN_QUEUE_ANGLE 0x34AF
|
||||||
|
#define EGL_VULKAN_QUEUE_FAMILIY_INDEX_ANGLE 0x34D0
|
||||||
|
#define EGL_VULKAN_GET_INSTANCE_PROC_ADDR 0x34D1
|
||||||
|
#endif /* EGL_ANGLE_device_vulkan */
|
||||||
|
|
||||||
|
#ifndef EGL_ANGLE_vulkan_image
|
||||||
|
#define EGL_ANGLE_vulkan_image
|
||||||
|
#define EGL_VULKAN_IMAGE_ANGLE 0x34D3
|
||||||
|
#define EGL_VULKAN_IMAGE_CREATE_INFO_HI_ANGLE 0x34D4
|
||||||
|
#define EGL_VULKAN_IMAGE_CREATE_INFO_LO_ANGLE 0x34D5
|
||||||
|
typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTVKIMAGEANGLEPROC)(EGLDisplay dpy, EGLImage image, void* vk_image, void* vk_image_create_info);
|
||||||
|
#endif /* EGL_ANGLE_vulkan_image */
|
||||||
|
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
|
#endif // INCLUDE_EGL_EGLEXT_ANGLE_
|
||||||
@@ -0,0 +1,175 @@
|
|||||||
|
#ifndef __eglplatform_h_
|
||||||
|
#define __eglplatform_h_
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Copyright 2007-2020 The Khronos Group Inc.
|
||||||
|
** SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Platform-specific types and definitions for egl.h
|
||||||
|
*
|
||||||
|
* Adopters may modify khrplatform.h and this file to suit their platform.
|
||||||
|
* You are encouraged to submit all modifications to the Khronos group so that
|
||||||
|
* they can be included in future versions of this file. Please submit changes
|
||||||
|
* by filing an issue or pull request on the public Khronos EGL Registry, at
|
||||||
|
* https://www.github.com/KhronosGroup/EGL-Registry/
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <KHR/khrplatform.h>
|
||||||
|
|
||||||
|
/* Macros used in EGL function prototype declarations.
|
||||||
|
*
|
||||||
|
* EGL functions should be prototyped as:
|
||||||
|
*
|
||||||
|
* EGLAPI return-type EGLAPIENTRY eglFunction(arguments);
|
||||||
|
* typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments);
|
||||||
|
*
|
||||||
|
* KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef EGLAPI
|
||||||
|
#define EGLAPI KHRONOS_APICALL
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef EGLAPIENTRY
|
||||||
|
#define EGLAPIENTRY KHRONOS_APIENTRY
|
||||||
|
#endif
|
||||||
|
#define EGLAPIENTRYP EGLAPIENTRY*
|
||||||
|
|
||||||
|
/* The types NativeDisplayType, NativeWindowType, and NativePixmapType
|
||||||
|
* are aliases of window-system-dependent types, such as X Display * or
|
||||||
|
* Windows Device Context. They must be defined in platform-specific
|
||||||
|
* code below. The EGL-prefixed versions of Native*Type are the same
|
||||||
|
* types, renamed in EGL 1.3 so all types in the API start with "EGL".
|
||||||
|
*
|
||||||
|
* Khronos STRONGLY RECOMMENDS that you use the default definitions
|
||||||
|
* provided below, since these changes affect both binary and source
|
||||||
|
* portability of applications using EGL running on different EGL
|
||||||
|
* implementations.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined(EGL_NO_PLATFORM_SPECIFIC_TYPES)
|
||||||
|
|
||||||
|
typedef void *EGLNativeDisplayType;
|
||||||
|
typedef void *EGLNativePixmapType;
|
||||||
|
typedef void *EGLNativeWindowType;
|
||||||
|
|
||||||
|
#elif defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
#define WIN32_LEAN_AND_MEAN 1
|
||||||
|
#endif
|
||||||
|
#include <windows.h>
|
||||||
|
|
||||||
|
typedef HDC EGLNativeDisplayType;
|
||||||
|
typedef HBITMAP EGLNativePixmapType;
|
||||||
|
|
||||||
|
#if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP) /* Windows Desktop */
|
||||||
|
typedef HWND EGLNativeWindowType;
|
||||||
|
#else /* Windows Store */
|
||||||
|
#include <inspectable.h>
|
||||||
|
typedef IInspectable* EGLNativeWindowType;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#elif defined(__EMSCRIPTEN__)
|
||||||
|
|
||||||
|
typedef int EGLNativeDisplayType;
|
||||||
|
typedef int EGLNativePixmapType;
|
||||||
|
typedef int EGLNativeWindowType;
|
||||||
|
|
||||||
|
#elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */
|
||||||
|
|
||||||
|
typedef int EGLNativeDisplayType;
|
||||||
|
typedef void *EGLNativePixmapType;
|
||||||
|
typedef void *EGLNativeWindowType;
|
||||||
|
|
||||||
|
#elif defined(WL_EGL_PLATFORM)
|
||||||
|
|
||||||
|
typedef struct wl_display *EGLNativeDisplayType;
|
||||||
|
typedef struct wl_egl_pixmap *EGLNativePixmapType;
|
||||||
|
typedef struct wl_egl_window *EGLNativeWindowType;
|
||||||
|
|
||||||
|
#elif defined(__GBM__)
|
||||||
|
|
||||||
|
typedef struct gbm_device *EGLNativeDisplayType;
|
||||||
|
typedef struct gbm_bo *EGLNativePixmapType;
|
||||||
|
typedef void *EGLNativeWindowType;
|
||||||
|
|
||||||
|
#elif defined(__ANDROID__) || defined(ANDROID)
|
||||||
|
|
||||||
|
struct ANativeWindow;
|
||||||
|
struct egl_native_pixmap_t;
|
||||||
|
|
||||||
|
typedef void* EGLNativeDisplayType;
|
||||||
|
typedef struct egl_native_pixmap_t* EGLNativePixmapType;
|
||||||
|
typedef struct ANativeWindow* EGLNativeWindowType;
|
||||||
|
|
||||||
|
#elif defined(USE_OZONE)
|
||||||
|
|
||||||
|
typedef intptr_t EGLNativeDisplayType;
|
||||||
|
typedef intptr_t EGLNativePixmapType;
|
||||||
|
typedef intptr_t EGLNativeWindowType;
|
||||||
|
|
||||||
|
#elif defined(__unix__) && defined(EGL_NO_X11)
|
||||||
|
|
||||||
|
typedef void *EGLNativeDisplayType;
|
||||||
|
typedef khronos_uintptr_t EGLNativePixmapType;
|
||||||
|
typedef khronos_uintptr_t EGLNativeWindowType;
|
||||||
|
|
||||||
|
#elif defined(__unix__) || defined(USE_X11)
|
||||||
|
|
||||||
|
/* X11 (tentative) */
|
||||||
|
#include <X11/Xlib.h>
|
||||||
|
#include <X11/Xutil.h>
|
||||||
|
|
||||||
|
typedef Display *EGLNativeDisplayType;
|
||||||
|
typedef Pixmap EGLNativePixmapType;
|
||||||
|
typedef Window EGLNativeWindowType;
|
||||||
|
|
||||||
|
#elif defined(__APPLE__)
|
||||||
|
|
||||||
|
typedef int EGLNativeDisplayType;
|
||||||
|
typedef void *EGLNativePixmapType;
|
||||||
|
typedef void *EGLNativeWindowType;
|
||||||
|
|
||||||
|
#elif defined(__HAIKU__)
|
||||||
|
|
||||||
|
#include <kernel/image.h>
|
||||||
|
|
||||||
|
typedef void *EGLNativeDisplayType;
|
||||||
|
typedef khronos_uintptr_t EGLNativePixmapType;
|
||||||
|
typedef khronos_uintptr_t EGLNativeWindowType;
|
||||||
|
|
||||||
|
#elif defined(__Fuchsia__)
|
||||||
|
|
||||||
|
typedef void *EGLNativeDisplayType;
|
||||||
|
typedef khronos_uintptr_t EGLNativePixmapType;
|
||||||
|
typedef khronos_uintptr_t EGLNativeWindowType;
|
||||||
|
|
||||||
|
#else
|
||||||
|
#error "Platform not recognized"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* EGL 1.2 types, renamed for consistency in EGL 1.3 */
|
||||||
|
typedef EGLNativeDisplayType NativeDisplayType;
|
||||||
|
typedef EGLNativePixmapType NativePixmapType;
|
||||||
|
typedef EGLNativeWindowType NativeWindowType;
|
||||||
|
|
||||||
|
|
||||||
|
/* Define EGLint. This must be a signed integral type large enough to contain
|
||||||
|
* all legal attribute names and values passed into and out of EGL, whether
|
||||||
|
* their type is boolean, bitmask, enumerant (symbolic constant), integer,
|
||||||
|
* handle, or other. While in general a 32-bit integer will suffice, if
|
||||||
|
* handles are 64 bit types, then EGLint should be defined as a signed 64-bit
|
||||||
|
* integer type.
|
||||||
|
*/
|
||||||
|
typedef khronos_int32_t EGLint;
|
||||||
|
|
||||||
|
|
||||||
|
/* C++ / C typecast macros for special EGL handle values */
|
||||||
|
#if defined(__cplusplus)
|
||||||
|
#define EGL_CAST(type, value) (static_cast<type>(value))
|
||||||
|
#else
|
||||||
|
#define EGL_CAST(type, value) ((type) (value))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __eglplatform_h */
|
||||||
File diff suppressed because it is too large
Load Diff
12050
flutter_filament_federated/flutter_filament/windows/include/GL/glext.h
Normal file
12050
flutter_filament_federated/flutter_filament/windows/include/GL/glext.h
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,850 @@
|
|||||||
|
#ifndef __wglext_h_
|
||||||
|
#define __wglext_h_ 1
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Copyright (c) 2013-2017 The Khronos Group Inc.
|
||||||
|
**
|
||||||
|
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
** copy of this software and/or associated documentation files (the
|
||||||
|
** "Materials"), to deal in the Materials without restriction, including
|
||||||
|
** without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||||
|
** permit persons to whom the Materials are furnished to do so, subject to
|
||||||
|
** the following conditions:
|
||||||
|
**
|
||||||
|
** The above copyright notice and this permission notice shall be included
|
||||||
|
** in all copies or substantial portions of the Materials.
|
||||||
|
**
|
||||||
|
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||||
|
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
** This header is generated from the Khronos OpenGL / OpenGL ES XML
|
||||||
|
** API Registry. The current version of the Registry, generator scripts
|
||||||
|
** used to make the header, and the header can be found at
|
||||||
|
** https://github.com/KhronosGroup/OpenGL-Registry
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
|
||||||
|
#define WIN32_LEAN_AND_MEAN 1
|
||||||
|
#include <windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define WGL_WGLEXT_VERSION 20171125
|
||||||
|
|
||||||
|
/* Generated C header for:
|
||||||
|
* API: wgl
|
||||||
|
* Versions considered: .*
|
||||||
|
* Versions emitted: _nomatch_^
|
||||||
|
* Default extensions included: wgl
|
||||||
|
* Additional extensions included: _nomatch_^
|
||||||
|
* Extensions removed: _nomatch_^
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_buffer_region
|
||||||
|
#define WGL_ARB_buffer_region 1
|
||||||
|
#define WGL_FRONT_COLOR_BUFFER_BIT_ARB 0x00000001
|
||||||
|
#define WGL_BACK_COLOR_BUFFER_BIT_ARB 0x00000002
|
||||||
|
#define WGL_DEPTH_BUFFER_BIT_ARB 0x00000004
|
||||||
|
#define WGL_STENCIL_BUFFER_BIT_ARB 0x00000008
|
||||||
|
typedef HANDLE (WINAPI * PFNWGLCREATEBUFFERREGIONARBPROC) (HDC hDC, int iLayerPlane, UINT uType);
|
||||||
|
typedef VOID (WINAPI * PFNWGLDELETEBUFFERREGIONARBPROC) (HANDLE hRegion);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLSAVEBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLRESTOREBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc);
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
HANDLE WINAPI wglCreateBufferRegionARB (HDC hDC, int iLayerPlane, UINT uType);
|
||||||
|
VOID WINAPI wglDeleteBufferRegionARB (HANDLE hRegion);
|
||||||
|
BOOL WINAPI wglSaveBufferRegionARB (HANDLE hRegion, int x, int y, int width, int height);
|
||||||
|
BOOL WINAPI wglRestoreBufferRegionARB (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc);
|
||||||
|
#endif
|
||||||
|
#endif /* WGL_ARB_buffer_region */
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_context_flush_control
|
||||||
|
#define WGL_ARB_context_flush_control 1
|
||||||
|
#define WGL_CONTEXT_RELEASE_BEHAVIOR_ARB 0x2097
|
||||||
|
#define WGL_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB 0
|
||||||
|
#define WGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB 0x2098
|
||||||
|
#endif /* WGL_ARB_context_flush_control */
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_create_context
|
||||||
|
#define WGL_ARB_create_context 1
|
||||||
|
#define WGL_CONTEXT_DEBUG_BIT_ARB 0x00000001
|
||||||
|
#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002
|
||||||
|
#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091
|
||||||
|
#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092
|
||||||
|
#define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093
|
||||||
|
#define WGL_CONTEXT_FLAGS_ARB 0x2094
|
||||||
|
#define ERROR_INVALID_VERSION_ARB 0x2095
|
||||||
|
typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShareContext, const int *attribList);
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
HGLRC WINAPI wglCreateContextAttribsARB (HDC hDC, HGLRC hShareContext, const int *attribList);
|
||||||
|
#endif
|
||||||
|
#endif /* WGL_ARB_create_context */
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_create_context_no_error
|
||||||
|
#define WGL_ARB_create_context_no_error 1
|
||||||
|
#define WGL_CONTEXT_OPENGL_NO_ERROR_ARB 0x31B3
|
||||||
|
#endif /* WGL_ARB_create_context_no_error */
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_create_context_profile
|
||||||
|
#define WGL_ARB_create_context_profile 1
|
||||||
|
#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126
|
||||||
|
#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
|
||||||
|
#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
|
||||||
|
#define ERROR_INVALID_PROFILE_ARB 0x2096
|
||||||
|
#endif /* WGL_ARB_create_context_profile */
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_create_context_robustness
|
||||||
|
#define WGL_ARB_create_context_robustness 1
|
||||||
|
#define WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004
|
||||||
|
#define WGL_LOSE_CONTEXT_ON_RESET_ARB 0x8252
|
||||||
|
#define WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
|
||||||
|
#define WGL_NO_RESET_NOTIFICATION_ARB 0x8261
|
||||||
|
#endif /* WGL_ARB_create_context_robustness */
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_extensions_string
|
||||||
|
#define WGL_ARB_extensions_string 1
|
||||||
|
typedef const char *(WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC) (HDC hdc);
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
const char *WINAPI wglGetExtensionsStringARB (HDC hdc);
|
||||||
|
#endif
|
||||||
|
#endif /* WGL_ARB_extensions_string */
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_framebuffer_sRGB
|
||||||
|
#define WGL_ARB_framebuffer_sRGB 1
|
||||||
|
#define WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20A9
|
||||||
|
#endif /* WGL_ARB_framebuffer_sRGB */
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_make_current_read
|
||||||
|
#define WGL_ARB_make_current_read 1
|
||||||
|
#define ERROR_INVALID_PIXEL_TYPE_ARB 0x2043
|
||||||
|
#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054
|
||||||
|
typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTARBPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
|
||||||
|
typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCARBPROC) (void);
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
BOOL WINAPI wglMakeContextCurrentARB (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
|
||||||
|
HDC WINAPI wglGetCurrentReadDCARB (void);
|
||||||
|
#endif
|
||||||
|
#endif /* WGL_ARB_make_current_read */
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_multisample
|
||||||
|
#define WGL_ARB_multisample 1
|
||||||
|
#define WGL_SAMPLE_BUFFERS_ARB 0x2041
|
||||||
|
#define WGL_SAMPLES_ARB 0x2042
|
||||||
|
#endif /* WGL_ARB_multisample */
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_pbuffer
|
||||||
|
#define WGL_ARB_pbuffer 1
|
||||||
|
DECLARE_HANDLE(HPBUFFERARB);
|
||||||
|
#define WGL_DRAW_TO_PBUFFER_ARB 0x202D
|
||||||
|
#define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E
|
||||||
|
#define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F
|
||||||
|
#define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030
|
||||||
|
#define WGL_PBUFFER_LARGEST_ARB 0x2033
|
||||||
|
#define WGL_PBUFFER_WIDTH_ARB 0x2034
|
||||||
|
#define WGL_PBUFFER_HEIGHT_ARB 0x2035
|
||||||
|
#define WGL_PBUFFER_LOST_ARB 0x2036
|
||||||
|
typedef HPBUFFERARB (WINAPI * PFNWGLCREATEPBUFFERARBPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
|
||||||
|
typedef HDC (WINAPI * PFNWGLGETPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer);
|
||||||
|
typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer, HDC hDC);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFERARBPROC) (HPBUFFERARB hPbuffer);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLQUERYPBUFFERARBPROC) (HPBUFFERARB hPbuffer, int iAttribute, int *piValue);
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
HPBUFFERARB WINAPI wglCreatePbufferARB (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
|
||||||
|
HDC WINAPI wglGetPbufferDCARB (HPBUFFERARB hPbuffer);
|
||||||
|
int WINAPI wglReleasePbufferDCARB (HPBUFFERARB hPbuffer, HDC hDC);
|
||||||
|
BOOL WINAPI wglDestroyPbufferARB (HPBUFFERARB hPbuffer);
|
||||||
|
BOOL WINAPI wglQueryPbufferARB (HPBUFFERARB hPbuffer, int iAttribute, int *piValue);
|
||||||
|
#endif
|
||||||
|
#endif /* WGL_ARB_pbuffer */
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_pixel_format
|
||||||
|
#define WGL_ARB_pixel_format 1
|
||||||
|
#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000
|
||||||
|
#define WGL_DRAW_TO_WINDOW_ARB 0x2001
|
||||||
|
#define WGL_DRAW_TO_BITMAP_ARB 0x2002
|
||||||
|
#define WGL_ACCELERATION_ARB 0x2003
|
||||||
|
#define WGL_NEED_PALETTE_ARB 0x2004
|
||||||
|
#define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005
|
||||||
|
#define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006
|
||||||
|
#define WGL_SWAP_METHOD_ARB 0x2007
|
||||||
|
#define WGL_NUMBER_OVERLAYS_ARB 0x2008
|
||||||
|
#define WGL_NUMBER_UNDERLAYS_ARB 0x2009
|
||||||
|
#define WGL_TRANSPARENT_ARB 0x200A
|
||||||
|
#define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037
|
||||||
|
#define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038
|
||||||
|
#define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039
|
||||||
|
#define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A
|
||||||
|
#define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B
|
||||||
|
#define WGL_SHARE_DEPTH_ARB 0x200C
|
||||||
|
#define WGL_SHARE_STENCIL_ARB 0x200D
|
||||||
|
#define WGL_SHARE_ACCUM_ARB 0x200E
|
||||||
|
#define WGL_SUPPORT_GDI_ARB 0x200F
|
||||||
|
#define WGL_SUPPORT_OPENGL_ARB 0x2010
|
||||||
|
#define WGL_DOUBLE_BUFFER_ARB 0x2011
|
||||||
|
#define WGL_STEREO_ARB 0x2012
|
||||||
|
#define WGL_PIXEL_TYPE_ARB 0x2013
|
||||||
|
#define WGL_COLOR_BITS_ARB 0x2014
|
||||||
|
#define WGL_RED_BITS_ARB 0x2015
|
||||||
|
#define WGL_RED_SHIFT_ARB 0x2016
|
||||||
|
#define WGL_GREEN_BITS_ARB 0x2017
|
||||||
|
#define WGL_GREEN_SHIFT_ARB 0x2018
|
||||||
|
#define WGL_BLUE_BITS_ARB 0x2019
|
||||||
|
#define WGL_BLUE_SHIFT_ARB 0x201A
|
||||||
|
#define WGL_ALPHA_BITS_ARB 0x201B
|
||||||
|
#define WGL_ALPHA_SHIFT_ARB 0x201C
|
||||||
|
#define WGL_ACCUM_BITS_ARB 0x201D
|
||||||
|
#define WGL_ACCUM_RED_BITS_ARB 0x201E
|
||||||
|
#define WGL_ACCUM_GREEN_BITS_ARB 0x201F
|
||||||
|
#define WGL_ACCUM_BLUE_BITS_ARB 0x2020
|
||||||
|
#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021
|
||||||
|
#define WGL_DEPTH_BITS_ARB 0x2022
|
||||||
|
#define WGL_STENCIL_BITS_ARB 0x2023
|
||||||
|
#define WGL_AUX_BUFFERS_ARB 0x2024
|
||||||
|
#define WGL_NO_ACCELERATION_ARB 0x2025
|
||||||
|
#define WGL_GENERIC_ACCELERATION_ARB 0x2026
|
||||||
|
#define WGL_FULL_ACCELERATION_ARB 0x2027
|
||||||
|
#define WGL_SWAP_EXCHANGE_ARB 0x2028
|
||||||
|
#define WGL_SWAP_COPY_ARB 0x2029
|
||||||
|
#define WGL_SWAP_UNDEFINED_ARB 0x202A
|
||||||
|
#define WGL_TYPE_RGBA_ARB 0x202B
|
||||||
|
#define WGL_TYPE_COLORINDEX_ARB 0x202C
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATARBPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
BOOL WINAPI wglGetPixelFormatAttribivARB (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues);
|
||||||
|
BOOL WINAPI wglGetPixelFormatAttribfvARB (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues);
|
||||||
|
BOOL WINAPI wglChoosePixelFormatARB (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
|
||||||
|
#endif
|
||||||
|
#endif /* WGL_ARB_pixel_format */
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_pixel_format_float
|
||||||
|
#define WGL_ARB_pixel_format_float 1
|
||||||
|
#define WGL_TYPE_RGBA_FLOAT_ARB 0x21A0
|
||||||
|
#endif /* WGL_ARB_pixel_format_float */
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_render_texture
|
||||||
|
#define WGL_ARB_render_texture 1
|
||||||
|
#define WGL_BIND_TO_TEXTURE_RGB_ARB 0x2070
|
||||||
|
#define WGL_BIND_TO_TEXTURE_RGBA_ARB 0x2071
|
||||||
|
#define WGL_TEXTURE_FORMAT_ARB 0x2072
|
||||||
|
#define WGL_TEXTURE_TARGET_ARB 0x2073
|
||||||
|
#define WGL_MIPMAP_TEXTURE_ARB 0x2074
|
||||||
|
#define WGL_TEXTURE_RGB_ARB 0x2075
|
||||||
|
#define WGL_TEXTURE_RGBA_ARB 0x2076
|
||||||
|
#define WGL_NO_TEXTURE_ARB 0x2077
|
||||||
|
#define WGL_TEXTURE_CUBE_MAP_ARB 0x2078
|
||||||
|
#define WGL_TEXTURE_1D_ARB 0x2079
|
||||||
|
#define WGL_TEXTURE_2D_ARB 0x207A
|
||||||
|
#define WGL_MIPMAP_LEVEL_ARB 0x207B
|
||||||
|
#define WGL_CUBE_MAP_FACE_ARB 0x207C
|
||||||
|
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x207D
|
||||||
|
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x207E
|
||||||
|
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x207F
|
||||||
|
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x2080
|
||||||
|
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x2081
|
||||||
|
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x2082
|
||||||
|
#define WGL_FRONT_LEFT_ARB 0x2083
|
||||||
|
#define WGL_FRONT_RIGHT_ARB 0x2084
|
||||||
|
#define WGL_BACK_LEFT_ARB 0x2085
|
||||||
|
#define WGL_BACK_RIGHT_ARB 0x2086
|
||||||
|
#define WGL_AUX0_ARB 0x2087
|
||||||
|
#define WGL_AUX1_ARB 0x2088
|
||||||
|
#define WGL_AUX2_ARB 0x2089
|
||||||
|
#define WGL_AUX3_ARB 0x208A
|
||||||
|
#define WGL_AUX4_ARB 0x208B
|
||||||
|
#define WGL_AUX5_ARB 0x208C
|
||||||
|
#define WGL_AUX6_ARB 0x208D
|
||||||
|
#define WGL_AUX7_ARB 0x208E
|
||||||
|
#define WGL_AUX8_ARB 0x208F
|
||||||
|
#define WGL_AUX9_ARB 0x2090
|
||||||
|
typedef BOOL (WINAPI * PFNWGLBINDTEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLRELEASETEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, const int *piAttribList);
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
BOOL WINAPI wglBindTexImageARB (HPBUFFERARB hPbuffer, int iBuffer);
|
||||||
|
BOOL WINAPI wglReleaseTexImageARB (HPBUFFERARB hPbuffer, int iBuffer);
|
||||||
|
BOOL WINAPI wglSetPbufferAttribARB (HPBUFFERARB hPbuffer, const int *piAttribList);
|
||||||
|
#endif
|
||||||
|
#endif /* WGL_ARB_render_texture */
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_robustness_application_isolation
|
||||||
|
#define WGL_ARB_robustness_application_isolation 1
|
||||||
|
#define WGL_CONTEXT_RESET_ISOLATION_BIT_ARB 0x00000008
|
||||||
|
#endif /* WGL_ARB_robustness_application_isolation */
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_robustness_share_group_isolation
|
||||||
|
#define WGL_ARB_robustness_share_group_isolation 1
|
||||||
|
#endif /* WGL_ARB_robustness_share_group_isolation */
|
||||||
|
|
||||||
|
#ifndef WGL_3DFX_multisample
|
||||||
|
#define WGL_3DFX_multisample 1
|
||||||
|
#define WGL_SAMPLE_BUFFERS_3DFX 0x2060
|
||||||
|
#define WGL_SAMPLES_3DFX 0x2061
|
||||||
|
#endif /* WGL_3DFX_multisample */
|
||||||
|
|
||||||
|
#ifndef WGL_3DL_stereo_control
|
||||||
|
#define WGL_3DL_stereo_control 1
|
||||||
|
#define WGL_STEREO_EMITTER_ENABLE_3DL 0x2055
|
||||||
|
#define WGL_STEREO_EMITTER_DISABLE_3DL 0x2056
|
||||||
|
#define WGL_STEREO_POLARITY_NORMAL_3DL 0x2057
|
||||||
|
#define WGL_STEREO_POLARITY_INVERT_3DL 0x2058
|
||||||
|
typedef BOOL (WINAPI * PFNWGLSETSTEREOEMITTERSTATE3DLPROC) (HDC hDC, UINT uState);
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
BOOL WINAPI wglSetStereoEmitterState3DL (HDC hDC, UINT uState);
|
||||||
|
#endif
|
||||||
|
#endif /* WGL_3DL_stereo_control */
|
||||||
|
|
||||||
|
#ifndef WGL_AMD_gpu_association
|
||||||
|
#define WGL_AMD_gpu_association 1
|
||||||
|
#define WGL_GPU_VENDOR_AMD 0x1F00
|
||||||
|
#define WGL_GPU_RENDERER_STRING_AMD 0x1F01
|
||||||
|
#define WGL_GPU_OPENGL_VERSION_STRING_AMD 0x1F02
|
||||||
|
#define WGL_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2
|
||||||
|
#define WGL_GPU_RAM_AMD 0x21A3
|
||||||
|
#define WGL_GPU_CLOCK_AMD 0x21A4
|
||||||
|
#define WGL_GPU_NUM_PIPES_AMD 0x21A5
|
||||||
|
#define WGL_GPU_NUM_SIMD_AMD 0x21A6
|
||||||
|
#define WGL_GPU_NUM_RB_AMD 0x21A7
|
||||||
|
#define WGL_GPU_NUM_SPI_AMD 0x21A8
|
||||||
|
typedef UINT (WINAPI * PFNWGLGETGPUIDSAMDPROC) (UINT maxCount, UINT *ids);
|
||||||
|
typedef INT (WINAPI * PFNWGLGETGPUINFOAMDPROC) (UINT id, int property, GLenum dataType, UINT size, void *data);
|
||||||
|
typedef UINT (WINAPI * PFNWGLGETCONTEXTGPUIDAMDPROC) (HGLRC hglrc);
|
||||||
|
typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC) (UINT id);
|
||||||
|
typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC) (UINT id, HGLRC hShareContext, const int *attribList);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC) (HGLRC hglrc);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC) (HGLRC hglrc);
|
||||||
|
typedef HGLRC (WINAPI * PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC) (void);
|
||||||
|
typedef VOID (WINAPI * PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC) (HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
UINT WINAPI wglGetGPUIDsAMD (UINT maxCount, UINT *ids);
|
||||||
|
INT WINAPI wglGetGPUInfoAMD (UINT id, int property, GLenum dataType, UINT size, void *data);
|
||||||
|
UINT WINAPI wglGetContextGPUIDAMD (HGLRC hglrc);
|
||||||
|
HGLRC WINAPI wglCreateAssociatedContextAMD (UINT id);
|
||||||
|
HGLRC WINAPI wglCreateAssociatedContextAttribsAMD (UINT id, HGLRC hShareContext, const int *attribList);
|
||||||
|
BOOL WINAPI wglDeleteAssociatedContextAMD (HGLRC hglrc);
|
||||||
|
BOOL WINAPI wglMakeAssociatedContextCurrentAMD (HGLRC hglrc);
|
||||||
|
HGLRC WINAPI wglGetCurrentAssociatedContextAMD (void);
|
||||||
|
VOID WINAPI wglBlitContextFramebufferAMD (HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
||||||
|
#endif
|
||||||
|
#endif /* WGL_AMD_gpu_association */
|
||||||
|
|
||||||
|
#ifndef WGL_ATI_pixel_format_float
|
||||||
|
#define WGL_ATI_pixel_format_float 1
|
||||||
|
#define WGL_TYPE_RGBA_FLOAT_ATI 0x21A0
|
||||||
|
#endif /* WGL_ATI_pixel_format_float */
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_colorspace
|
||||||
|
#define WGL_EXT_colorspace 1
|
||||||
|
#define WGL_COLORSPACE_EXT 0x3087
|
||||||
|
#define WGL_COLORSPACE_SRGB_EXT 0x3089
|
||||||
|
#define WGL_COLORSPACE_LINEAR_EXT 0x308A
|
||||||
|
#endif /* WGL_EXT_colorspace */
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_create_context_es2_profile
|
||||||
|
#define WGL_EXT_create_context_es2_profile 1
|
||||||
|
#define WGL_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004
|
||||||
|
#endif /* WGL_EXT_create_context_es2_profile */
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_create_context_es_profile
|
||||||
|
#define WGL_EXT_create_context_es_profile 1
|
||||||
|
#define WGL_CONTEXT_ES_PROFILE_BIT_EXT 0x00000004
|
||||||
|
#endif /* WGL_EXT_create_context_es_profile */
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_depth_float
|
||||||
|
#define WGL_EXT_depth_float 1
|
||||||
|
#define WGL_DEPTH_FLOAT_EXT 0x2040
|
||||||
|
#endif /* WGL_EXT_depth_float */
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_display_color_table
|
||||||
|
#define WGL_EXT_display_color_table 1
|
||||||
|
typedef GLboolean (WINAPI * PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC) (GLushort id);
|
||||||
|
typedef GLboolean (WINAPI * PFNWGLLOADDISPLAYCOLORTABLEEXTPROC) (const GLushort *table, GLuint length);
|
||||||
|
typedef GLboolean (WINAPI * PFNWGLBINDDISPLAYCOLORTABLEEXTPROC) (GLushort id);
|
||||||
|
typedef VOID (WINAPI * PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC) (GLushort id);
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
GLboolean WINAPI wglCreateDisplayColorTableEXT (GLushort id);
|
||||||
|
GLboolean WINAPI wglLoadDisplayColorTableEXT (const GLushort *table, GLuint length);
|
||||||
|
GLboolean WINAPI wglBindDisplayColorTableEXT (GLushort id);
|
||||||
|
VOID WINAPI wglDestroyDisplayColorTableEXT (GLushort id);
|
||||||
|
#endif
|
||||||
|
#endif /* WGL_EXT_display_color_table */
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_extensions_string
|
||||||
|
#define WGL_EXT_extensions_string 1
|
||||||
|
typedef const char *(WINAPI * PFNWGLGETEXTENSIONSSTRINGEXTPROC) (void);
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
const char *WINAPI wglGetExtensionsStringEXT (void);
|
||||||
|
#endif
|
||||||
|
#endif /* WGL_EXT_extensions_string */
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_framebuffer_sRGB
|
||||||
|
#define WGL_EXT_framebuffer_sRGB 1
|
||||||
|
#define WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20A9
|
||||||
|
#endif /* WGL_EXT_framebuffer_sRGB */
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_make_current_read
|
||||||
|
#define WGL_EXT_make_current_read 1
|
||||||
|
#define ERROR_INVALID_PIXEL_TYPE_EXT 0x2043
|
||||||
|
typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTEXTPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
|
||||||
|
typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCEXTPROC) (void);
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
BOOL WINAPI wglMakeContextCurrentEXT (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
|
||||||
|
HDC WINAPI wglGetCurrentReadDCEXT (void);
|
||||||
|
#endif
|
||||||
|
#endif /* WGL_EXT_make_current_read */
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_multisample
|
||||||
|
#define WGL_EXT_multisample 1
|
||||||
|
#define WGL_SAMPLE_BUFFERS_EXT 0x2041
|
||||||
|
#define WGL_SAMPLES_EXT 0x2042
|
||||||
|
#endif /* WGL_EXT_multisample */
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_pbuffer
|
||||||
|
#define WGL_EXT_pbuffer 1
|
||||||
|
DECLARE_HANDLE(HPBUFFEREXT);
|
||||||
|
#define WGL_DRAW_TO_PBUFFER_EXT 0x202D
|
||||||
|
#define WGL_MAX_PBUFFER_PIXELS_EXT 0x202E
|
||||||
|
#define WGL_MAX_PBUFFER_WIDTH_EXT 0x202F
|
||||||
|
#define WGL_MAX_PBUFFER_HEIGHT_EXT 0x2030
|
||||||
|
#define WGL_OPTIMAL_PBUFFER_WIDTH_EXT 0x2031
|
||||||
|
#define WGL_OPTIMAL_PBUFFER_HEIGHT_EXT 0x2032
|
||||||
|
#define WGL_PBUFFER_LARGEST_EXT 0x2033
|
||||||
|
#define WGL_PBUFFER_WIDTH_EXT 0x2034
|
||||||
|
#define WGL_PBUFFER_HEIGHT_EXT 0x2035
|
||||||
|
typedef HPBUFFEREXT (WINAPI * PFNWGLCREATEPBUFFEREXTPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
|
||||||
|
typedef HDC (WINAPI * PFNWGLGETPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer);
|
||||||
|
typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer, HDC hDC);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLQUERYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue);
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
HPBUFFEREXT WINAPI wglCreatePbufferEXT (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
|
||||||
|
HDC WINAPI wglGetPbufferDCEXT (HPBUFFEREXT hPbuffer);
|
||||||
|
int WINAPI wglReleasePbufferDCEXT (HPBUFFEREXT hPbuffer, HDC hDC);
|
||||||
|
BOOL WINAPI wglDestroyPbufferEXT (HPBUFFEREXT hPbuffer);
|
||||||
|
BOOL WINAPI wglQueryPbufferEXT (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue);
|
||||||
|
#endif
|
||||||
|
#endif /* WGL_EXT_pbuffer */
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_pixel_format
|
||||||
|
#define WGL_EXT_pixel_format 1
|
||||||
|
#define WGL_NUMBER_PIXEL_FORMATS_EXT 0x2000
|
||||||
|
#define WGL_DRAW_TO_WINDOW_EXT 0x2001
|
||||||
|
#define WGL_DRAW_TO_BITMAP_EXT 0x2002
|
||||||
|
#define WGL_ACCELERATION_EXT 0x2003
|
||||||
|
#define WGL_NEED_PALETTE_EXT 0x2004
|
||||||
|
#define WGL_NEED_SYSTEM_PALETTE_EXT 0x2005
|
||||||
|
#define WGL_SWAP_LAYER_BUFFERS_EXT 0x2006
|
||||||
|
#define WGL_SWAP_METHOD_EXT 0x2007
|
||||||
|
#define WGL_NUMBER_OVERLAYS_EXT 0x2008
|
||||||
|
#define WGL_NUMBER_UNDERLAYS_EXT 0x2009
|
||||||
|
#define WGL_TRANSPARENT_EXT 0x200A
|
||||||
|
#define WGL_TRANSPARENT_VALUE_EXT 0x200B
|
||||||
|
#define WGL_SHARE_DEPTH_EXT 0x200C
|
||||||
|
#define WGL_SHARE_STENCIL_EXT 0x200D
|
||||||
|
#define WGL_SHARE_ACCUM_EXT 0x200E
|
||||||
|
#define WGL_SUPPORT_GDI_EXT 0x200F
|
||||||
|
#define WGL_SUPPORT_OPENGL_EXT 0x2010
|
||||||
|
#define WGL_DOUBLE_BUFFER_EXT 0x2011
|
||||||
|
#define WGL_STEREO_EXT 0x2012
|
||||||
|
#define WGL_PIXEL_TYPE_EXT 0x2013
|
||||||
|
#define WGL_COLOR_BITS_EXT 0x2014
|
||||||
|
#define WGL_RED_BITS_EXT 0x2015
|
||||||
|
#define WGL_RED_SHIFT_EXT 0x2016
|
||||||
|
#define WGL_GREEN_BITS_EXT 0x2017
|
||||||
|
#define WGL_GREEN_SHIFT_EXT 0x2018
|
||||||
|
#define WGL_BLUE_BITS_EXT 0x2019
|
||||||
|
#define WGL_BLUE_SHIFT_EXT 0x201A
|
||||||
|
#define WGL_ALPHA_BITS_EXT 0x201B
|
||||||
|
#define WGL_ALPHA_SHIFT_EXT 0x201C
|
||||||
|
#define WGL_ACCUM_BITS_EXT 0x201D
|
||||||
|
#define WGL_ACCUM_RED_BITS_EXT 0x201E
|
||||||
|
#define WGL_ACCUM_GREEN_BITS_EXT 0x201F
|
||||||
|
#define WGL_ACCUM_BLUE_BITS_EXT 0x2020
|
||||||
|
#define WGL_ACCUM_ALPHA_BITS_EXT 0x2021
|
||||||
|
#define WGL_DEPTH_BITS_EXT 0x2022
|
||||||
|
#define WGL_STENCIL_BITS_EXT 0x2023
|
||||||
|
#define WGL_AUX_BUFFERS_EXT 0x2024
|
||||||
|
#define WGL_NO_ACCELERATION_EXT 0x2025
|
||||||
|
#define WGL_GENERIC_ACCELERATION_EXT 0x2026
|
||||||
|
#define WGL_FULL_ACCELERATION_EXT 0x2027
|
||||||
|
#define WGL_SWAP_EXCHANGE_EXT 0x2028
|
||||||
|
#define WGL_SWAP_COPY_EXT 0x2029
|
||||||
|
#define WGL_SWAP_UNDEFINED_EXT 0x202A
|
||||||
|
#define WGL_TYPE_RGBA_EXT 0x202B
|
||||||
|
#define WGL_TYPE_COLORINDEX_EXT 0x202C
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATEXTPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
BOOL WINAPI wglGetPixelFormatAttribivEXT (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues);
|
||||||
|
BOOL WINAPI wglGetPixelFormatAttribfvEXT (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues);
|
||||||
|
BOOL WINAPI wglChoosePixelFormatEXT (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
|
||||||
|
#endif
|
||||||
|
#endif /* WGL_EXT_pixel_format */
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_pixel_format_packed_float
|
||||||
|
#define WGL_EXT_pixel_format_packed_float 1
|
||||||
|
#define WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT 0x20A8
|
||||||
|
#endif /* WGL_EXT_pixel_format_packed_float */
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_swap_control
|
||||||
|
#define WGL_EXT_swap_control 1
|
||||||
|
typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval);
|
||||||
|
typedef int (WINAPI * PFNWGLGETSWAPINTERVALEXTPROC) (void);
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
BOOL WINAPI wglSwapIntervalEXT (int interval);
|
||||||
|
int WINAPI wglGetSwapIntervalEXT (void);
|
||||||
|
#endif
|
||||||
|
#endif /* WGL_EXT_swap_control */
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_swap_control_tear
|
||||||
|
#define WGL_EXT_swap_control_tear 1
|
||||||
|
#endif /* WGL_EXT_swap_control_tear */
|
||||||
|
|
||||||
|
#ifndef WGL_I3D_digital_video_control
|
||||||
|
#define WGL_I3D_digital_video_control 1
|
||||||
|
#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D 0x2050
|
||||||
|
#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D 0x2051
|
||||||
|
#define WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D 0x2052
|
||||||
|
#define WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D 0x2053
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue);
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
BOOL WINAPI wglGetDigitalVideoParametersI3D (HDC hDC, int iAttribute, int *piValue);
|
||||||
|
BOOL WINAPI wglSetDigitalVideoParametersI3D (HDC hDC, int iAttribute, const int *piValue);
|
||||||
|
#endif
|
||||||
|
#endif /* WGL_I3D_digital_video_control */
|
||||||
|
|
||||||
|
#ifndef WGL_I3D_gamma
|
||||||
|
#define WGL_I3D_gamma 1
|
||||||
|
#define WGL_GAMMA_TABLE_SIZE_I3D 0x204E
|
||||||
|
#define WGL_GAMMA_EXCLUDE_DESKTOP_I3D 0x204F
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, USHORT *puRed, USHORT *puGreen, USHORT *puBlue);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, const USHORT *puRed, const USHORT *puGreen, const USHORT *puBlue);
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
BOOL WINAPI wglGetGammaTableParametersI3D (HDC hDC, int iAttribute, int *piValue);
|
||||||
|
BOOL WINAPI wglSetGammaTableParametersI3D (HDC hDC, int iAttribute, const int *piValue);
|
||||||
|
BOOL WINAPI wglGetGammaTableI3D (HDC hDC, int iEntries, USHORT *puRed, USHORT *puGreen, USHORT *puBlue);
|
||||||
|
BOOL WINAPI wglSetGammaTableI3D (HDC hDC, int iEntries, const USHORT *puRed, const USHORT *puGreen, const USHORT *puBlue);
|
||||||
|
#endif
|
||||||
|
#endif /* WGL_I3D_gamma */
|
||||||
|
|
||||||
|
#ifndef WGL_I3D_genlock
|
||||||
|
#define WGL_I3D_genlock 1
|
||||||
|
#define WGL_GENLOCK_SOURCE_MULTIVIEW_I3D 0x2044
|
||||||
|
#define WGL_GENLOCK_SOURCE_EXTERNAL_SYNC_I3D 0x2045
|
||||||
|
#define WGL_GENLOCK_SOURCE_EXTERNAL_FIELD_I3D 0x2046
|
||||||
|
#define WGL_GENLOCK_SOURCE_EXTERNAL_TTL_I3D 0x2047
|
||||||
|
#define WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D 0x2048
|
||||||
|
#define WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D 0x2049
|
||||||
|
#define WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D 0x204A
|
||||||
|
#define WGL_GENLOCK_SOURCE_EDGE_RISING_I3D 0x204B
|
||||||
|
#define WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D 0x204C
|
||||||
|
typedef BOOL (WINAPI * PFNWGLENABLEGENLOCKI3DPROC) (HDC hDC);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLDISABLEGENLOCKI3DPROC) (HDC hDC);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLISENABLEDGENLOCKI3DPROC) (HDC hDC, BOOL *pFlag);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEI3DPROC) (HDC hDC, UINT uSource);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEI3DPROC) (HDC hDC, UINT *uSource);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT uEdge);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT *uEdge);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT uRate);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGETGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT *uRate);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT uDelay);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT *uDelay);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC) (HDC hDC, UINT *uMaxLineDelay, UINT *uMaxPixelDelay);
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
BOOL WINAPI wglEnableGenlockI3D (HDC hDC);
|
||||||
|
BOOL WINAPI wglDisableGenlockI3D (HDC hDC);
|
||||||
|
BOOL WINAPI wglIsEnabledGenlockI3D (HDC hDC, BOOL *pFlag);
|
||||||
|
BOOL WINAPI wglGenlockSourceI3D (HDC hDC, UINT uSource);
|
||||||
|
BOOL WINAPI wglGetGenlockSourceI3D (HDC hDC, UINT *uSource);
|
||||||
|
BOOL WINAPI wglGenlockSourceEdgeI3D (HDC hDC, UINT uEdge);
|
||||||
|
BOOL WINAPI wglGetGenlockSourceEdgeI3D (HDC hDC, UINT *uEdge);
|
||||||
|
BOOL WINAPI wglGenlockSampleRateI3D (HDC hDC, UINT uRate);
|
||||||
|
BOOL WINAPI wglGetGenlockSampleRateI3D (HDC hDC, UINT *uRate);
|
||||||
|
BOOL WINAPI wglGenlockSourceDelayI3D (HDC hDC, UINT uDelay);
|
||||||
|
BOOL WINAPI wglGetGenlockSourceDelayI3D (HDC hDC, UINT *uDelay);
|
||||||
|
BOOL WINAPI wglQueryGenlockMaxSourceDelayI3D (HDC hDC, UINT *uMaxLineDelay, UINT *uMaxPixelDelay);
|
||||||
|
#endif
|
||||||
|
#endif /* WGL_I3D_genlock */
|
||||||
|
|
||||||
|
#ifndef WGL_I3D_image_buffer
|
||||||
|
#define WGL_I3D_image_buffer 1
|
||||||
|
#define WGL_IMAGE_BUFFER_MIN_ACCESS_I3D 0x00000001
|
||||||
|
#define WGL_IMAGE_BUFFER_LOCK_I3D 0x00000002
|
||||||
|
typedef LPVOID (WINAPI * PFNWGLCREATEIMAGEBUFFERI3DPROC) (HDC hDC, DWORD dwSize, UINT uFlags);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLDESTROYIMAGEBUFFERI3DPROC) (HDC hDC, LPVOID pAddress);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const HANDLE *pEvent, const LPVOID *pAddress, const DWORD *pSize, UINT count);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const LPVOID *pAddress, UINT count);
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
LPVOID WINAPI wglCreateImageBufferI3D (HDC hDC, DWORD dwSize, UINT uFlags);
|
||||||
|
BOOL WINAPI wglDestroyImageBufferI3D (HDC hDC, LPVOID pAddress);
|
||||||
|
BOOL WINAPI wglAssociateImageBufferEventsI3D (HDC hDC, const HANDLE *pEvent, const LPVOID *pAddress, const DWORD *pSize, UINT count);
|
||||||
|
BOOL WINAPI wglReleaseImageBufferEventsI3D (HDC hDC, const LPVOID *pAddress, UINT count);
|
||||||
|
#endif
|
||||||
|
#endif /* WGL_I3D_image_buffer */
|
||||||
|
|
||||||
|
#ifndef WGL_I3D_swap_frame_lock
|
||||||
|
#define WGL_I3D_swap_frame_lock 1
|
||||||
|
typedef BOOL (WINAPI * PFNWGLENABLEFRAMELOCKI3DPROC) (void);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLDISABLEFRAMELOCKI3DPROC) (void);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLISENABLEDFRAMELOCKI3DPROC) (BOOL *pFlag);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLQUERYFRAMELOCKMASTERI3DPROC) (BOOL *pFlag);
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
BOOL WINAPI wglEnableFrameLockI3D (void);
|
||||||
|
BOOL WINAPI wglDisableFrameLockI3D (void);
|
||||||
|
BOOL WINAPI wglIsEnabledFrameLockI3D (BOOL *pFlag);
|
||||||
|
BOOL WINAPI wglQueryFrameLockMasterI3D (BOOL *pFlag);
|
||||||
|
#endif
|
||||||
|
#endif /* WGL_I3D_swap_frame_lock */
|
||||||
|
|
||||||
|
#ifndef WGL_I3D_swap_frame_usage
|
||||||
|
#define WGL_I3D_swap_frame_usage 1
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGETFRAMEUSAGEI3DPROC) (float *pUsage);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLBEGINFRAMETRACKINGI3DPROC) (void);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLENDFRAMETRACKINGI3DPROC) (void);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLQUERYFRAMETRACKINGI3DPROC) (DWORD *pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage);
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
BOOL WINAPI wglGetFrameUsageI3D (float *pUsage);
|
||||||
|
BOOL WINAPI wglBeginFrameTrackingI3D (void);
|
||||||
|
BOOL WINAPI wglEndFrameTrackingI3D (void);
|
||||||
|
BOOL WINAPI wglQueryFrameTrackingI3D (DWORD *pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage);
|
||||||
|
#endif
|
||||||
|
#endif /* WGL_I3D_swap_frame_usage */
|
||||||
|
|
||||||
|
#ifndef WGL_NV_DX_interop
|
||||||
|
#define WGL_NV_DX_interop 1
|
||||||
|
#define WGL_ACCESS_READ_ONLY_NV 0x00000000
|
||||||
|
#define WGL_ACCESS_READ_WRITE_NV 0x00000001
|
||||||
|
#define WGL_ACCESS_WRITE_DISCARD_NV 0x00000002
|
||||||
|
typedef BOOL (WINAPI * PFNWGLDXSETRESOURCESHAREHANDLENVPROC) (void *dxObject, HANDLE shareHandle);
|
||||||
|
typedef HANDLE (WINAPI * PFNWGLDXOPENDEVICENVPROC) (void *dxDevice);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLDXCLOSEDEVICENVPROC) (HANDLE hDevice);
|
||||||
|
typedef HANDLE (WINAPI * PFNWGLDXREGISTEROBJECTNVPROC) (HANDLE hDevice, void *dxObject, GLuint name, GLenum type, GLenum access);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLDXUNREGISTEROBJECTNVPROC) (HANDLE hDevice, HANDLE hObject);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLDXOBJECTACCESSNVPROC) (HANDLE hObject, GLenum access);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLDXLOCKOBJECTSNVPROC) (HANDLE hDevice, GLint count, HANDLE *hObjects);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLDXUNLOCKOBJECTSNVPROC) (HANDLE hDevice, GLint count, HANDLE *hObjects);
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
BOOL WINAPI wglDXSetResourceShareHandleNV (void *dxObject, HANDLE shareHandle);
|
||||||
|
HANDLE WINAPI wglDXOpenDeviceNV (void *dxDevice);
|
||||||
|
BOOL WINAPI wglDXCloseDeviceNV (HANDLE hDevice);
|
||||||
|
HANDLE WINAPI wglDXRegisterObjectNV (HANDLE hDevice, void *dxObject, GLuint name, GLenum type, GLenum access);
|
||||||
|
BOOL WINAPI wglDXUnregisterObjectNV (HANDLE hDevice, HANDLE hObject);
|
||||||
|
BOOL WINAPI wglDXObjectAccessNV (HANDLE hObject, GLenum access);
|
||||||
|
BOOL WINAPI wglDXLockObjectsNV (HANDLE hDevice, GLint count, HANDLE *hObjects);
|
||||||
|
BOOL WINAPI wglDXUnlockObjectsNV (HANDLE hDevice, GLint count, HANDLE *hObjects);
|
||||||
|
#endif
|
||||||
|
#endif /* WGL_NV_DX_interop */
|
||||||
|
|
||||||
|
#ifndef WGL_NV_DX_interop2
|
||||||
|
#define WGL_NV_DX_interop2 1
|
||||||
|
#endif /* WGL_NV_DX_interop2 */
|
||||||
|
|
||||||
|
#ifndef WGL_NV_copy_image
|
||||||
|
#define WGL_NV_copy_image 1
|
||||||
|
typedef BOOL (WINAPI * PFNWGLCOPYIMAGESUBDATANVPROC) (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
BOOL WINAPI wglCopyImageSubDataNV (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
|
||||||
|
#endif
|
||||||
|
#endif /* WGL_NV_copy_image */
|
||||||
|
|
||||||
|
#ifndef WGL_NV_delay_before_swap
|
||||||
|
#define WGL_NV_delay_before_swap 1
|
||||||
|
typedef BOOL (WINAPI * PFNWGLDELAYBEFORESWAPNVPROC) (HDC hDC, GLfloat seconds);
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
BOOL WINAPI wglDelayBeforeSwapNV (HDC hDC, GLfloat seconds);
|
||||||
|
#endif
|
||||||
|
#endif /* WGL_NV_delay_before_swap */
|
||||||
|
|
||||||
|
#ifndef WGL_NV_float_buffer
|
||||||
|
#define WGL_NV_float_buffer 1
|
||||||
|
#define WGL_FLOAT_COMPONENTS_NV 0x20B0
|
||||||
|
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 0x20B1
|
||||||
|
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 0x20B2
|
||||||
|
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 0x20B3
|
||||||
|
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 0x20B4
|
||||||
|
#define WGL_TEXTURE_FLOAT_R_NV 0x20B5
|
||||||
|
#define WGL_TEXTURE_FLOAT_RG_NV 0x20B6
|
||||||
|
#define WGL_TEXTURE_FLOAT_RGB_NV 0x20B7
|
||||||
|
#define WGL_TEXTURE_FLOAT_RGBA_NV 0x20B8
|
||||||
|
#endif /* WGL_NV_float_buffer */
|
||||||
|
|
||||||
|
#ifndef WGL_NV_gpu_affinity
|
||||||
|
#define WGL_NV_gpu_affinity 1
|
||||||
|
DECLARE_HANDLE(HGPUNV);
|
||||||
|
struct _GPU_DEVICE {
|
||||||
|
DWORD cb;
|
||||||
|
CHAR DeviceName[32];
|
||||||
|
CHAR DeviceString[128];
|
||||||
|
DWORD Flags;
|
||||||
|
RECT rcVirtualScreen;
|
||||||
|
};
|
||||||
|
typedef struct _GPU_DEVICE *PGPU_DEVICE;
|
||||||
|
#define ERROR_INCOMPATIBLE_AFFINITY_MASKS_NV 0x20D0
|
||||||
|
#define ERROR_MISSING_AFFINITY_MASK_NV 0x20D1
|
||||||
|
typedef BOOL (WINAPI * PFNWGLENUMGPUSNVPROC) (UINT iGpuIndex, HGPUNV *phGpu);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLENUMGPUDEVICESNVPROC) (HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice);
|
||||||
|
typedef HDC (WINAPI * PFNWGLCREATEAFFINITYDCNVPROC) (const HGPUNV *phGpuList);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLENUMGPUSFROMAFFINITYDCNVPROC) (HDC hAffinityDC, UINT iGpuIndex, HGPUNV *hGpu);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLDELETEDCNVPROC) (HDC hdc);
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
BOOL WINAPI wglEnumGpusNV (UINT iGpuIndex, HGPUNV *phGpu);
|
||||||
|
BOOL WINAPI wglEnumGpuDevicesNV (HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice);
|
||||||
|
HDC WINAPI wglCreateAffinityDCNV (const HGPUNV *phGpuList);
|
||||||
|
BOOL WINAPI wglEnumGpusFromAffinityDCNV (HDC hAffinityDC, UINT iGpuIndex, HGPUNV *hGpu);
|
||||||
|
BOOL WINAPI wglDeleteDCNV (HDC hdc);
|
||||||
|
#endif
|
||||||
|
#endif /* WGL_NV_gpu_affinity */
|
||||||
|
|
||||||
|
#ifndef WGL_NV_multisample_coverage
|
||||||
|
#define WGL_NV_multisample_coverage 1
|
||||||
|
#define WGL_COVERAGE_SAMPLES_NV 0x2042
|
||||||
|
#define WGL_COLOR_SAMPLES_NV 0x20B9
|
||||||
|
#endif /* WGL_NV_multisample_coverage */
|
||||||
|
|
||||||
|
#ifndef WGL_NV_present_video
|
||||||
|
#define WGL_NV_present_video 1
|
||||||
|
DECLARE_HANDLE(HVIDEOOUTPUTDEVICENV);
|
||||||
|
#define WGL_NUM_VIDEO_SLOTS_NV 0x20F0
|
||||||
|
typedef int (WINAPI * PFNWGLENUMERATEVIDEODEVICESNVPROC) (HDC hDC, HVIDEOOUTPUTDEVICENV *phDeviceList);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLBINDVIDEODEVICENVPROC) (HDC hDC, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLQUERYCURRENTCONTEXTNVPROC) (int iAttribute, int *piValue);
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
int WINAPI wglEnumerateVideoDevicesNV (HDC hDC, HVIDEOOUTPUTDEVICENV *phDeviceList);
|
||||||
|
BOOL WINAPI wglBindVideoDeviceNV (HDC hDC, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList);
|
||||||
|
BOOL WINAPI wglQueryCurrentContextNV (int iAttribute, int *piValue);
|
||||||
|
#endif
|
||||||
|
#endif /* WGL_NV_present_video */
|
||||||
|
|
||||||
|
#ifndef WGL_NV_render_depth_texture
|
||||||
|
#define WGL_NV_render_depth_texture 1
|
||||||
|
#define WGL_BIND_TO_TEXTURE_DEPTH_NV 0x20A3
|
||||||
|
#define WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV 0x20A4
|
||||||
|
#define WGL_DEPTH_TEXTURE_FORMAT_NV 0x20A5
|
||||||
|
#define WGL_TEXTURE_DEPTH_COMPONENT_NV 0x20A6
|
||||||
|
#define WGL_DEPTH_COMPONENT_NV 0x20A7
|
||||||
|
#endif /* WGL_NV_render_depth_texture */
|
||||||
|
|
||||||
|
#ifndef WGL_NV_render_texture_rectangle
|
||||||
|
#define WGL_NV_render_texture_rectangle 1
|
||||||
|
#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV 0x20A0
|
||||||
|
#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV 0x20A1
|
||||||
|
#define WGL_TEXTURE_RECTANGLE_NV 0x20A2
|
||||||
|
#endif /* WGL_NV_render_texture_rectangle */
|
||||||
|
|
||||||
|
#ifndef WGL_NV_swap_group
|
||||||
|
#define WGL_NV_swap_group 1
|
||||||
|
typedef BOOL (WINAPI * PFNWGLJOINSWAPGROUPNVPROC) (HDC hDC, GLuint group);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLBINDSWAPBARRIERNVPROC) (GLuint group, GLuint barrier);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLQUERYSWAPGROUPNVPROC) (HDC hDC, GLuint *group, GLuint *barrier);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLQUERYMAXSWAPGROUPSNVPROC) (HDC hDC, GLuint *maxGroups, GLuint *maxBarriers);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLQUERYFRAMECOUNTNVPROC) (HDC hDC, GLuint *count);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLRESETFRAMECOUNTNVPROC) (HDC hDC);
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
BOOL WINAPI wglJoinSwapGroupNV (HDC hDC, GLuint group);
|
||||||
|
BOOL WINAPI wglBindSwapBarrierNV (GLuint group, GLuint barrier);
|
||||||
|
BOOL WINAPI wglQuerySwapGroupNV (HDC hDC, GLuint *group, GLuint *barrier);
|
||||||
|
BOOL WINAPI wglQueryMaxSwapGroupsNV (HDC hDC, GLuint *maxGroups, GLuint *maxBarriers);
|
||||||
|
BOOL WINAPI wglQueryFrameCountNV (HDC hDC, GLuint *count);
|
||||||
|
BOOL WINAPI wglResetFrameCountNV (HDC hDC);
|
||||||
|
#endif
|
||||||
|
#endif /* WGL_NV_swap_group */
|
||||||
|
|
||||||
|
#ifndef WGL_NV_vertex_array_range
|
||||||
|
#define WGL_NV_vertex_array_range 1
|
||||||
|
typedef void *(WINAPI * PFNWGLALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
|
||||||
|
typedef void (WINAPI * PFNWGLFREEMEMORYNVPROC) (void *pointer);
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
void *WINAPI wglAllocateMemoryNV (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
|
||||||
|
void WINAPI wglFreeMemoryNV (void *pointer);
|
||||||
|
#endif
|
||||||
|
#endif /* WGL_NV_vertex_array_range */
|
||||||
|
|
||||||
|
#ifndef WGL_NV_video_capture
|
||||||
|
#define WGL_NV_video_capture 1
|
||||||
|
DECLARE_HANDLE(HVIDEOINPUTDEVICENV);
|
||||||
|
#define WGL_UNIQUE_ID_NV 0x20CE
|
||||||
|
#define WGL_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF
|
||||||
|
typedef BOOL (WINAPI * PFNWGLBINDVIDEOCAPTUREDEVICENVPROC) (UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice);
|
||||||
|
typedef UINT (WINAPI * PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC) (HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int *piValue);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
BOOL WINAPI wglBindVideoCaptureDeviceNV (UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice);
|
||||||
|
UINT WINAPI wglEnumerateVideoCaptureDevicesNV (HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList);
|
||||||
|
BOOL WINAPI wglLockVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
|
||||||
|
BOOL WINAPI wglQueryVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int *piValue);
|
||||||
|
BOOL WINAPI wglReleaseVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
|
||||||
|
#endif
|
||||||
|
#endif /* WGL_NV_video_capture */
|
||||||
|
|
||||||
|
#ifndef WGL_NV_video_output
|
||||||
|
#define WGL_NV_video_output 1
|
||||||
|
DECLARE_HANDLE(HPVIDEODEV);
|
||||||
|
#define WGL_BIND_TO_VIDEO_RGB_NV 0x20C0
|
||||||
|
#define WGL_BIND_TO_VIDEO_RGBA_NV 0x20C1
|
||||||
|
#define WGL_BIND_TO_VIDEO_RGB_AND_DEPTH_NV 0x20C2
|
||||||
|
#define WGL_VIDEO_OUT_COLOR_NV 0x20C3
|
||||||
|
#define WGL_VIDEO_OUT_ALPHA_NV 0x20C4
|
||||||
|
#define WGL_VIDEO_OUT_DEPTH_NV 0x20C5
|
||||||
|
#define WGL_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6
|
||||||
|
#define WGL_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7
|
||||||
|
#define WGL_VIDEO_OUT_FRAME 0x20C8
|
||||||
|
#define WGL_VIDEO_OUT_FIELD_1 0x20C9
|
||||||
|
#define WGL_VIDEO_OUT_FIELD_2 0x20CA
|
||||||
|
#define WGL_VIDEO_OUT_STACKED_FIELDS_1_2 0x20CB
|
||||||
|
#define WGL_VIDEO_OUT_STACKED_FIELDS_2_1 0x20CC
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGETVIDEODEVICENVPROC) (HDC hDC, int numDevices, HPVIDEODEV *hVideoDevice);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLRELEASEVIDEODEVICENVPROC) (HPVIDEODEV hVideoDevice);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLBINDVIDEOIMAGENVPROC) (HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOIMAGENVPROC) (HPBUFFERARB hPbuffer, int iVideoBuffer);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLSENDPBUFFERTOVIDEONVPROC) (HPBUFFERARB hPbuffer, int iBufferType, unsigned long *pulCounterPbuffer, BOOL bBlock);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGETVIDEOINFONVPROC) (HPVIDEODEV hpVideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo);
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
BOOL WINAPI wglGetVideoDeviceNV (HDC hDC, int numDevices, HPVIDEODEV *hVideoDevice);
|
||||||
|
BOOL WINAPI wglReleaseVideoDeviceNV (HPVIDEODEV hVideoDevice);
|
||||||
|
BOOL WINAPI wglBindVideoImageNV (HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer);
|
||||||
|
BOOL WINAPI wglReleaseVideoImageNV (HPBUFFERARB hPbuffer, int iVideoBuffer);
|
||||||
|
BOOL WINAPI wglSendPbufferToVideoNV (HPBUFFERARB hPbuffer, int iBufferType, unsigned long *pulCounterPbuffer, BOOL bBlock);
|
||||||
|
BOOL WINAPI wglGetVideoInfoNV (HPVIDEODEV hpVideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo);
|
||||||
|
#endif
|
||||||
|
#endif /* WGL_NV_video_output */
|
||||||
|
|
||||||
|
#ifndef WGL_OML_sync_control
|
||||||
|
#define WGL_OML_sync_control 1
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGETSYNCVALUESOMLPROC) (HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGETMSCRATEOMLPROC) (HDC hdc, INT32 *numerator, INT32 *denominator);
|
||||||
|
typedef INT64 (WINAPI * PFNWGLSWAPBUFFERSMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder);
|
||||||
|
typedef INT64 (WINAPI * PFNWGLSWAPLAYERBUFFERSMSCOMLPROC) (HDC hdc, int fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLWAITFORMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLWAITFORSBCOMLPROC) (HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc);
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
BOOL WINAPI wglGetSyncValuesOML (HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc);
|
||||||
|
BOOL WINAPI wglGetMscRateOML (HDC hdc, INT32 *numerator, INT32 *denominator);
|
||||||
|
INT64 WINAPI wglSwapBuffersMscOML (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder);
|
||||||
|
INT64 WINAPI wglSwapLayerBuffersMscOML (HDC hdc, int fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder);
|
||||||
|
BOOL WINAPI wglWaitForMscOML (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc);
|
||||||
|
BOOL WINAPI wglWaitForSbcOML (HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc);
|
||||||
|
#endif
|
||||||
|
#endif /* WGL_OML_sync_control */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,656 @@
|
|||||||
|
#ifndef __gles2_gl2_h_
|
||||||
|
#define __gles2_gl2_h_ 1
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Copyright 2013-2020 The Khronos Group Inc.
|
||||||
|
** SPDX-License-Identifier: MIT
|
||||||
|
**
|
||||||
|
** This header is generated from the Khronos OpenGL / OpenGL ES XML
|
||||||
|
** API Registry. The current version of the Registry, generator scripts
|
||||||
|
** used to make the header, and the header can be found at
|
||||||
|
** https://github.com/KhronosGroup/OpenGL-Registry
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <GLES2/gl2platform.h>
|
||||||
|
|
||||||
|
#ifndef GL_APIENTRYP
|
||||||
|
#define GL_APIENTRYP GL_APIENTRY*
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GL_GLES_PROTOTYPES
|
||||||
|
#define GL_GLES_PROTOTYPES 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Generated on date 20210107 */
|
||||||
|
|
||||||
|
/* Generated C header for:
|
||||||
|
* API: gles2
|
||||||
|
* Profile: common
|
||||||
|
* Versions considered: 2\.[0-9]
|
||||||
|
* Versions emitted: .*
|
||||||
|
* Default extensions included: None
|
||||||
|
* Additional extensions included: _nomatch_^
|
||||||
|
* Extensions removed: _nomatch_^
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef GL_ES_VERSION_2_0
|
||||||
|
#define GL_ES_VERSION_2_0 1
|
||||||
|
#include <KHR/khrplatform.h>
|
||||||
|
typedef khronos_int8_t GLbyte;
|
||||||
|
typedef khronos_float_t GLclampf;
|
||||||
|
typedef khronos_int32_t GLfixed;
|
||||||
|
typedef khronos_int16_t GLshort;
|
||||||
|
typedef khronos_uint16_t GLushort;
|
||||||
|
typedef void GLvoid;
|
||||||
|
typedef struct __GLsync *GLsync;
|
||||||
|
typedef khronos_int64_t GLint64;
|
||||||
|
typedef khronos_uint64_t GLuint64;
|
||||||
|
typedef unsigned int GLenum;
|
||||||
|
typedef unsigned int GLuint;
|
||||||
|
typedef char GLchar;
|
||||||
|
typedef khronos_float_t GLfloat;
|
||||||
|
typedef khronos_ssize_t GLsizeiptr;
|
||||||
|
typedef khronos_intptr_t GLintptr;
|
||||||
|
typedef unsigned int GLbitfield;
|
||||||
|
typedef int GLint;
|
||||||
|
typedef unsigned char GLboolean;
|
||||||
|
typedef int GLsizei;
|
||||||
|
typedef khronos_uint8_t GLubyte;
|
||||||
|
#define GL_DEPTH_BUFFER_BIT 0x00000100
|
||||||
|
#define GL_STENCIL_BUFFER_BIT 0x00000400
|
||||||
|
#define GL_COLOR_BUFFER_BIT 0x00004000
|
||||||
|
#define GL_FALSE 0
|
||||||
|
#define GL_TRUE 1
|
||||||
|
#define GL_POINTS 0x0000
|
||||||
|
#define GL_LINES 0x0001
|
||||||
|
#define GL_LINE_LOOP 0x0002
|
||||||
|
#define GL_LINE_STRIP 0x0003
|
||||||
|
#define GL_TRIANGLES 0x0004
|
||||||
|
#define GL_TRIANGLE_STRIP 0x0005
|
||||||
|
#define GL_TRIANGLE_FAN 0x0006
|
||||||
|
#define GL_ZERO 0
|
||||||
|
#define GL_ONE 1
|
||||||
|
#define GL_SRC_COLOR 0x0300
|
||||||
|
#define GL_ONE_MINUS_SRC_COLOR 0x0301
|
||||||
|
#define GL_SRC_ALPHA 0x0302
|
||||||
|
#define GL_ONE_MINUS_SRC_ALPHA 0x0303
|
||||||
|
#define GL_DST_ALPHA 0x0304
|
||||||
|
#define GL_ONE_MINUS_DST_ALPHA 0x0305
|
||||||
|
#define GL_DST_COLOR 0x0306
|
||||||
|
#define GL_ONE_MINUS_DST_COLOR 0x0307
|
||||||
|
#define GL_SRC_ALPHA_SATURATE 0x0308
|
||||||
|
#define GL_FUNC_ADD 0x8006
|
||||||
|
#define GL_BLEND_EQUATION 0x8009
|
||||||
|
#define GL_BLEND_EQUATION_RGB 0x8009
|
||||||
|
#define GL_BLEND_EQUATION_ALPHA 0x883D
|
||||||
|
#define GL_FUNC_SUBTRACT 0x800A
|
||||||
|
#define GL_FUNC_REVERSE_SUBTRACT 0x800B
|
||||||
|
#define GL_BLEND_DST_RGB 0x80C8
|
||||||
|
#define GL_BLEND_SRC_RGB 0x80C9
|
||||||
|
#define GL_BLEND_DST_ALPHA 0x80CA
|
||||||
|
#define GL_BLEND_SRC_ALPHA 0x80CB
|
||||||
|
#define GL_CONSTANT_COLOR 0x8001
|
||||||
|
#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
|
||||||
|
#define GL_CONSTANT_ALPHA 0x8003
|
||||||
|
#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
|
||||||
|
#define GL_BLEND_COLOR 0x8005
|
||||||
|
#define GL_ARRAY_BUFFER 0x8892
|
||||||
|
#define GL_ELEMENT_ARRAY_BUFFER 0x8893
|
||||||
|
#define GL_ARRAY_BUFFER_BINDING 0x8894
|
||||||
|
#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
|
||||||
|
#define GL_STREAM_DRAW 0x88E0
|
||||||
|
#define GL_STATIC_DRAW 0x88E4
|
||||||
|
#define GL_DYNAMIC_DRAW 0x88E8
|
||||||
|
#define GL_BUFFER_SIZE 0x8764
|
||||||
|
#define GL_BUFFER_USAGE 0x8765
|
||||||
|
#define GL_CURRENT_VERTEX_ATTRIB 0x8626
|
||||||
|
#define GL_FRONT 0x0404
|
||||||
|
#define GL_BACK 0x0405
|
||||||
|
#define GL_FRONT_AND_BACK 0x0408
|
||||||
|
#define GL_TEXTURE_2D 0x0DE1
|
||||||
|
#define GL_CULL_FACE 0x0B44
|
||||||
|
#define GL_BLEND 0x0BE2
|
||||||
|
#define GL_DITHER 0x0BD0
|
||||||
|
#define GL_STENCIL_TEST 0x0B90
|
||||||
|
#define GL_DEPTH_TEST 0x0B71
|
||||||
|
#define GL_SCISSOR_TEST 0x0C11
|
||||||
|
#define GL_POLYGON_OFFSET_FILL 0x8037
|
||||||
|
#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
|
||||||
|
#define GL_SAMPLE_COVERAGE 0x80A0
|
||||||
|
#define GL_NO_ERROR 0
|
||||||
|
#define GL_INVALID_ENUM 0x0500
|
||||||
|
#define GL_INVALID_VALUE 0x0501
|
||||||
|
#define GL_INVALID_OPERATION 0x0502
|
||||||
|
#define GL_OUT_OF_MEMORY 0x0505
|
||||||
|
#define GL_CW 0x0900
|
||||||
|
#define GL_CCW 0x0901
|
||||||
|
#define GL_LINE_WIDTH 0x0B21
|
||||||
|
#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
|
||||||
|
#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
|
||||||
|
#define GL_CULL_FACE_MODE 0x0B45
|
||||||
|
#define GL_FRONT_FACE 0x0B46
|
||||||
|
#define GL_DEPTH_RANGE 0x0B70
|
||||||
|
#define GL_DEPTH_WRITEMASK 0x0B72
|
||||||
|
#define GL_DEPTH_CLEAR_VALUE 0x0B73
|
||||||
|
#define GL_DEPTH_FUNC 0x0B74
|
||||||
|
#define GL_STENCIL_CLEAR_VALUE 0x0B91
|
||||||
|
#define GL_STENCIL_FUNC 0x0B92
|
||||||
|
#define GL_STENCIL_FAIL 0x0B94
|
||||||
|
#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
|
||||||
|
#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
|
||||||
|
#define GL_STENCIL_REF 0x0B97
|
||||||
|
#define GL_STENCIL_VALUE_MASK 0x0B93
|
||||||
|
#define GL_STENCIL_WRITEMASK 0x0B98
|
||||||
|
#define GL_STENCIL_BACK_FUNC 0x8800
|
||||||
|
#define GL_STENCIL_BACK_FAIL 0x8801
|
||||||
|
#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
|
||||||
|
#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
|
||||||
|
#define GL_STENCIL_BACK_REF 0x8CA3
|
||||||
|
#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
|
||||||
|
#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
|
||||||
|
#define GL_VIEWPORT 0x0BA2
|
||||||
|
#define GL_SCISSOR_BOX 0x0C10
|
||||||
|
#define GL_COLOR_CLEAR_VALUE 0x0C22
|
||||||
|
#define GL_COLOR_WRITEMASK 0x0C23
|
||||||
|
#define GL_UNPACK_ALIGNMENT 0x0CF5
|
||||||
|
#define GL_PACK_ALIGNMENT 0x0D05
|
||||||
|
#define GL_MAX_TEXTURE_SIZE 0x0D33
|
||||||
|
#define GL_MAX_VIEWPORT_DIMS 0x0D3A
|
||||||
|
#define GL_SUBPIXEL_BITS 0x0D50
|
||||||
|
#define GL_RED_BITS 0x0D52
|
||||||
|
#define GL_GREEN_BITS 0x0D53
|
||||||
|
#define GL_BLUE_BITS 0x0D54
|
||||||
|
#define GL_ALPHA_BITS 0x0D55
|
||||||
|
#define GL_DEPTH_BITS 0x0D56
|
||||||
|
#define GL_STENCIL_BITS 0x0D57
|
||||||
|
#define GL_POLYGON_OFFSET_UNITS 0x2A00
|
||||||
|
#define GL_POLYGON_OFFSET_FACTOR 0x8038
|
||||||
|
#define GL_TEXTURE_BINDING_2D 0x8069
|
||||||
|
#define GL_SAMPLE_BUFFERS 0x80A8
|
||||||
|
#define GL_SAMPLES 0x80A9
|
||||||
|
#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
|
||||||
|
#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
|
||||||
|
#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
|
||||||
|
#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
|
||||||
|
#define GL_DONT_CARE 0x1100
|
||||||
|
#define GL_FASTEST 0x1101
|
||||||
|
#define GL_NICEST 0x1102
|
||||||
|
#define GL_GENERATE_MIPMAP_HINT 0x8192
|
||||||
|
#define GL_BYTE 0x1400
|
||||||
|
#define GL_UNSIGNED_BYTE 0x1401
|
||||||
|
#define GL_SHORT 0x1402
|
||||||
|
#define GL_UNSIGNED_SHORT 0x1403
|
||||||
|
#define GL_INT 0x1404
|
||||||
|
#define GL_UNSIGNED_INT 0x1405
|
||||||
|
#define GL_FLOAT 0x1406
|
||||||
|
#define GL_FIXED 0x140C
|
||||||
|
#define GL_DEPTH_COMPONENT 0x1902
|
||||||
|
#define GL_ALPHA 0x1906
|
||||||
|
#define GL_RGB 0x1907
|
||||||
|
#define GL_RGBA 0x1908
|
||||||
|
#define GL_LUMINANCE 0x1909
|
||||||
|
#define GL_LUMINANCE_ALPHA 0x190A
|
||||||
|
#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
|
||||||
|
#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
|
||||||
|
#define GL_UNSIGNED_SHORT_5_6_5 0x8363
|
||||||
|
#define GL_FRAGMENT_SHADER 0x8B30
|
||||||
|
#define GL_VERTEX_SHADER 0x8B31
|
||||||
|
#define GL_MAX_VERTEX_ATTRIBS 0x8869
|
||||||
|
#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
|
||||||
|
#define GL_MAX_VARYING_VECTORS 0x8DFC
|
||||||
|
#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
|
||||||
|
#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
|
||||||
|
#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
|
||||||
|
#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
|
||||||
|
#define GL_SHADER_TYPE 0x8B4F
|
||||||
|
#define GL_DELETE_STATUS 0x8B80
|
||||||
|
#define GL_LINK_STATUS 0x8B82
|
||||||
|
#define GL_VALIDATE_STATUS 0x8B83
|
||||||
|
#define GL_ATTACHED_SHADERS 0x8B85
|
||||||
|
#define GL_ACTIVE_UNIFORMS 0x8B86
|
||||||
|
#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
|
||||||
|
#define GL_ACTIVE_ATTRIBUTES 0x8B89
|
||||||
|
#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
|
||||||
|
#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
|
||||||
|
#define GL_CURRENT_PROGRAM 0x8B8D
|
||||||
|
#define GL_NEVER 0x0200
|
||||||
|
#define GL_LESS 0x0201
|
||||||
|
#define GL_EQUAL 0x0202
|
||||||
|
#define GL_LEQUAL 0x0203
|
||||||
|
#define GL_GREATER 0x0204
|
||||||
|
#define GL_NOTEQUAL 0x0205
|
||||||
|
#define GL_GEQUAL 0x0206
|
||||||
|
#define GL_ALWAYS 0x0207
|
||||||
|
#define GL_KEEP 0x1E00
|
||||||
|
#define GL_REPLACE 0x1E01
|
||||||
|
#define GL_INCR 0x1E02
|
||||||
|
#define GL_DECR 0x1E03
|
||||||
|
#define GL_INVERT 0x150A
|
||||||
|
#define GL_INCR_WRAP 0x8507
|
||||||
|
#define GL_DECR_WRAP 0x8508
|
||||||
|
#define GL_VENDOR 0x1F00
|
||||||
|
#define GL_RENDERER 0x1F01
|
||||||
|
#define GL_VERSION 0x1F02
|
||||||
|
#define GL_EXTENSIONS 0x1F03
|
||||||
|
#define GL_NEAREST 0x2600
|
||||||
|
#define GL_LINEAR 0x2601
|
||||||
|
#define GL_NEAREST_MIPMAP_NEAREST 0x2700
|
||||||
|
#define GL_LINEAR_MIPMAP_NEAREST 0x2701
|
||||||
|
#define GL_NEAREST_MIPMAP_LINEAR 0x2702
|
||||||
|
#define GL_LINEAR_MIPMAP_LINEAR 0x2703
|
||||||
|
#define GL_TEXTURE_MAG_FILTER 0x2800
|
||||||
|
#define GL_TEXTURE_MIN_FILTER 0x2801
|
||||||
|
#define GL_TEXTURE_WRAP_S 0x2802
|
||||||
|
#define GL_TEXTURE_WRAP_T 0x2803
|
||||||
|
#define GL_TEXTURE 0x1702
|
||||||
|
#define GL_TEXTURE_CUBE_MAP 0x8513
|
||||||
|
#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
|
||||||
|
#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
|
||||||
|
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
|
||||||
|
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
|
||||||
|
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
|
||||||
|
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
|
||||||
|
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
|
||||||
|
#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
|
||||||
|
#define GL_TEXTURE0 0x84C0
|
||||||
|
#define GL_TEXTURE1 0x84C1
|
||||||
|
#define GL_TEXTURE2 0x84C2
|
||||||
|
#define GL_TEXTURE3 0x84C3
|
||||||
|
#define GL_TEXTURE4 0x84C4
|
||||||
|
#define GL_TEXTURE5 0x84C5
|
||||||
|
#define GL_TEXTURE6 0x84C6
|
||||||
|
#define GL_TEXTURE7 0x84C7
|
||||||
|
#define GL_TEXTURE8 0x84C8
|
||||||
|
#define GL_TEXTURE9 0x84C9
|
||||||
|
#define GL_TEXTURE10 0x84CA
|
||||||
|
#define GL_TEXTURE11 0x84CB
|
||||||
|
#define GL_TEXTURE12 0x84CC
|
||||||
|
#define GL_TEXTURE13 0x84CD
|
||||||
|
#define GL_TEXTURE14 0x84CE
|
||||||
|
#define GL_TEXTURE15 0x84CF
|
||||||
|
#define GL_TEXTURE16 0x84D0
|
||||||
|
#define GL_TEXTURE17 0x84D1
|
||||||
|
#define GL_TEXTURE18 0x84D2
|
||||||
|
#define GL_TEXTURE19 0x84D3
|
||||||
|
#define GL_TEXTURE20 0x84D4
|
||||||
|
#define GL_TEXTURE21 0x84D5
|
||||||
|
#define GL_TEXTURE22 0x84D6
|
||||||
|
#define GL_TEXTURE23 0x84D7
|
||||||
|
#define GL_TEXTURE24 0x84D8
|
||||||
|
#define GL_TEXTURE25 0x84D9
|
||||||
|
#define GL_TEXTURE26 0x84DA
|
||||||
|
#define GL_TEXTURE27 0x84DB
|
||||||
|
#define GL_TEXTURE28 0x84DC
|
||||||
|
#define GL_TEXTURE29 0x84DD
|
||||||
|
#define GL_TEXTURE30 0x84DE
|
||||||
|
#define GL_TEXTURE31 0x84DF
|
||||||
|
#define GL_ACTIVE_TEXTURE 0x84E0
|
||||||
|
#define GL_REPEAT 0x2901
|
||||||
|
#define GL_CLAMP_TO_EDGE 0x812F
|
||||||
|
#define GL_MIRRORED_REPEAT 0x8370
|
||||||
|
#define GL_FLOAT_VEC2 0x8B50
|
||||||
|
#define GL_FLOAT_VEC3 0x8B51
|
||||||
|
#define GL_FLOAT_VEC4 0x8B52
|
||||||
|
#define GL_INT_VEC2 0x8B53
|
||||||
|
#define GL_INT_VEC3 0x8B54
|
||||||
|
#define GL_INT_VEC4 0x8B55
|
||||||
|
#define GL_BOOL 0x8B56
|
||||||
|
#define GL_BOOL_VEC2 0x8B57
|
||||||
|
#define GL_BOOL_VEC3 0x8B58
|
||||||
|
#define GL_BOOL_VEC4 0x8B59
|
||||||
|
#define GL_FLOAT_MAT2 0x8B5A
|
||||||
|
#define GL_FLOAT_MAT3 0x8B5B
|
||||||
|
#define GL_FLOAT_MAT4 0x8B5C
|
||||||
|
#define GL_SAMPLER_2D 0x8B5E
|
||||||
|
#define GL_SAMPLER_CUBE 0x8B60
|
||||||
|
#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
|
||||||
|
#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
|
||||||
|
#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
|
||||||
|
#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
|
||||||
|
#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
|
||||||
|
#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
|
||||||
|
#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
|
||||||
|
#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
|
||||||
|
#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
|
||||||
|
#define GL_COMPILE_STATUS 0x8B81
|
||||||
|
#define GL_INFO_LOG_LENGTH 0x8B84
|
||||||
|
#define GL_SHADER_SOURCE_LENGTH 0x8B88
|
||||||
|
#define GL_SHADER_COMPILER 0x8DFA
|
||||||
|
#define GL_SHADER_BINARY_FORMATS 0x8DF8
|
||||||
|
#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
|
||||||
|
#define GL_LOW_FLOAT 0x8DF0
|
||||||
|
#define GL_MEDIUM_FLOAT 0x8DF1
|
||||||
|
#define GL_HIGH_FLOAT 0x8DF2
|
||||||
|
#define GL_LOW_INT 0x8DF3
|
||||||
|
#define GL_MEDIUM_INT 0x8DF4
|
||||||
|
#define GL_HIGH_INT 0x8DF5
|
||||||
|
#define GL_FRAMEBUFFER 0x8D40
|
||||||
|
#define GL_RENDERBUFFER 0x8D41
|
||||||
|
#define GL_RGBA4 0x8056
|
||||||
|
#define GL_RGB5_A1 0x8057
|
||||||
|
#define GL_RGB565 0x8D62
|
||||||
|
#define GL_DEPTH_COMPONENT16 0x81A5
|
||||||
|
#define GL_STENCIL_INDEX8 0x8D48
|
||||||
|
#define GL_RENDERBUFFER_WIDTH 0x8D42
|
||||||
|
#define GL_RENDERBUFFER_HEIGHT 0x8D43
|
||||||
|
#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
|
||||||
|
#define GL_RENDERBUFFER_RED_SIZE 0x8D50
|
||||||
|
#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
|
||||||
|
#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
|
||||||
|
#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
|
||||||
|
#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
|
||||||
|
#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
|
||||||
|
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
|
||||||
|
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
|
||||||
|
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
|
||||||
|
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
|
||||||
|
#define GL_COLOR_ATTACHMENT0 0x8CE0
|
||||||
|
#define GL_DEPTH_ATTACHMENT 0x8D00
|
||||||
|
#define GL_STENCIL_ATTACHMENT 0x8D20
|
||||||
|
#define GL_NONE 0
|
||||||
|
#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
|
||||||
|
#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
|
||||||
|
#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
|
||||||
|
#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
|
||||||
|
#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
|
||||||
|
#define GL_FRAMEBUFFER_BINDING 0x8CA6
|
||||||
|
#define GL_RENDERBUFFER_BINDING 0x8CA7
|
||||||
|
#define GL_MAX_RENDERBUFFER_SIZE 0x84E8
|
||||||
|
#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
|
||||||
|
typedef void (GL_APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLBINDTEXTUREPROC) (GLenum target, GLuint texture);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLBLENDCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLBLENDFUNCPROC) (GLenum sfactor, GLenum dfactor);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
|
||||||
|
typedef GLenum (GL_APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLCLEARPROC) (GLbitfield mask);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLCLEARCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLCLEARDEPTHFPROC) (GLfloat d);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLCLEARSTENCILPROC) (GLint s);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLCOLORMASKPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLCOPYTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||||
|
typedef GLuint (GL_APIENTRYP PFNGLCREATEPROGRAMPROC) (void);
|
||||||
|
typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROC) (GLenum type);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLCULLFACEPROC) (GLenum mode);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLDELETETEXTURESPROC) (GLsizei n, const GLuint *textures);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLDEPTHFUNCPROC) (GLenum func);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLDEPTHMASKPROC) (GLboolean flag);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLDEPTHRANGEFPROC) (GLfloat n, GLfloat f);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLDISABLEPROC) (GLenum cap);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLDRAWARRAYSPROC) (GLenum mode, GLint first, GLsizei count);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLENABLEPROC) (GLenum cap);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLFINISHPROC) (void);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLFLUSHPROC) (void);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLFRONTFACEPROC) (GLenum mode);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGENTEXTURESPROC) (GLsizei n, GLuint *textures);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
|
||||||
|
typedef GLint (GL_APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETBOOLEANVPROC) (GLenum pname, GLboolean *data);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
|
||||||
|
typedef GLenum (GL_APIENTRYP PFNGLGETERRORPROC) (void);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETFLOATVPROC) (GLenum pname, GLfloat *data);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETINTEGERVPROC) (GLenum pname, GLint *data);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
|
||||||
|
typedef const GLubyte *(GL_APIENTRYP PFNGLGETSTRINGPROC) (GLenum name);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params);
|
||||||
|
typedef GLint (GL_APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, void **pointer);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLHINTPROC) (GLenum target, GLenum mode);
|
||||||
|
typedef GLboolean (GL_APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer);
|
||||||
|
typedef GLboolean (GL_APIENTRYP PFNGLISENABLEDPROC) (GLenum cap);
|
||||||
|
typedef GLboolean (GL_APIENTRYP PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer);
|
||||||
|
typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPROC) (GLuint program);
|
||||||
|
typedef GLboolean (GL_APIENTRYP PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer);
|
||||||
|
typedef GLboolean (GL_APIENTRYP PFNGLISSHADERPROC) (GLuint shader);
|
||||||
|
typedef GLboolean (GL_APIENTRYP PFNGLISTEXTUREPROC) (GLuint texture);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLLINEWIDTHPROC) (GLfloat width);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLPIXELSTOREIPROC) (GLenum pname, GLint param);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLPOLYGONOFFSETPROC) (GLfloat factor, GLfloat units);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLREADPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLRELEASESHADERCOMPILERPROC) (void);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLfloat value, GLboolean invert);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLSCISSORPROC) (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryFormat, const void *binary, GLsizei length);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLSTENCILFUNCPROC) (GLenum func, GLint ref, GLuint mask);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLSTENCILMASKPROC) (GLuint mask);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLSTENCILOPPROC) (GLenum fail, GLenum zfail, GLenum zpass);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLTEXIMAGE2DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLTEXPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat param);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLTEXPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIPROC) (GLenum target, GLenum pname, GLint param);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLVIEWPORTPROC) (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||||
|
#if GL_GLES_PROTOTYPES
|
||||||
|
GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture);
|
||||||
|
GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
|
||||||
|
GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name);
|
||||||
|
GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
|
||||||
|
GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
|
||||||
|
GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
|
||||||
|
GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
|
||||||
|
GL_APICALL void GL_APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
|
||||||
|
GL_APICALL void GL_APIENTRY glBlendEquation (GLenum mode);
|
||||||
|
GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
|
||||||
|
GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
|
||||||
|
GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
|
||||||
|
GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
|
||||||
|
GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
|
||||||
|
GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target);
|
||||||
|
GL_APICALL void GL_APIENTRY glClear (GLbitfield mask);
|
||||||
|
GL_APICALL void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
|
||||||
|
GL_APICALL void GL_APIENTRY glClearDepthf (GLfloat d);
|
||||||
|
GL_APICALL void GL_APIENTRY glClearStencil (GLint s);
|
||||||
|
GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
|
||||||
|
GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader);
|
||||||
|
GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
|
||||||
|
GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
|
||||||
|
GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
|
||||||
|
GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||||
|
GL_APICALL GLuint GL_APIENTRY glCreateProgram (void);
|
||||||
|
GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type);
|
||||||
|
GL_APICALL void GL_APIENTRY glCullFace (GLenum mode);
|
||||||
|
GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers);
|
||||||
|
GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers);
|
||||||
|
GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program);
|
||||||
|
GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers);
|
||||||
|
GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader);
|
||||||
|
GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures);
|
||||||
|
GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func);
|
||||||
|
GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag);
|
||||||
|
GL_APICALL void GL_APIENTRY glDepthRangef (GLfloat n, GLfloat f);
|
||||||
|
GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader);
|
||||||
|
GL_APICALL void GL_APIENTRY glDisable (GLenum cap);
|
||||||
|
GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index);
|
||||||
|
GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
|
||||||
|
GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices);
|
||||||
|
GL_APICALL void GL_APIENTRY glEnable (GLenum cap);
|
||||||
|
GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index);
|
||||||
|
GL_APICALL void GL_APIENTRY glFinish (void);
|
||||||
|
GL_APICALL void GL_APIENTRY glFlush (void);
|
||||||
|
GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
|
||||||
|
GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
||||||
|
GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode);
|
||||||
|
GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers);
|
||||||
|
GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target);
|
||||||
|
GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers);
|
||||||
|
GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers);
|
||||||
|
GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
|
||||||
|
GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar *name);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *data);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);
|
||||||
|
GL_APICALL GLenum GL_APIENTRY glGetError (void);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *data);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *data);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
|
||||||
|
GL_APICALL const GLubyte *GL_APIENTRY glGetString (GLenum name);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params);
|
||||||
|
GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar *name);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer);
|
||||||
|
GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode);
|
||||||
|
GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer);
|
||||||
|
GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap);
|
||||||
|
GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer);
|
||||||
|
GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program);
|
||||||
|
GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer);
|
||||||
|
GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader);
|
||||||
|
GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture);
|
||||||
|
GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width);
|
||||||
|
GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program);
|
||||||
|
GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
|
||||||
|
GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
|
||||||
|
GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
|
||||||
|
GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void);
|
||||||
|
GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
|
||||||
|
GL_APICALL void GL_APIENTRY glSampleCoverage (GLfloat value, GLboolean invert);
|
||||||
|
GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||||
|
GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryFormat, const void *binary, GLsizei length);
|
||||||
|
GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
|
||||||
|
GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
|
||||||
|
GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
|
||||||
|
GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask);
|
||||||
|
GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
|
||||||
|
GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
|
||||||
|
GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
|
||||||
|
GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
|
||||||
|
GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
|
||||||
|
GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
|
||||||
|
GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
|
||||||
|
GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat v0);
|
||||||
|
GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value);
|
||||||
|
GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint v0);
|
||||||
|
GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value);
|
||||||
|
GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1);
|
||||||
|
GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value);
|
||||||
|
GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint v0, GLint v1);
|
||||||
|
GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value);
|
||||||
|
GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
|
||||||
|
GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value);
|
||||||
|
GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2);
|
||||||
|
GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value);
|
||||||
|
GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
|
||||||
|
GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value);
|
||||||
|
GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
|
||||||
|
GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value);
|
||||||
|
GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||||
|
GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||||
|
GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||||
|
GL_APICALL void GL_APIENTRY glUseProgram (GLuint program);
|
||||||
|
GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program);
|
||||||
|
GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint index, GLfloat x);
|
||||||
|
GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v);
|
||||||
|
GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y);
|
||||||
|
GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v);
|
||||||
|
GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z);
|
||||||
|
GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v);
|
||||||
|
GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
|
||||||
|
GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v);
|
||||||
|
GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
|
||||||
|
GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||||
|
#endif
|
||||||
|
#endif /* GL_ES_VERSION_2_0 */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,739 @@
|
|||||||
|
//
|
||||||
|
// Copyright 2017 The ANGLE Project Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
|
// found in the LICENSE file.
|
||||||
|
//
|
||||||
|
// gl2ext_angle.h: ANGLE modifications to the gl2ext.h header file.
|
||||||
|
// Currently we don't include this file directly, we patch gl2ext.h
|
||||||
|
// to include it implicitly so it is visible throughout our code.
|
||||||
|
|
||||||
|
#ifndef INCLUDE_GLES2_GL2EXT_ANGLE_H_
|
||||||
|
#define INCLUDE_GLES2_GL2EXT_ANGLE_H_
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
|
||||||
|
#ifndef GL_ANGLE_client_arrays
|
||||||
|
#define GL_ANGLE_client_arrays 1
|
||||||
|
#define GL_CLIENT_ARRAYS_ANGLE 0x93AA
|
||||||
|
#endif /* GL_ANGLE_client_arrays */
|
||||||
|
|
||||||
|
#ifndef GL_ANGLE_request_extension
|
||||||
|
#define GL_ANGLE_request_extension 1
|
||||||
|
#define GL_REQUESTABLE_EXTENSIONS_ANGLE 0x93A8
|
||||||
|
#define GL_NUM_REQUESTABLE_EXTENSIONS_ANGLE 0x93A9
|
||||||
|
typedef void (GL_APIENTRYP PFNGLREQUESTEXTENSIONANGLEPROC) (const GLchar *name);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLDISABLEEXTENSIONANGLEPROC) (const GLchar *name);
|
||||||
|
#ifdef GL_GLEXT_PROTOTYPES
|
||||||
|
GL_APICALL void GL_APIENTRY glRequestExtensionANGLE (const GLchar *name);
|
||||||
|
GL_APICALL void GL_APIENTRY glDisableExtensionANGLE (const GLchar *name);
|
||||||
|
#endif
|
||||||
|
#endif /* GL_ANGLE_webgl_compatibility */
|
||||||
|
|
||||||
|
#ifndef GL_ANGLE_robust_resource_initialization
|
||||||
|
#define GL_ANGLE_robust_resource_initialization 1
|
||||||
|
#define GL_ROBUST_RESOURCE_INITIALIZATION_ANGLE 0x93AB
|
||||||
|
#define GL_RESOURCE_INITIALIZED_ANGLE 0x969F
|
||||||
|
#endif /* GL_ANGLE_robust_resource_initialization */
|
||||||
|
|
||||||
|
#ifndef GL_ANGLE_polygon_mode
|
||||||
|
#define GL_ANGLE_polygon_mode 1
|
||||||
|
#define GL_POLYGON_MODE_ANGLE 0x0B40
|
||||||
|
#define GL_POLYGON_OFFSET_LINE_ANGLE 0x2A02
|
||||||
|
#define GL_LINE_ANGLE 0x1B01
|
||||||
|
#define GL_FILL_ANGLE 0x1B02
|
||||||
|
typedef void (GL_APIENTRYP PFNGLPOLYGONMODEANGLEPROC) (GLenum face, GLenum mode);
|
||||||
|
#ifdef GL_GLEXT_PROTOTYPES
|
||||||
|
GL_APICALL void GL_APIENTRY glPolygonModeANGLE (GLenum face, GLenum mode);
|
||||||
|
#endif
|
||||||
|
#endif /* GL_ANGLE_polygon_mode */
|
||||||
|
|
||||||
|
#ifndef GL_ANGLE_provoking_vertex
|
||||||
|
#define GL_ANGLE_provoking_vertex 1
|
||||||
|
#define GL_FIRST_VERTEX_CONVENTION_ANGLE 0x8E4D
|
||||||
|
#define GL_LAST_VERTEX_CONVENTION_ANGLE 0x8E4E
|
||||||
|
#define GL_PROVOKING_VERTEX_ANGLE 0x8E4F
|
||||||
|
typedef void (GL_APIENTRYP PFNGLPROVOKINGVERTEXANGLEPROC) (GLenum);
|
||||||
|
#ifdef GL_GLEXT_PROTOTYPES
|
||||||
|
GL_APICALL void GL_APIENTRY glProvokingVertexANGLE(GLenum provokeMode);
|
||||||
|
#endif
|
||||||
|
#endif /* GL_ANGLE_provoking_vertex */
|
||||||
|
|
||||||
|
#ifndef GL_ANGLE_clip_cull_distance
|
||||||
|
#define GL_ANGLE_clip_cull_distance 1
|
||||||
|
#define GL_MAX_CLIP_DISTANCES_ANGLE 0x0D32
|
||||||
|
#define GL_MAX_CULL_DISTANCES_ANGLE 0x82F9
|
||||||
|
#define GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES_ANGLE 0x82FA
|
||||||
|
#define GL_CLIP_DISTANCE0_ANGLE 0x3000
|
||||||
|
#define GL_CLIP_DISTANCE1_ANGLE 0x3001
|
||||||
|
#define GL_CLIP_DISTANCE2_ANGLE 0x3002
|
||||||
|
#define GL_CLIP_DISTANCE3_ANGLE 0x3003
|
||||||
|
#define GL_CLIP_DISTANCE4_ANGLE 0x3004
|
||||||
|
#define GL_CLIP_DISTANCE5_ANGLE 0x3005
|
||||||
|
#define GL_CLIP_DISTANCE6_ANGLE 0x3006
|
||||||
|
#define GL_CLIP_DISTANCE7_ANGLE 0x3007
|
||||||
|
#endif /* GL_ANGLE_clip_cull_distance */
|
||||||
|
|
||||||
|
#ifndef GL_ANGLE_stencil_texturing
|
||||||
|
#define GL_ANGLE_stencil_texturing 1
|
||||||
|
#define GL_DEPTH_STENCIL_TEXTURE_MODE_ANGLE 0x90EA
|
||||||
|
#define GL_STENCIL_INDEX_ANGLE 0x1901
|
||||||
|
#endif /* GL_ANGLE_stencil_texturing */
|
||||||
|
|
||||||
|
#ifndef GL_ANGLE_renderability_validation
|
||||||
|
#define GL_ANGLE_renderability_validation 1
|
||||||
|
#define GL_RENDERABILITY_VALIDATION_ANGLE 0x9EA0
|
||||||
|
#endif /* GL_ANGLE_renderability_validation */
|
||||||
|
|
||||||
|
#ifndef GL_CHROMIUM_framebuffer_mixed_samples
|
||||||
|
#define GL_CHROMIUM_frambuffer_mixed_samples 1
|
||||||
|
#define GL_COVERAGE_MODULATION_CHROMIUM 0x9332
|
||||||
|
typedef void (GL_APIENTRYP PFNGLCOVERAGEMODULATIONCHROMIUMPROC) (GLenum components);
|
||||||
|
#ifdef GL_GLEXT_PROTOTYPES
|
||||||
|
GL_APICALL void GL_APIENTRY glCoverageModulationCHROMIUM(GLenum components);
|
||||||
|
#endif
|
||||||
|
#endif /* GL_CHROMIUM_framebuffer_mixed_samples */
|
||||||
|
|
||||||
|
#ifndef GL_CHROMIUM_bind_generates_resource
|
||||||
|
#define GL_CHROMIUM_bind_generates_resource 1
|
||||||
|
#define GL_BIND_GENERATES_RESOURCE_CHROMIUM 0x9244
|
||||||
|
#endif /* GL_CHROMIUM_bind_generates_resource */
|
||||||
|
|
||||||
|
#ifndef GL_ANGLE_memory_size
|
||||||
|
#define GL_ANGLE_memory_size
|
||||||
|
#define GL_MEMORY_SIZE_ANGLE 0x93AD
|
||||||
|
#endif /* GL_ANGLE_memory_size */
|
||||||
|
|
||||||
|
// needed by NV_path_rendering (and thus CHROMIUM_path_rendering)
|
||||||
|
// but CHROMIUM_path_rendering only needs MatrixLoadfEXT, MatrixLoadIdentityEXT
|
||||||
|
#ifndef GL_EXT_direct_state_access
|
||||||
|
#define GL_EXT_direct_state_access 1
|
||||||
|
typedef void(GL_APIENTRYP PFNGLMATRIXLOADFEXTPROC)(GLenum matrixMode, const GLfloat *m);
|
||||||
|
typedef void(GL_APIENTRYP PFNGLMATRIXLOADIDENTITYEXTPROC)(GLenum matrixMode);
|
||||||
|
#ifdef GL_GLEXT_PROTOTYPES
|
||||||
|
GL_APICALL void GL_APIENTRY glMatrixLoadfEXT(GLenum matrixMode, const GLfloat *m);
|
||||||
|
GL_APICALL void GL_APIENTRY glMatrixLoadIdentityEXT(GLenum matrixMode);
|
||||||
|
#endif
|
||||||
|
#endif /* GL_EXT_direct_state_access */
|
||||||
|
|
||||||
|
#ifndef GL_CHROMIUM_copy_texture
|
||||||
|
#define GL_CHROMIUM_copy_texture 1
|
||||||
|
typedef void(GL_APIENTRYP PFNGLCOPYTEXTURECHROMIUMPROC)(GLuint sourceId,
|
||||||
|
GLint sourceLevel,
|
||||||
|
GLenum destTarget,
|
||||||
|
GLuint destId,
|
||||||
|
GLint destLevel,
|
||||||
|
GLint internalFormat,
|
||||||
|
GLenum destType,
|
||||||
|
GLboolean unpackFlipY,
|
||||||
|
GLboolean unpackPremultiplyAlpha,
|
||||||
|
GLboolean unpackUnmultiplyAlpha);
|
||||||
|
typedef void(GL_APIENTRYP PFNGLCOPYSUBTEXTURECHROMIUMPROC)(GLuint sourceId,
|
||||||
|
GLint sourceLevel,
|
||||||
|
GLenum destTarget,
|
||||||
|
GLuint destId,
|
||||||
|
GLint destLevel,
|
||||||
|
GLint xoffset,
|
||||||
|
GLint yoffset,
|
||||||
|
GLint x,
|
||||||
|
GLint y,
|
||||||
|
GLsizei width,
|
||||||
|
GLsizei height,
|
||||||
|
GLboolean unpackFlipY,
|
||||||
|
GLboolean unpackPremultiplyAlpha,
|
||||||
|
GLboolean unpackUnmultiplyAlpha);
|
||||||
|
#ifdef GL_GLEXT_PROTOTYPES
|
||||||
|
GL_APICALL void GL_APIENTRY glCopyTextureCHROMIUM(GLuint sourceId,
|
||||||
|
GLint sourceLevel,
|
||||||
|
GLenum destTarget,
|
||||||
|
GLuint destId,
|
||||||
|
GLint destLevel,
|
||||||
|
GLint internalFormat,
|
||||||
|
GLenum destType,
|
||||||
|
GLboolean unpackFlipY,
|
||||||
|
GLboolean unpackPremultiplyAlpha,
|
||||||
|
GLboolean unpackUnmultiplyAlpha);
|
||||||
|
GL_APICALL void GL_APIENTRY glCopySubTextureCHROMIUM(GLuint sourceId,
|
||||||
|
GLint sourceLevel,
|
||||||
|
GLenum destTarget,
|
||||||
|
GLuint destId,
|
||||||
|
GLint destLevel,
|
||||||
|
GLint xoffset,
|
||||||
|
GLint yoffset,
|
||||||
|
GLint x,
|
||||||
|
GLint y,
|
||||||
|
GLsizei width,
|
||||||
|
GLsizei height,
|
||||||
|
GLboolean unpackFlipY,
|
||||||
|
GLboolean unpackPremultiplyAlpha,
|
||||||
|
GLboolean unpackUnmultiplyAlpha);
|
||||||
|
#endif
|
||||||
|
#endif /* GL_CHROMIUM_copy_texture */
|
||||||
|
|
||||||
|
#ifndef GL_CHROMIUM_compressed_copy_texture
|
||||||
|
#define GL_CHROMIUM_compressed_copy_texture 1
|
||||||
|
typedef void(GL_APIENTRYP PFNGLCOMPRESSEDCOPYTEXTURECHROMIUMPROC)(GLuint sourceId, GLuint destId);
|
||||||
|
#ifdef GL_GLEXT_PROTOTYPES
|
||||||
|
GL_APICALL void GL_APIENTRY glCompressedCopyTextureCHROMIUM(GLuint sourceId, GLuint destId);
|
||||||
|
#endif
|
||||||
|
#endif /* GL_CHROMIUM_compressed_copy_texture */
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef GL_ANGLE_copy_texture_3d
|
||||||
|
#define GL_ANGLE_copy_texture_3d 1
|
||||||
|
typedef void(GL_APIENTRYP PFNGLCOPYTEXTURE3DANGLEPROC)(GLuint sourceId,
|
||||||
|
GLint sourceLevel,
|
||||||
|
GLenum destTarget,
|
||||||
|
GLuint destId,
|
||||||
|
GLint destLevel,
|
||||||
|
GLint internalFormat,
|
||||||
|
GLenum destType,
|
||||||
|
GLboolean unpackFlipY,
|
||||||
|
GLboolean unpackPremultiplyAlpha,
|
||||||
|
GLboolean unpackUnmultiplyAlpha);
|
||||||
|
typedef void(GL_APIENTRYP PFNGLCOPYSUBTEXTURE3DANGLEPROC)(GLuint sourceId,
|
||||||
|
GLint sourceLevel,
|
||||||
|
GLenum destTarget,
|
||||||
|
GLuint destId,
|
||||||
|
GLint destLevel,
|
||||||
|
GLint xoffset,
|
||||||
|
GLint yoffset,
|
||||||
|
GLint zoffset,
|
||||||
|
GLint x,
|
||||||
|
GLint y,
|
||||||
|
GLint z,
|
||||||
|
GLsizei width,
|
||||||
|
GLsizei height,
|
||||||
|
GLsizei depth,
|
||||||
|
GLboolean unpackFlipY,
|
||||||
|
GLboolean unpackPremultiplyAlpha,
|
||||||
|
GLboolean unpackUnmultiplyAlpha);
|
||||||
|
#ifdef GL_GLEXT_PROTOTYPES
|
||||||
|
GL_APICALL void GL_APIENTRY glCopyTexture3DANGLE(GLuint sourceId,
|
||||||
|
GLint sourceLevel,
|
||||||
|
GLenum destTarget,
|
||||||
|
GLuint destId,
|
||||||
|
GLint destLevel,
|
||||||
|
GLint internalFormat,
|
||||||
|
GLenum destType,
|
||||||
|
GLboolean unpackFlipY,
|
||||||
|
GLboolean unpackPremultiplyAlpha,
|
||||||
|
GLboolean unpackUnmultiplyAlpha);
|
||||||
|
GL_APICALL void GL_APIENTRY glCopySubTexture3DANGLE(GLuint sourceId,
|
||||||
|
GLint sourceLevel,
|
||||||
|
GLenum destTarget,
|
||||||
|
GLuint destId,
|
||||||
|
GLint destLevel,
|
||||||
|
GLint xoffset,
|
||||||
|
GLint yoffset,
|
||||||
|
GLint zoffset,
|
||||||
|
GLint x,
|
||||||
|
GLint y,
|
||||||
|
GLint z,
|
||||||
|
GLsizei width,
|
||||||
|
GLsizei height,
|
||||||
|
GLsizei depth,
|
||||||
|
GLboolean unpackFlipY,
|
||||||
|
GLboolean unpackPremultiplyAlpha,
|
||||||
|
GLboolean unpackUnmultiplyAlpha);
|
||||||
|
#endif
|
||||||
|
#endif /* GL_ANGLE_copy_texture_3d */
|
||||||
|
|
||||||
|
#ifndef GL_CHROMIUM_sync_query
|
||||||
|
#define GL_CHROMIUM_sync_query 1
|
||||||
|
#define GL_COMMANDS_COMPLETED_CHROMIUM 0x84F7
|
||||||
|
#endif /* GL_CHROMIUM_sync_query */
|
||||||
|
|
||||||
|
#ifndef GL_EXT_texture_compression_s3tc_srgb
|
||||||
|
#define GL_EXT_texture_compression_s3tc_srgb 1
|
||||||
|
#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C
|
||||||
|
#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D
|
||||||
|
#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E
|
||||||
|
#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F
|
||||||
|
#endif /* GL_EXT_texture_compression_s3tc_srgb */
|
||||||
|
|
||||||
|
#ifndef GL_ANGLE_lossy_etc_decode
|
||||||
|
#define GL_ANGLE_lossy_etc_decode 1
|
||||||
|
#define GL_ETC1_RGB8_LOSSY_DECODE_ANGLE 0x9690
|
||||||
|
#define GL_COMPRESSED_R11_LOSSY_DECODE_EAC_ANGLE 0x9691
|
||||||
|
#define GL_COMPRESSED_SIGNED_R11_LOSSY_DECODE_EAC_ANGLE 0x9692
|
||||||
|
#define GL_COMPRESSED_RG11_LOSSY_DECODE_EAC_ANGLE 0x9693
|
||||||
|
#define GL_COMPRESSED_SIGNED_RG11_LOSSY_DECODE_EAC_ANGLE 0x9694
|
||||||
|
#define GL_COMPRESSED_RGB8_LOSSY_DECODE_ETC2_ANGLE 0x9695
|
||||||
|
#define GL_COMPRESSED_SRGB8_LOSSY_DECODE_ETC2_ANGLE 0x9696
|
||||||
|
#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_LOSSY_DECODE_ETC2_ANGLE 0x9697
|
||||||
|
#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_LOSSY_DECODE_ETC2_ANGLE 0x9698
|
||||||
|
#define GL_COMPRESSED_RGBA8_LOSSY_DECODE_ETC2_EAC_ANGLE 0x9699
|
||||||
|
#define GL_COMPRESSED_SRGB8_ALPHA8_LOSSY_DECODE_ETC2_EAC_ANGLE 0x969A
|
||||||
|
#endif /* GL_ANGLE_lossy_etc_decode */
|
||||||
|
|
||||||
|
#ifndef GL_ANGLE_robust_client_memory
|
||||||
|
#define GL_ANGLE_robust_client_memory 1
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETBOOLEANVROBUSTANGLEPROC) (GLenum pname, GLsizei bufSize, GLsizei *length, GLboolean *data);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETBUFFERPARAMETERIVROBUSTANGLEPROC) (GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETFLOATVROBUSTANGLEPROC) (GLenum pname, GLsizei bufSize, GLsizei *length, GLfloat *data);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVROBUSTANGLEPROC) (GLenum target, GLenum attachment, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETINTEGERVROBUSTANGLEPROC) (GLenum pname, GLsizei bufSize, GLsizei *length, GLint *data);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETPROGRAMIVROBUSTANGLEPROC) (GLuint program, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVROBUSTANGLEPROC) (GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETSHADERIVROBUSTANGLEPROC) (GLuint shader, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERFVROBUSTANGLEPROC) (GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, GLfloat *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIVROBUSTANGLEPROC) (GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETUNIFORMFVROBUSTANGLEPROC) (GLuint program, GLint location, GLsizei bufSize, GLsizei *length, GLfloat *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETUNIFORMIVROBUSTANGLEPROC) (GLuint program, GLint location, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBFVROBUSTANGLEPROC) (GLuint index, GLenum pname, GLsizei bufSize, GLsizei *length, GLfloat *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIVROBUSTANGLEPROC) (GLuint index, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVROBUSTANGLEPROC) (GLuint index, GLenum pname, GLsizei bufSize, GLsizei *length, void **pointer);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLREADPIXELSROBUSTANGLEPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLsizei *length, GLsizei *columns, GLsizei *rows, void *pixels);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLTEXIMAGE2DROBUSTANGLEPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, GLsizei bufSize, const void *pixels);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLTEXPARAMETERFVROBUSTANGLEPROC) (GLenum target, GLenum pname, GLsizei bufSize, const GLfloat *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIVROBUSTANGLEPROC) (GLenum target, GLenum pname, GLsizei bufSize, const GLint *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE2DROBUSTANGLEPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, const void *pixels);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DROBUSTANGLEPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, GLsizei bufSize, const void *pixels);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DROBUSTANGLEPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, const void *pixels);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DROBUSTANGLEPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, GLsizei bufSize, const void *data);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DROBUSTANGLEPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, GLsizei bufSize, const void *data);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DROBUSTANGLEPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, GLsizei bufSize, const void *data);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DROBUSTANGLEPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, GLsizei bufSize, const void *data);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETQUERYIVROBUSTANGLEPROC) (GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVROBUSTANGLEPROC) (GLuint id, GLenum pname, GLsizei bufSize, GLsizei *length, GLuint *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVROBUSTANGLEPROC) (GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, void **params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETINTEGERI_VROBUSTANGLEPROC) (GLenum target, GLuint index, GLsizei bufSize, GLsizei *length, GLint *data);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETINTERNALFORMATIVROBUSTANGLEPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIIVROBUSTANGLEPROC) (GLuint index, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIUIVROBUSTANGLEPROC) (GLuint index, GLenum pname, GLsizei bufSize, GLsizei *length, GLuint *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETUNIFORMUIVROBUSTANGLEPROC) (GLuint program, GLint location, GLsizei bufSize, GLsizei *length, GLuint *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVROBUSTANGLEPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETINTEGER64VROBUSTANGLEPROC) (GLenum pname, GLsizei bufSize, GLsizei *length, GLint64 *data);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETINTEGER64I_VROBUSTANGLEPROC) (GLenum target, GLuint index, GLsizei bufSize, GLsizei *length, GLint64 *data);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETBUFFERPARAMETERI64VROBUSTANGLEPROC) (GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, GLint64 *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIVROBUSTANGLEPROC) (GLuint sampler, GLenum pname, GLsizei bufSize, const GLint *param);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERFVROBUSTANGLEPROC) (GLuint sampler, GLenum pname, GLsizei bufSize, const GLfloat *param);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIVROBUSTANGLEPROC) (GLuint sampler, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERFVROBUSTANGLEPROC) (GLuint sampler, GLenum pname, GLsizei bufSize, GLsizei *length, GLfloat *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVROBUSTANGLEPROC) (GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETPROGRAMINTERFACEIVROBUSTANGLEPROC) (GLuint program, GLenum programInterface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETBOOLEANI_VROBUSTANGLEPROC) (GLenum target, GLuint index, GLsizei bufSize, GLsizei *length, GLboolean *data);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETMULTISAMPLEFVROBUSTANGLEPROC) (GLenum pname, GLuint index, GLsizei bufSize, GLsizei *length, GLfloat *val);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETTEXLEVELPARAMETERIVROBUSTANGLEPROC) (GLenum target, GLint level, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETTEXLEVELPARAMETERFVROBUSTANGLEPROC) (GLenum target, GLint level, GLenum pname, GLsizei bufSize, GLsizei *length, GLfloat *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETPOINTERVROBUSTANGLEROBUSTANGLEPROC) (GLenum pname, GLsizei bufSize, GLsizei *length, void **params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLREADNPIXELSROBUSTANGLEPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLsizei *length, GLsizei *columns, GLsizei *rows, void *data);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVROBUSTANGLEPROC) (GLuint program, GLint location, GLsizei bufSize, GLsizei *length, GLfloat *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVROBUSTANGLEPROC) (GLuint program, GLint location, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETNUNIFORMUIVROBUSTANGLEPROC) (GLuint program, GLint location, GLsizei bufSize, GLsizei *length, GLuint *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIIVROBUSTANGLEPROC) (GLenum target, GLenum pname, GLsizei bufSize, const GLint *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIUIVROBUSTANGLEPROC) (GLenum target, GLenum pname, GLsizei bufSize, const GLuint *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIIVROBUSTANGLEPROC) (GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIUIVROBUSTANGLEPROC) (GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, GLuint *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIIVROBUSTANGLEPROC) (GLuint sampler, GLenum pname, GLsizei bufSize, const GLint *param);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIUIVROBUSTANGLEPROC) (GLuint sampler, GLenum pname, GLsizei bufSize, const GLuint *param);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIIVROBUSTANGLEPROC) (GLuint sampler, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVROBUSTANGLEPROC) (GLuint sampler, GLenum pname, GLsizei bufSize, GLsizei *length, GLuint *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTIVROBUSTANGLEPROC)(GLuint id, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTI64VROBUSTANGLEPROC)(GLuint id, GLenum pname, GLsizei bufSize, GLsizei *length, GLint64 *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUI64VROBUSTANGLEPROC)(GLuint id, GLenum pname, GLsizei bufSize, GLsizei *length, GLuint64 *params);
|
||||||
|
#ifdef GL_GLEXT_PROTOTYPES
|
||||||
|
GL_APICALL void GL_APIENTRY glGetBooleanvRobustANGLE (GLenum pname, GLsizei bufSize, GLsizei *length, GLboolean *data);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetBufferParameterivRobustANGLE (GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetFloatvRobustANGLE (GLenum pname, GLsizei bufSize, GLsizei *length, GLfloat *data);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameterivRobustANGLE (GLenum target, GLenum attachment, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetIntegervRobustANGLE (GLenum pname, GLsizei bufSize, GLsizei *length, GLint *data);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetProgramivRobustANGLE (GLuint program, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetRenderbufferParameterivRobustANGLE (GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetShaderivRobustANGLE (GLuint shader, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetTexParameterfvRobustANGLE (GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, GLfloat *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetTexParameterivRobustANGLE (GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetUniformfvRobustANGLE (GLuint program, GLint location, GLsizei bufSize, GLsizei *length, GLfloat *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetUniformivRobustANGLE (GLuint program, GLint location, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetVertexAttribfvRobustANGLE (GLuint index, GLenum pname, GLsizei bufSize, GLsizei *length, GLfloat *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetVertexAttribivRobustANGLE (GLuint index, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetVertexAttribPointervRobustANGLE (GLuint index, GLenum pname, GLsizei bufSize, GLsizei *length, void **pointer);
|
||||||
|
GL_APICALL void GL_APIENTRY glReadPixelsRobustANGLE (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLsizei *length, GLsizei *columns, GLsizei *rows, void *pixels);
|
||||||
|
GL_APICALL void GL_APIENTRY glTexImage2DRobustANGLE (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, GLsizei bufSize, const void *pixels);
|
||||||
|
GL_APICALL void GL_APIENTRY glTexParameterfvRobustANGLE (GLenum target, GLenum pname, GLsizei bufSize, const GLfloat *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glTexParameterivRobustANGLE (GLenum target, GLenum pname, GLsizei bufSize, const GLint *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glTexSubImage2DRobustANGLE (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, const void *pixels);
|
||||||
|
GL_APICALL void GL_APIENTRY glTexImage3DRobustANGLE (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, GLsizei bufSize, const void *pixels);
|
||||||
|
GL_APICALL void GL_APIENTRY glTexSubImage3DRobustANGLE (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, const void *pixels);
|
||||||
|
GL_APICALL void GL_APIENTRY glCompressedTexImage2DRobustANGLE(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, GLsizei bufSize, const void *data);
|
||||||
|
GL_APICALL void GL_APIENTRY glCompressedTexSubImage2DRobustANGLE(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, GLsizei bufSize, const void *data);
|
||||||
|
GL_APICALL void GL_APIENTRY glCompressedTexImage3DRobustANGLE(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, GLsizei bufSize, const void *data);
|
||||||
|
GL_APICALL void GL_APIENTRY glCompressedTexSubImage3DRobustANGLE(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, GLsizei bufSize, const void *data);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetQueryivRobustANGLE (GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetQueryObjectuivRobustANGLE (GLuint id, GLenum pname, GLsizei bufSize, GLsizei *length, GLuint *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetBufferPointervRobustANGLE (GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, void **params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetIntegeri_vRobustANGLE (GLenum target, GLuint index, GLsizei bufSize, GLsizei *length, GLint *data);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetInternalformativRobustANGLE (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetVertexAttribIivRobustANGLE (GLuint index, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetVertexAttribIuivRobustANGLE (GLuint index, GLenum pname, GLsizei bufSize, GLsizei *length, GLuint *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetUniformuivRobustANGLE (GLuint program, GLint location, GLsizei bufSize, GLsizei *length, GLuint *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetActiveUniformBlockivRobustANGLE (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetInteger64vRobustANGLE (GLenum pname, GLsizei bufSize, GLsizei *length, GLint64 *data);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetInteger64i_vRobustANGLE (GLenum target, GLuint index, GLsizei bufSize, GLsizei *length, GLint64 *data);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetBufferParameteri64vRobustANGLE (GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, GLint64 *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glSamplerParameterivRobustANGLE (GLuint sampler, GLenum pname, GLsizei bufSize, const GLint *param);
|
||||||
|
GL_APICALL void GL_APIENTRY glSamplerParameterfvRobustANGLE (GLuint sampler, GLenum pname, GLsizei bufSize, const GLfloat *param);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetSamplerParameterivRobustANGLE (GLuint sampler, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetSamplerParameterfvRobustANGLE (GLuint sampler, GLenum pname, GLsizei bufSize, GLsizei *length, GLfloat *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetFramebufferParameterivRobustANGLE (GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetProgramInterfaceivRobustANGLE (GLuint program, GLenum programInterface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetBooleani_vRobustANGLE (GLenum target, GLuint index, GLsizei bufSize, GLsizei *length, GLboolean *data);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetMultisamplefvRobustANGLE (GLenum pname, GLuint index, GLsizei bufSize, GLsizei *length, GLfloat *val);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetTexLevelParameterivRobustANGLE (GLenum target, GLint level, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetTexLevelParameterfvRobustANGLE (GLenum target, GLint level, GLenum pname, GLsizei bufSize, GLsizei *length, GLfloat *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetPointervRobustANGLERobustANGLE (GLenum pname, GLsizei bufSize, GLsizei *length, void **params);
|
||||||
|
GL_APICALL void GL_APIENTRY glReadnPixelsRobustANGLE (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLsizei *length, GLsizei *columns, GLsizei *rows, void *data);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetnUniformfvRobustANGLE (GLuint program, GLint location, GLsizei bufSize, GLsizei *length, GLfloat *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetnUniformivRobustANGLE (GLuint program, GLint location, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetnUniformuivRobustANGLE (GLuint program, GLint location, GLsizei bufSize, GLsizei *length, GLuint *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glTexParameterIivRobustANGLE (GLenum target, GLenum pname, GLsizei bufSize, const GLint *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glTexParameterIuivRobustANGLE (GLenum target, GLenum pname, GLsizei bufSize, const GLuint *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetTexParameterIivRobustANGLE (GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetTexParameterIuivRobustANGLE (GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, GLuint *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glSamplerParameterIivRobustANGLE (GLuint sampler, GLenum pname, GLsizei bufSize, const GLint *param);
|
||||||
|
GL_APICALL void GL_APIENTRY glSamplerParameterIuivRobustANGLE (GLuint sampler, GLenum pname, GLsizei bufSize, const GLuint *param);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetSamplerParameterIivRobustANGLE (GLuint sampler, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetSamplerParameterIuivRobustANGLE (GLuint sampler, GLenum pname, GLsizei bufSize, GLsizei *length, GLuint *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetQueryObjectivRobustANGLE(GLuint id, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetQueryObjecti64vRobustANGLE(GLuint id, GLenum pname, GLsizei bufSize, GLsizei *length, GLint64 *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetQueryObjectui64vRobustANGLE(GLuint id, GLenum pname, GLsizei bufSize, GLsizei *length, GLuint64 *params);
|
||||||
|
#endif
|
||||||
|
#endif /* GL_ANGLE_robust_client_memory */
|
||||||
|
|
||||||
|
#ifndef GL_ANGLE_program_cache_control
|
||||||
|
#define GL_ANGLE_program_cache_control 1
|
||||||
|
#define GL_PROGRAM_CACHE_ENABLED_ANGLE 0x93AC
|
||||||
|
#endif /* GL_ANGLE_program_cache_control */
|
||||||
|
|
||||||
|
#ifndef GL_ANGLE_texture_rectangle
|
||||||
|
#define GL_ANGLE_texture_rectangle 1
|
||||||
|
#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ANGLE 0x84F8
|
||||||
|
#define GL_TEXTURE_RECTANGLE_ANGLE 0x84F5
|
||||||
|
#define GL_TEXTURE_BINDING_RECTANGLE_ANGLE 0x84F6
|
||||||
|
#define GL_SAMPLER_2D_RECT_ANGLE 0x8B63
|
||||||
|
#endif /* GL_ANGLE_texture_rectangle */
|
||||||
|
|
||||||
|
#ifndef GL_ANGLE_texture_multisample
|
||||||
|
#define GL_ANGLE_texture_multisample 1
|
||||||
|
#define GL_SAMPLE_POSITION_ANGLE 0x8E50
|
||||||
|
#define GL_SAMPLE_MASK_ANGLE 0x8E51
|
||||||
|
#define GL_SAMPLE_MASK_VALUE_ANGLE 0x8E52
|
||||||
|
#define GL_TEXTURE_2D_MULTISAMPLE_ANGLE 0x9100
|
||||||
|
#define GL_MAX_SAMPLE_MASK_WORDS_ANGLE 0x8E59
|
||||||
|
#define GL_MAX_COLOR_TEXTURE_SAMPLES_ANGLE 0x910E
|
||||||
|
#define GL_MAX_DEPTH_TEXTURE_SAMPLES_ANGLE 0x910F
|
||||||
|
#define GL_MAX_INTEGER_SAMPLES_ANGLE 0x9110
|
||||||
|
#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ANGLE 0x9104
|
||||||
|
#define GL_TEXTURE_SAMPLES_ANGLE 0x9106
|
||||||
|
#define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS_ANGLE 0x9107
|
||||||
|
typedef void(GL_APIENTRYP PFNGLTEXSTORAGE2DMULTISAMPLEANGLEPROC)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
|
||||||
|
typedef void(GL_APIENTRYP PFNGLGETTEXLEVELPARAMETERFVANGLEPROC)(GLenum target, GLint level, GLenum pname, GLfloat *params);
|
||||||
|
typedef void(GL_APIENTRYP PFNGLGETTEXLEVELPARAMETERIVANGLEPROC)(GLenum target, GLint level, GLenum pname, GLint *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETMULTISAMPLEFVANGLEPROC)(GLenum pname, GLuint index, GLfloat *val);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLSAMPLEMASKIANGLEPROC)(GLuint maskNumber, GLbitfield mask);
|
||||||
|
#ifdef GL_GLEXT_PROTOTYPES
|
||||||
|
GL_APICALL void GL_APIENTRY glTexStorage2DMultisampleANGLE(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetTexLevelParameterfvANGLE(GLenum target, GLint level, GLenum pname, GLfloat *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetTexLevelParameterivANGLE(GLenum target, GLint level, GLenum pname, GLint *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetMultisamplefvANGLE(GLenum pname, GLuint index, GLfloat *val);
|
||||||
|
GL_APICALL void GL_APIENTRY glSampleMaskiANGLE(GLuint maskNumber, GLbitfield mask);
|
||||||
|
#endif
|
||||||
|
#endif // !GL_ANGLE_texture_multisample
|
||||||
|
|
||||||
|
#ifndef GL_ANGLE_get_tex_level_parameter
|
||||||
|
#define GL_ANGLE_get_tex_level_parameter 1
|
||||||
|
typedef void(GL_APIENTRYP PFNGLGETTEXLEVELPARAMETERFVANGLEPROC)(GLenum target, GLint level, GLenum pname, GLfloat *params);
|
||||||
|
typedef void(GL_APIENTRYP PFNGLGETTEXLEVELPARAMETERIVANGLEPROC)(GLenum target, GLint level, GLenum pname, GLint *params);
|
||||||
|
#ifdef GL_GLEXT_PROTOTYPES
|
||||||
|
GL_APICALL void GL_APIENTRY glGetTexLevelParameterfvANGLE(GLenum target, GLint level, GLenum pname, GLfloat *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetTexLevelParameterivANGLE(GLenum target, GLint level, GLenum pname, GLint *params);
|
||||||
|
#endif
|
||||||
|
#endif /* GL_ANGLE_get_tex_level_parameter */
|
||||||
|
|
||||||
|
#ifndef GL_ANGLE_multi_draw
|
||||||
|
#define GL_ANGLE_multi_draw 1
|
||||||
|
typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSANGLEPROC) (GLenum mode, const GLint *firsts, const GLsizei *counts, GLsizei drawcount);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSINSTANCEDANGLEPROC) (GLenum mode, const GLint *firsts, const GLsizei *counts, const GLsizei *instanceCounts, GLsizei drawcount);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSANGLEPROC) (GLenum mode, const GLsizei *counts, GLenum type, const GLvoid* const *indices, GLsizei drawcount);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSINSTANCEDANGLEPROC) (GLenum mode, const GLsizei *counts, GLenum type, const GLvoid* const *indices, const GLsizei *instanceCounts, GLsizei drawcount);
|
||||||
|
#ifdef GL_GLEXT_PROTOTYPES
|
||||||
|
GL_APICALL void GL_APIENTRY glMultiDrawArraysANGLE (GLenum mode, const GLint *firsts, const GLsizei *counts, GLsizei drawcount);
|
||||||
|
GL_APICALL void GL_APIENTRY glMultiDrawArraysInstancedANGLE (GLenum mode, const GLint *firsts, const GLsizei *counts, const GLsizei *instanceCounts, GLsizei drawcount);
|
||||||
|
GL_APICALL void GL_APIENTRY glMultiDrawElementsANGLE (GLenum mode, const GLsizei *counts, GLenum type, const GLvoid* const *indices, GLsizei drawcount);
|
||||||
|
GL_APICALL void GL_APIENTRY glMultiDrawElementsInstancedANGLE (GLenum mode, const GLsizei *counts, GLenum type, const GLvoid* const *indices, const GLsizei *instanceCounts, GLsizei drawcount);
|
||||||
|
#endif
|
||||||
|
#endif /* GL_ANGLE_multi_draw */
|
||||||
|
|
||||||
|
#ifndef GL_ANGLE_base_vertex_base_instance
|
||||||
|
#define GL_ANGLE_base_vertex_base_instance 1
|
||||||
|
typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEANGLEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instanceCount, GLuint baseInstance);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEANGLEPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instanceCount, GLint baseVertex, GLuint baseInstance);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSINSTANCEDBASEINSTANCEANGLEPROC) (GLenum mode, const GLsizei *firsts, const GLsizei *counts, const GLsizei *instanceCounts, const GLuint *baseInstances, GLsizei drawCount);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEANGLEPROC) (GLenum mode, const GLsizei *counts, GLenum type, const GLvoid* const *indices, const GLsizei *instanceCounts, const GLint *baseVertices, const GLuint *baseInstances, GLsizei drawCount);
|
||||||
|
#ifdef GL_GLEXT_PROTOTYPES
|
||||||
|
GL_APICALL void GL_APIENTRY glDrawArraysInstancedBaseInstanceANGLE (GLenum mode, GLint first, GLsizei count, GLsizei instanceCount, GLuint baseInstance);
|
||||||
|
GL_APICALL void GL_APIENTRY glDrawElementsInstancedBaseVertexBaseInstanceANGLE (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instanceCount, GLint baseVertex, GLuint baseInstance);
|
||||||
|
GL_APICALL void GL_APIENTRY glMultiDrawArraysInstancedBaseInstanceANGLE (GLenum mode, const GLsizei *firsts, const GLsizei *counts, const GLsizei *instanceCounts, const GLuint *baseInstances, GLsizei drawCount);
|
||||||
|
GL_APICALL void GL_APIENTRY glMultiDrawElementsInstancedBaseVertexBaseInstanceANGLE (GLenum mode, const GLsizei *counts, GLenum type, const GLvoid* const *indices, const GLsizei *instanceCounts, const GLint *baseVertices, const GLuint *baseInstances, GLsizei drawCount);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GL_CHROMIUM_bind_uniform_location
|
||||||
|
#define GL_CHROMIUM_bind_uniform_location 1
|
||||||
|
typedef void (GL_APIENTRYP PFNGLBINDUNIFORMLOCATIONCHROMIUMPROC)(GLuint program, GLint location, const GLchar *name);
|
||||||
|
#ifdef GL_GLEXT_PROTOTYPES
|
||||||
|
GL_APICALL void GL_APIENTRY glBindUniformLocationCHROMIUM(GLuint program, GLint location, const GLchar *name);
|
||||||
|
#endif
|
||||||
|
#endif /* GL_CHROMIUM_bind_uniform_location */
|
||||||
|
|
||||||
|
/* GL_CHROMIUM_lose_context */
|
||||||
|
#ifndef GL_CHROMIUM_lose_context
|
||||||
|
#define GL_CHROMIUM_lose_context 1
|
||||||
|
#ifdef GL_GLEXT_PROTOTYPES
|
||||||
|
GL_APICALL void GL_APIENTRY glLoseContextCHROMIUM(GLenum current, GLenum other);
|
||||||
|
#endif
|
||||||
|
typedef void (GL_APIENTRYP PFNGLLOSECONTEXTCHROMIUMPROC) (GLenum current, GLenum other);
|
||||||
|
#endif /* GL_CHROMIUM_lose_context */
|
||||||
|
|
||||||
|
#ifndef GL_ANGLE_texture_external_update
|
||||||
|
#define GL_ANGLE_texture_external_update 1
|
||||||
|
#define GL_TEXTURE_NATIVE_ID_ANGLE 0x3481
|
||||||
|
typedef void (GL_APIENTRYP PFNGLTEXIMAGE2DEXTERNALANGLEPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLINVALIDATETEXTUREANGLEPROC) (GLenum target);
|
||||||
|
#ifdef GL_GLEXT_PROTOTYPES
|
||||||
|
GL_APICALL void GL_APIENTRY glTexImage2DExternalANGLE (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type);
|
||||||
|
GL_APICALL void GL_APIENTRY glInvalidateTextureANGLE (GLenum target);
|
||||||
|
#endif
|
||||||
|
#endif /* GL_ANGLE_texture_external_update */
|
||||||
|
|
||||||
|
#ifndef GL_ANGLE_get_image
|
||||||
|
#define GL_ANGLE_get_image
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETTEXIMAGEANGLEPROC) (GLenum target, GLint level, GLenum format, GLenum type, void *pixels);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEANGLEPROC) (GLenum target, GLint level, void *pixels);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETRENDERBUFFERIMAGEANGLEPROC) (GLenum target, GLenum format, GLenum type, void *pixels);
|
||||||
|
#ifdef GL_GLEXT_PROTOTYPES
|
||||||
|
GL_APICALL void GL_APIENTRY glGetTexImageANGLE (GLenum target, GLint level, GLenum format, GLenum type, void *pixels);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetCompressedTexImageANGLE (GLenum target, GLint level, void *pixels);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetRenderbufferImageANGLE (GLenum target, GLenum format, GLenum type, void *pixels);
|
||||||
|
#endif
|
||||||
|
#endif /* GL_ANGLE_get_image */
|
||||||
|
|
||||||
|
#ifndef GL_WEBGL_video_texture
|
||||||
|
#define GL_WEBGL_video_texture 1
|
||||||
|
#define GL_TEXTURE_VIDEO_IMAGE_WEBGL 0x9248
|
||||||
|
#define GL_SAMPLER_VIDEO_IMAGE_WEBGL 0x9249
|
||||||
|
#endif /* GL_WEBGL_video_texture */
|
||||||
|
|
||||||
|
#ifndef GL_ANGLE_memory_object_flags
|
||||||
|
#define GL_ANGLE_memory_object_flags 1
|
||||||
|
#define GL_CREATE_SPARSE_BINDING_BIT_ANGLE 0x00000001
|
||||||
|
#define GL_CREATE_SPARSE_RESIDENCY_BIT_ANGLE 0x00000002
|
||||||
|
#define GL_CREATE_SPARSE_ALIASED_BIT_ANGLE 0x00000004
|
||||||
|
#define GL_CREATE_MUTABLE_FORMAT_BIT_ANGLE 0x00000008
|
||||||
|
#define GL_CREATE_CUBE_COMPATIBLE_BIT_ANGLE 0x00000010
|
||||||
|
#define GL_CREATE_ALIAS_BIT_ANGLE 0x00000400
|
||||||
|
#define GL_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_ANGLE 0x00000040
|
||||||
|
#define GL_CREATE_2D_ARRAY_COMPATIBLE_BIT_ANGLE 0x00000020
|
||||||
|
#define GL_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_ANGLE 0x00000080
|
||||||
|
#define GL_CREATE_EXTENDED_USAGE_BIT_ANGLE 0x00000100
|
||||||
|
#define GL_CREATE_PROTECTED_BIT_ANGLE 0x00000800
|
||||||
|
#define GL_CREATE_DISJOINT_BIT_ANGLE 0x00000200
|
||||||
|
#define GL_CREATE_CORNER_SAMPLED_BIT_ANGLE 0x00002000
|
||||||
|
#define GL_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_ANGLE 0x00001000
|
||||||
|
#define GL_CREATE_SUBSAMPLED_BIT_ANGLE 0x00004000
|
||||||
|
#define GL_USAGE_TRANSFER_SRC_BIT_ANGLE 0x00000001
|
||||||
|
#define GL_USAGE_TRANSFER_DST_BIT_ANGLE 0x00000002
|
||||||
|
#define GL_USAGE_SAMPLED_BIT_ANGLE 0x00000004
|
||||||
|
#define GL_USAGE_STORAGE_BIT_ANGLE 0x00000008
|
||||||
|
#define GL_USAGE_COLOR_ATTACHMENT_BIT_ANGLE 0x00000010
|
||||||
|
#define GL_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT_ANGLE 0x00000020
|
||||||
|
#define GL_USAGE_TRANSIENT_ATTACHMENT_BIT_ANGLE 0x00000040
|
||||||
|
#define GL_USAGE_INPUT_ATTACHMENT_BIT_ANGLE 0x00000080
|
||||||
|
#define GL_USAGE_SHADING_RATE_IMAGE_BIT_ANGLE 0x00000100
|
||||||
|
#define GL_USAGE_FRAGMENT_DENSITY_MAP_BIT_ANGLE 0x00000200
|
||||||
|
typedef void (GL_APIENTRYP PFNGLTEXSTORAGEMEMFLAGS2DANGLEPROC) (GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLuint memory, GLuint64 offset, GLbitfield createFlags, GLbitfield usageFlags, const void *imageCreateInfoPNext);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLTEXSTORAGEMEMFLAGS2DMULTISAMPLEANGLEPROC) (GLenum target, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset, GLbitfield createFlags, GLbitfield usageFlags, const void *imageCreateInfoPNext);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLTEXSTORAGEMEMFLAGS3DANGLEPROC) (GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset, GLbitfield createFlags, GLbitfield usageFlags, const void *imageCreateInfoPNext);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLTEXSTORAGEMEMFLAGS3DMULTISAMPLEANGLEPROC) (GLenum target, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset, GLbitfield createFlags, GLbitfield usageFlags, const void *imageCreateInfoPNext);
|
||||||
|
#ifdef GL_GLEXT_PROTOTYPES
|
||||||
|
GL_APICALL void GL_APIENTRY glTexStorageMemFlags2DANGLE (GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLuint memory, GLuint64 offset, GLbitfield createFlags, GLbitfield usageFlags, const void *imageCreateInfoPNext);
|
||||||
|
GL_APICALL void GL_APIENTRY glTexStorageMemFlags2DMultisampleANGLE (GLenum target, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset, GLbitfield createFlags, GLbitfield usageFlags, const void *imageCreateInfoPNext);
|
||||||
|
GL_APICALL void GL_APIENTRY glTexStorageMemFlags3DANGLE (GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset, GLbitfield createFlags, GLbitfield usageFlags, const void *imageCreateInfoPNext);
|
||||||
|
GL_APICALL void GL_APIENTRY glTexStorageMemFlags3DMultisampleANGLE (GLenum target, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset, GLbitfield createFlags, GLbitfield usageFlags, const void *imageCreateInfoPNext);
|
||||||
|
#endif
|
||||||
|
#endif /* GL_ANGLE_memory_object_flags */
|
||||||
|
|
||||||
|
#ifndef GL_ANGLE_memory_object_fuchsia
|
||||||
|
#define GL_ANGLE_memory_object_fuchsia 1
|
||||||
|
#define GL_HANDLE_TYPE_ZIRCON_VMO_ANGLE 0x93AE
|
||||||
|
typedef void(GL_APIENTRYP PFNGLIMPORTMEMORYZIRCONHANDLEANGLEPROC)(GLuint memory,
|
||||||
|
GLuint64 size,
|
||||||
|
GLenum handleType,
|
||||||
|
GLuint handle);
|
||||||
|
#ifdef GL_GLEXT_PROTOTYPES
|
||||||
|
GL_APICALL void GL_APIENTRY glImportMemoryZirconHandleANGLE(GLuint memory,
|
||||||
|
GLuint64 size,
|
||||||
|
GLenum handleType,
|
||||||
|
GLuint handle);
|
||||||
|
#endif
|
||||||
|
#endif /* GL_ANGLE_memory_object_fuchsia */
|
||||||
|
|
||||||
|
#ifndef GL_ANGLE_semaphore_fuchsia
|
||||||
|
#define GL_ANGLE_semaphore_fuchsia 1
|
||||||
|
#define GL_HANDLE_TYPE_ZIRCON_EVENT_ANGLE 0x93AF
|
||||||
|
typedef void(GL_APIENTRYP PFNGLIMPORTSEMAPHOREZIRCONHANDLEANGLEPROC)(GLuint semaphore,
|
||||||
|
GLenum handleType,
|
||||||
|
GLuint handle);
|
||||||
|
#ifdef GL_GLEXT_PROTOTYPES
|
||||||
|
GL_APICALL void GL_APIENTRY glImportSemaphoreZirconHandleANGLE(GLuint memory,
|
||||||
|
GLenum handleType,
|
||||||
|
GLuint handle);
|
||||||
|
#endif
|
||||||
|
#endif /* GL_ANGLE_semaphore_fuchsia */
|
||||||
|
|
||||||
|
#ifndef GL_ANGLE_vulkan_image
|
||||||
|
#define GL_ANGLE_vulkan_image 1
|
||||||
|
typedef void(GL_APIENTRYP PFNGLACQUIRETEXTURESANGLEPROC)(GLuint numTexture, const GLuint *textures, const GLenum *layouts);
|
||||||
|
typedef void(GL_APIENTRYP PFNGLRELEASETEXTURESANGLEPROC)(GLuint numTexture, const GLuint *textures, GLenum *layouts);
|
||||||
|
#ifdef GL_GLEXT_PROTOTYPES
|
||||||
|
GL_APICALL void GL_APIENTRY glAcquireTexturesANGLE(GLuint numTexture, const GLuint *textures, const GLenum *layouts);
|
||||||
|
GL_APICALL void GL_APIENTRY glReleaseTexturesANGLE(GLuint numTexture, const GLuint *textures, GLenum *layouts);
|
||||||
|
#endif
|
||||||
|
#endif /* GL_ANGLE_vulkan_image */
|
||||||
|
|
||||||
|
#ifndef GL_CHROMIUM_texture_filtering_hint
|
||||||
|
#define GL_CHROMIUM_texture_filtering_hint
|
||||||
|
#define GL_TEXTURE_FILTERING_HINT_CHROMIUM 0x8AF0
|
||||||
|
#endif /* GL_CHROMIUM_texture_filtering_hint */
|
||||||
|
|
||||||
|
#ifndef GL_NV_robustness_video_memory
|
||||||
|
#define GL_NV_robustness_video_memory
|
||||||
|
#define GL_PURGED_CONTEXT_RESET_NV 0x92BB
|
||||||
|
#endif /* GL_NV_robustness_video_memory */
|
||||||
|
|
||||||
|
#ifndef GL_ANGLE_get_serialized_context_string
|
||||||
|
#define GL_ANGLE_get_serialized_context_string
|
||||||
|
#define GL_SERIALIZED_CONTEXT_STRING_ANGLE 0x96B0
|
||||||
|
#endif /* GL_ANGLE_get_serialized_context_string */
|
||||||
|
|
||||||
|
#ifndef GL_ANGLE_robust_fragment_shader_output
|
||||||
|
#define GL_ANGLE_robust_fragment_shader_output
|
||||||
|
#define GL_ROBUST_FRAGMENT_SHADER_OUTPUT_ANGLE 0x96B9
|
||||||
|
#endif /* GL_ANGLE_robust_fragment_shader_output */
|
||||||
|
|
||||||
|
#ifndef GL_ANGLE_shader_pixel_local_storage
|
||||||
|
#define GL_ANGLE_shader_pixel_local_storage 1
|
||||||
|
#define GL_MAX_PIXEL_LOCAL_STORAGE_PLANES_ANGLE 0x96E0
|
||||||
|
#define GL_MAX_COLOR_ATTACHMENTS_WITH_ACTIVE_PIXEL_LOCAL_STORAGE_ANGLE 0x96E1
|
||||||
|
#define GL_MAX_COMBINED_DRAW_BUFFERS_AND_PIXEL_LOCAL_STORAGE_PLANES_ANGLE 0x96E2
|
||||||
|
#define GL_PIXEL_LOCAL_STORAGE_ACTIVE_PLANES_ANGLE 0x96E3
|
||||||
|
#define GL_LOAD_OP_ZERO_ANGLE 0x96E4
|
||||||
|
#define GL_LOAD_OP_CLEAR_ANGLE 0x96E5
|
||||||
|
#define GL_LOAD_OP_LOAD_ANGLE 0x96E6
|
||||||
|
#define GL_STORE_OP_STORE_ANGLE 0x96E7
|
||||||
|
#define GL_PIXEL_LOCAL_FORMAT_ANGLE 0x96E8
|
||||||
|
#define GL_PIXEL_LOCAL_TEXTURE_NAME_ANGLE 0x96E9
|
||||||
|
#define GL_PIXEL_LOCAL_TEXTURE_LEVEL_ANGLE 0x96EA
|
||||||
|
#define GL_PIXEL_LOCAL_TEXTURE_LAYER_ANGLE 0x96EB
|
||||||
|
#define GL_PIXEL_LOCAL_CLEAR_VALUE_FLOAT_ANGLE 0x96EC
|
||||||
|
#define GL_PIXEL_LOCAL_CLEAR_VALUE_INT_ANGLE 0x96ED
|
||||||
|
#define GL_PIXEL_LOCAL_CLEAR_VALUE_UNSIGNED_INT_ANGLE 0x96EE
|
||||||
|
typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERMEMORYLESSPIXELLOCALSTORAGEANGLEPROC) (GLint plane, GLenum internalformat);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTUREPIXELLOCALSTORAGEANGLEPROC) (GLint plane, GLuint backingtexture, GLint level, GLint layer);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERPIXELLOCALCLEARVALUEFVANGLEPROC) (GLint plane, const GLfloat value[]);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERPIXELLOCALCLEARVALUEIVANGLEPROC) (GLint plane, const GLint value[]);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERPIXELLOCALCLEARVALUEUIVANGLEPROC) (GLint plane, const GLuint value[]);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLBEGINPIXELLOCALSTORAGEANGLEPROC) (GLsizei n, const GLenum loadops[]);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLENDPIXELLOCALSTORAGEANGLEPROC) (GLsizei n, const GLenum storeops[]);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLPIXELLOCALSTORAGEBARRIERANGLEPROC) (void);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERPIXELLOCALSTORAGEINTERRUPTANGLEPROC) (void);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERPIXELLOCALSTORAGERESTOREANGLEPROC) (void);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERPIXELLOCALSTORAGEPARAMETERFVANGLEPROC) (GLint plane, GLenum pname, GLfloat *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERPIXELLOCALSTORAGEPARAMETERIVANGLEPROC) (GLint plane, GLenum pname, GLint *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERPIXELLOCALSTORAGEPARAMETERFVROBUSTANGLEPROC) (GLint plane, GLenum pname, GLsizei bufSize, GLsizei *length, GLfloat *params);
|
||||||
|
typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERPIXELLOCALSTORAGEPARAMETERIVROBUSTANGLEPROC) (GLint plane, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
#ifdef GL_GLEXT_PROTOTYPES
|
||||||
|
GL_APICALL void GL_APIENTRY glFramebufferMemorylessPixelLocalStorageANGLE (GLint plane, GLenum internalformat);
|
||||||
|
GL_APICALL void GL_APIENTRY glFramebufferTexturePixelLocalStorageANGLE (GLint plane, GLuint backingtexture, GLint level, GLint layer);
|
||||||
|
GL_APICALL void GL_APIENTRY glFramebufferPixelLocalClearValuefvANGLE (GLint plane, const GLfloat value[]);
|
||||||
|
GL_APICALL void GL_APIENTRY glFramebufferPixelLocalClearValueivANGLE (GLint plane, const GLint value[]);
|
||||||
|
GL_APICALL void GL_APIENTRY glFramebufferPixelLocalClearValueuivANGLE (GLint plane, const GLuint value[]);
|
||||||
|
GL_APICALL void GL_APIENTRY glBeginPixelLocalStorageANGLE (GLsizei n, const GLenum loadops[]);
|
||||||
|
GL_APICALL void GL_APIENTRY glEndPixelLocalStorageANGLE (GLsizei n, const GLenum storeops[]);
|
||||||
|
GL_APICALL void GL_APIENTRY glPixelLocalStorageBarrierANGLE (void);
|
||||||
|
GL_APICALL void GL_APIENTRY glFramebufferPixelLocalStorageInterruptANGLE (void);
|
||||||
|
GL_APICALL void GL_APIENTRY glFramebufferPixelLocalStorageRestoreANGLE (void);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetFramebufferPixelLocalStorageParameterfvANGLE (GLint plane, GLenum pname, GLfloat *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetFramebufferPixelLocalStorageParameterivANGLE (GLint plane, GLenum pname, GLint *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetFramebufferPixelLocalStorageParameterfvRobustANGLE (GLint plane, GLenum pname, GLsizei bufSize, GLsizei *length, GLfloat *params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetFramebufferPixelLocalStorageParameterivRobustANGLE (GLint plane, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params);
|
||||||
|
#endif
|
||||||
|
#endif /* GL_ANGLE_shader_pixel_local_storage */
|
||||||
|
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
|
#ifndef GL_ANGLE_yuv_internal_format
|
||||||
|
#define GL_ANGLE_yuv_internal_format
|
||||||
|
|
||||||
|
// YUV formats introduced by GL_ANGLE_yuv_internal_format
|
||||||
|
// 8-bit YUV formats
|
||||||
|
#define GL_G8_B8R8_2PLANE_420_UNORM_ANGLE 0x96B1
|
||||||
|
#define GL_G8_B8_R8_3PLANE_420_UNORM_ANGLE 0x96B2
|
||||||
|
|
||||||
|
// 10-bit YUV formats
|
||||||
|
#define GL_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_ANGLE 0x96B3
|
||||||
|
#define GL_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_ANGLE 0x96B4
|
||||||
|
|
||||||
|
// 12-bit YUV formats
|
||||||
|
#define GL_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_ANGLE 0x96B5
|
||||||
|
#define GL_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_ANGLE 0x96B6
|
||||||
|
|
||||||
|
// 16-bit YUV formats
|
||||||
|
#define GL_G16_B16R16_2PLANE_420_UNORM_ANGLE 0x96B7
|
||||||
|
#define GL_G16_B16_R16_3PLANE_420_UNORM_ANGLE 0x96B8
|
||||||
|
|
||||||
|
#endif /* GL_ANGLE_yuv_internal_format */
|
||||||
|
|
||||||
|
#ifndef GL_ANGLE_rgbx_internal_format
|
||||||
|
#define GL_ANGLE_rgbx_internal_format
|
||||||
|
|
||||||
|
#define GL_RGBX8_ANGLE 0x96BA
|
||||||
|
|
||||||
|
#endif /* GL_ANGLE_rgbx_internal_format */
|
||||||
|
|
||||||
|
#ifndef GL_ANGLE_shader_binary
|
||||||
|
#define GL_ANGLE_shader_binary
|
||||||
|
|
||||||
|
// General shader binary format
|
||||||
|
#define GL_SHADER_BINARY_ANGLE 0x96BB
|
||||||
|
|
||||||
|
#endif /* GL_ANGLE_shader_binary */
|
||||||
|
|
||||||
|
#ifndef GL_ANGLE_logic_op
|
||||||
|
#define GL_ANGLE_logic_op
|
||||||
|
|
||||||
|
// Enums identical to GLES1 and desktop GL
|
||||||
|
#define GL_COLOR_LOGIC_OP_ANGLE 0x0BF2
|
||||||
|
#define GL_LOGIC_OP_CLEAR_ANGLE 0x1500
|
||||||
|
#define GL_LOGIC_OP_AND_ANGLE 0x1501
|
||||||
|
#define GL_LOGIC_OP_AND_REVERSE_ANGLE 0x1502
|
||||||
|
#define GL_LOGIC_OP_COPY_ANGLE 0x1503
|
||||||
|
#define GL_LOGIC_OP_AND_INVERTED_ANGLE 0x1504
|
||||||
|
#define GL_LOGIC_OP_NOOP_ANGLE 0x1505
|
||||||
|
#define GL_LOGIC_OP_XOR_ANGLE 0x1506
|
||||||
|
#define GL_LOGIC_OP_OR_ANGLE 0x1507
|
||||||
|
#define GL_LOGIC_OP_NOR_ANGLE 0x1508
|
||||||
|
#define GL_LOGIC_OP_EQUIV_ANGLE 0x1509
|
||||||
|
#define GL_LOGIC_OP_INVERT_ANGLE 0x150A
|
||||||
|
#define GL_LOGIC_OP_OR_REVERSE_ANGLE 0x150B
|
||||||
|
#define GL_LOGIC_OP_COPY_INVERTED_ANGLE 0x150C
|
||||||
|
#define GL_LOGIC_OP_OR_INVERTED_ANGLE 0x150D
|
||||||
|
#define GL_LOGIC_OP_NAND_ANGLE 0x150E
|
||||||
|
#define GL_LOGIC_OP_SET_ANGLE 0x150F
|
||||||
|
typedef void (GL_APIENTRYP PFNGLLOGICOPANGLEPROC) (GLenum);
|
||||||
|
#ifdef GL_GLEXT_PROTOTYPES
|
||||||
|
GL_APICALL void GL_APIENTRY glLogicOpANGLE (GLenum);
|
||||||
|
#endif
|
||||||
|
#endif /* GL_ANGLE_logic_op */
|
||||||
|
|
||||||
|
#endif // INCLUDE_GLES2_GL2EXT_ANGLE_H_
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
#ifndef __gl2platform_h_
|
||||||
|
#define __gl2platform_h_
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Copyright 2017-2020 The Khronos Group Inc.
|
||||||
|
** SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Platform-specific types and definitions for OpenGL ES 2.X gl2.h
|
||||||
|
*
|
||||||
|
* Adopters may modify khrplatform.h and this file to suit their platform.
|
||||||
|
* Please contribute modifications back to Khronos as pull requests on the
|
||||||
|
* public github repository:
|
||||||
|
* https://github.com/KhronosGroup/OpenGL-Registry
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <KHR/khrplatform.h>
|
||||||
|
|
||||||
|
#ifndef GL_APICALL
|
||||||
|
#define GL_APICALL KHRONOS_APICALL
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GL_APIENTRY
|
||||||
|
#define GL_APIENTRY KHRONOS_APIENTRY
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __gl2platform_h_ */
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
DisableFormat: true
|
||||||
|
SortIncludes: false
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,27 @@
|
|||||||
|
#ifndef __gl3platform_h_
|
||||||
|
#define __gl3platform_h_
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Copyright 2017-2020 The Khronos Group Inc.
|
||||||
|
** SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Platform-specific types and definitions for OpenGL ES 3.X gl3.h
|
||||||
|
*
|
||||||
|
* Adopters may modify khrplatform.h and this file to suit their platform.
|
||||||
|
* Please contribute modifications back to Khronos as pull requests on the
|
||||||
|
* public github repository:
|
||||||
|
* https://github.com/KhronosGroup/OpenGL-Registry
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <KHR/khrplatform.h>
|
||||||
|
|
||||||
|
#ifndef GL_APICALL
|
||||||
|
#define GL_APICALL KHRONOS_APICALL
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GL_APIENTRY
|
||||||
|
#define GL_APIENTRY KHRONOS_APIENTRY
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __gl3platform_h_ */
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
DisableFormat: true
|
||||||
|
SortIncludes: false
|
||||||
@@ -0,0 +1,290 @@
|
|||||||
|
#ifndef __khrplatform_h_
|
||||||
|
#define __khrplatform_h_
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Copyright (c) 2008-2018 The Khronos Group Inc.
|
||||||
|
**
|
||||||
|
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
** copy of this software and/or associated documentation files (the
|
||||||
|
** "Materials"), to deal in the Materials without restriction, including
|
||||||
|
** without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||||
|
** permit persons to whom the Materials are furnished to do so, subject to
|
||||||
|
** the following conditions:
|
||||||
|
**
|
||||||
|
** The above copyright notice and this permission notice shall be included
|
||||||
|
** in all copies or substantial portions of the Materials.
|
||||||
|
**
|
||||||
|
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||||
|
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Khronos platform-specific types and definitions.
|
||||||
|
*
|
||||||
|
* The master copy of khrplatform.h is maintained in the Khronos EGL
|
||||||
|
* Registry repository at https://github.com/KhronosGroup/EGL-Registry
|
||||||
|
* The last semantic modification to khrplatform.h was at commit ID:
|
||||||
|
* 67a3e0864c2d75ea5287b9f3d2eb74a745936692
|
||||||
|
*
|
||||||
|
* Adopters may modify this file to suit their platform. Adopters are
|
||||||
|
* encouraged to submit platform specific modifications to the Khronos
|
||||||
|
* group so that they can be included in future versions of this file.
|
||||||
|
* Please submit changes by filing pull requests or issues on
|
||||||
|
* the EGL Registry repository linked above.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* See the Implementer's Guidelines for information about where this file
|
||||||
|
* should be located on your system and for more details of its use:
|
||||||
|
* http://www.khronos.org/registry/implementers_guide.pdf
|
||||||
|
*
|
||||||
|
* This file should be included as
|
||||||
|
* #include <KHR/khrplatform.h>
|
||||||
|
* by Khronos client API header files that use its types and defines.
|
||||||
|
*
|
||||||
|
* The types in khrplatform.h should only be used to define API-specific types.
|
||||||
|
*
|
||||||
|
* Types defined in khrplatform.h:
|
||||||
|
* khronos_int8_t signed 8 bit
|
||||||
|
* khronos_uint8_t unsigned 8 bit
|
||||||
|
* khronos_int16_t signed 16 bit
|
||||||
|
* khronos_uint16_t unsigned 16 bit
|
||||||
|
* khronos_int32_t signed 32 bit
|
||||||
|
* khronos_uint32_t unsigned 32 bit
|
||||||
|
* khronos_int64_t signed 64 bit
|
||||||
|
* khronos_uint64_t unsigned 64 bit
|
||||||
|
* khronos_intptr_t signed same number of bits as a pointer
|
||||||
|
* khronos_uintptr_t unsigned same number of bits as a pointer
|
||||||
|
* khronos_ssize_t signed size
|
||||||
|
* khronos_usize_t unsigned size
|
||||||
|
* khronos_float_t signed 32 bit floating point
|
||||||
|
* khronos_time_ns_t unsigned 64 bit time in nanoseconds
|
||||||
|
* khronos_utime_nanoseconds_t unsigned time interval or absolute time in
|
||||||
|
* nanoseconds
|
||||||
|
* khronos_stime_nanoseconds_t signed time interval in nanoseconds
|
||||||
|
* khronos_boolean_enum_t enumerated boolean type. This should
|
||||||
|
* only be used as a base type when a client API's boolean type is
|
||||||
|
* an enum. Client APIs which use an integer or other type for
|
||||||
|
* booleans cannot use this as the base type for their boolean.
|
||||||
|
*
|
||||||
|
* Tokens defined in khrplatform.h:
|
||||||
|
*
|
||||||
|
* KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values.
|
||||||
|
*
|
||||||
|
* KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0.
|
||||||
|
* KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0.
|
||||||
|
*
|
||||||
|
* Calling convention macros defined in this file:
|
||||||
|
* KHRONOS_APICALL
|
||||||
|
* KHRONOS_APIENTRY
|
||||||
|
* KHRONOS_APIATTRIBUTES
|
||||||
|
*
|
||||||
|
* These may be used in function prototypes as:
|
||||||
|
*
|
||||||
|
* KHRONOS_APICALL void KHRONOS_APIENTRY funcname(
|
||||||
|
* int arg1,
|
||||||
|
* int arg2) KHRONOS_APIATTRIBUTES;
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined(__SCITECH_SNAP__) && !defined(KHRONOS_STATIC)
|
||||||
|
# define KHRONOS_STATIC 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*-------------------------------------------------------------------------
|
||||||
|
* Definition of KHRONOS_APICALL
|
||||||
|
*-------------------------------------------------------------------------
|
||||||
|
* This precedes the return type of the function in the function prototype.
|
||||||
|
*/
|
||||||
|
#if defined(KHRONOS_STATIC)
|
||||||
|
/* If the preprocessor constant KHRONOS_STATIC is defined, make the
|
||||||
|
* header compatible with static linking. */
|
||||||
|
# define KHRONOS_APICALL
|
||||||
|
#elif defined(_WIN32)
|
||||||
|
# define KHRONOS_APICALL __declspec(dllimport)
|
||||||
|
#elif defined (__SYMBIAN32__)
|
||||||
|
# define KHRONOS_APICALL IMPORT_C
|
||||||
|
#elif defined(__ANDROID__)
|
||||||
|
# define KHRONOS_APICALL __attribute__((visibility("default")))
|
||||||
|
#else
|
||||||
|
# define KHRONOS_APICALL
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*-------------------------------------------------------------------------
|
||||||
|
* Definition of KHRONOS_APIENTRY
|
||||||
|
*-------------------------------------------------------------------------
|
||||||
|
* This follows the return type of the function and precedes the function
|
||||||
|
* name in the function prototype.
|
||||||
|
*/
|
||||||
|
#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
|
||||||
|
/* Win32 but not WinCE */
|
||||||
|
# define KHRONOS_APIENTRY __stdcall
|
||||||
|
#else
|
||||||
|
# define KHRONOS_APIENTRY
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*-------------------------------------------------------------------------
|
||||||
|
* Definition of KHRONOS_APIATTRIBUTES
|
||||||
|
*-------------------------------------------------------------------------
|
||||||
|
* This follows the closing parenthesis of the function prototype arguments.
|
||||||
|
*/
|
||||||
|
#if defined (__ARMCC_2__)
|
||||||
|
#define KHRONOS_APIATTRIBUTES __softfp
|
||||||
|
#else
|
||||||
|
#define KHRONOS_APIATTRIBUTES
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*-------------------------------------------------------------------------
|
||||||
|
* basic type definitions
|
||||||
|
*-----------------------------------------------------------------------*/
|
||||||
|
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Using <stdint.h>
|
||||||
|
*/
|
||||||
|
#include <stdint.h>
|
||||||
|
typedef int32_t khronos_int32_t;
|
||||||
|
typedef uint32_t khronos_uint32_t;
|
||||||
|
typedef int64_t khronos_int64_t;
|
||||||
|
typedef uint64_t khronos_uint64_t;
|
||||||
|
#define KHRONOS_SUPPORT_INT64 1
|
||||||
|
#define KHRONOS_SUPPORT_FLOAT 1
|
||||||
|
|
||||||
|
#elif defined(__VMS ) || defined(__sgi)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Using <inttypes.h>
|
||||||
|
*/
|
||||||
|
#include <inttypes.h>
|
||||||
|
typedef int32_t khronos_int32_t;
|
||||||
|
typedef uint32_t khronos_uint32_t;
|
||||||
|
typedef int64_t khronos_int64_t;
|
||||||
|
typedef uint64_t khronos_uint64_t;
|
||||||
|
#define KHRONOS_SUPPORT_INT64 1
|
||||||
|
#define KHRONOS_SUPPORT_FLOAT 1
|
||||||
|
|
||||||
|
#elif defined(_WIN32) && !defined(__SCITECH_SNAP__)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Win32
|
||||||
|
*/
|
||||||
|
typedef __int32 khronos_int32_t;
|
||||||
|
typedef unsigned __int32 khronos_uint32_t;
|
||||||
|
typedef __int64 khronos_int64_t;
|
||||||
|
typedef unsigned __int64 khronos_uint64_t;
|
||||||
|
#define KHRONOS_SUPPORT_INT64 1
|
||||||
|
#define KHRONOS_SUPPORT_FLOAT 1
|
||||||
|
|
||||||
|
#elif defined(__sun__) || defined(__digital__)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Sun or Digital
|
||||||
|
*/
|
||||||
|
typedef int khronos_int32_t;
|
||||||
|
typedef unsigned int khronos_uint32_t;
|
||||||
|
#if defined(__arch64__) || defined(_LP64)
|
||||||
|
typedef long int khronos_int64_t;
|
||||||
|
typedef unsigned long int khronos_uint64_t;
|
||||||
|
#else
|
||||||
|
typedef long long int khronos_int64_t;
|
||||||
|
typedef unsigned long long int khronos_uint64_t;
|
||||||
|
#endif /* __arch64__ */
|
||||||
|
#define KHRONOS_SUPPORT_INT64 1
|
||||||
|
#define KHRONOS_SUPPORT_FLOAT 1
|
||||||
|
|
||||||
|
#elif 0
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Hypothetical platform with no float or int64 support
|
||||||
|
*/
|
||||||
|
typedef int khronos_int32_t;
|
||||||
|
typedef unsigned int khronos_uint32_t;
|
||||||
|
#define KHRONOS_SUPPORT_INT64 0
|
||||||
|
#define KHRONOS_SUPPORT_FLOAT 0
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Generic fallback
|
||||||
|
*/
|
||||||
|
#include <stdint.h>
|
||||||
|
typedef int32_t khronos_int32_t;
|
||||||
|
typedef uint32_t khronos_uint32_t;
|
||||||
|
typedef int64_t khronos_int64_t;
|
||||||
|
typedef uint64_t khronos_uint64_t;
|
||||||
|
#define KHRONOS_SUPPORT_INT64 1
|
||||||
|
#define KHRONOS_SUPPORT_FLOAT 1
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Types that are (so far) the same on all platforms
|
||||||
|
*/
|
||||||
|
typedef signed char khronos_int8_t;
|
||||||
|
typedef unsigned char khronos_uint8_t;
|
||||||
|
typedef signed short int khronos_int16_t;
|
||||||
|
typedef unsigned short int khronos_uint16_t;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Types that differ between LLP64 and LP64 architectures - in LLP64,
|
||||||
|
* pointers are 64 bits, but 'long' is still 32 bits. Win64 appears
|
||||||
|
* to be the only LLP64 architecture in current use.
|
||||||
|
*/
|
||||||
|
#ifdef _WIN64
|
||||||
|
typedef signed long long int khronos_intptr_t;
|
||||||
|
typedef unsigned long long int khronos_uintptr_t;
|
||||||
|
typedef signed long long int khronos_ssize_t;
|
||||||
|
typedef unsigned long long int khronos_usize_t;
|
||||||
|
#else
|
||||||
|
typedef signed long int khronos_intptr_t;
|
||||||
|
typedef unsigned long int khronos_uintptr_t;
|
||||||
|
typedef signed long int khronos_ssize_t;
|
||||||
|
typedef unsigned long int khronos_usize_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if KHRONOS_SUPPORT_FLOAT
|
||||||
|
/*
|
||||||
|
* Float type
|
||||||
|
*/
|
||||||
|
typedef float khronos_float_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if KHRONOS_SUPPORT_INT64
|
||||||
|
/* Time types
|
||||||
|
*
|
||||||
|
* These types can be used to represent a time interval in nanoseconds or
|
||||||
|
* an absolute Unadjusted System Time. Unadjusted System Time is the number
|
||||||
|
* of nanoseconds since some arbitrary system event (e.g. since the last
|
||||||
|
* time the system booted). The Unadjusted System Time is an unsigned
|
||||||
|
* 64 bit value that wraps back to 0 every 584 years. Time intervals
|
||||||
|
* may be either signed or unsigned.
|
||||||
|
*/
|
||||||
|
typedef khronos_uint64_t khronos_utime_nanoseconds_t;
|
||||||
|
typedef khronos_int64_t khronos_stime_nanoseconds_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Dummy value used to pad enum types to 32 bits.
|
||||||
|
*/
|
||||||
|
#ifndef KHRONOS_MAX_ENUM
|
||||||
|
#define KHRONOS_MAX_ENUM 0x7FFFFFFF
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Enumerated boolean type
|
||||||
|
*
|
||||||
|
* Values other than zero should be considered to be true. Therefore
|
||||||
|
* comparisons should not be made against KHRONOS_TRUE.
|
||||||
|
*/
|
||||||
|
typedef enum {
|
||||||
|
KHRONOS_FALSE = 0,
|
||||||
|
KHRONOS_TRUE = 1,
|
||||||
|
KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM
|
||||||
|
} khronos_boolean_enum_t;
|
||||||
|
|
||||||
|
#endif /* __khrplatform_h_ */
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2016 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef TNT_FILAMENT_BACKEND_OPENGL_NULLGLES_H
|
||||||
|
#define TNT_FILAMENT_BACKEND_OPENGL_NULLGLES_H
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This is used for debugging (stubbing out GLES calls)
|
||||||
|
*
|
||||||
|
* Simply uncomment the line
|
||||||
|
* using namespace nullgles;
|
||||||
|
*
|
||||||
|
* below.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace filament::backend {
|
||||||
|
namespace nullgles {
|
||||||
|
|
||||||
|
inline void glScissor(GLint, GLint, GLsizei, GLsizei) { }
|
||||||
|
inline void glViewport(GLint, GLint, GLsizei, GLsizei) { }
|
||||||
|
inline void glDepthRangef(GLfloat, GLfloat) { }
|
||||||
|
inline void glClearColor(GLfloat, GLfloat, GLfloat, GLfloat) { }
|
||||||
|
inline void glClearStencil(GLint) { }
|
||||||
|
inline void glClearDepthf(GLfloat) { }
|
||||||
|
|
||||||
|
inline void glBindBufferBase(GLenum, GLuint, GLuint) { }
|
||||||
|
inline void glBindVertexArray (GLuint) { }
|
||||||
|
inline void glBindTexture (GLenum, GLuint) { }
|
||||||
|
inline void glBindBuffer (GLenum, GLuint) { }
|
||||||
|
inline void glBindFramebuffer (GLenum, GLuint) { }
|
||||||
|
inline void glBindRenderbuffer (GLenum, GLuint) { }
|
||||||
|
inline void glUseProgram (GLuint) { }
|
||||||
|
|
||||||
|
inline void glBufferData(GLenum, GLsizeiptr, const void *, GLenum) { }
|
||||||
|
inline void glBufferSubData(GLenum, GLintptr, GLsizeiptr, const void *) { }
|
||||||
|
inline void glCompressedTexSubImage2D(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const void *) { }
|
||||||
|
inline void glTexSubImage2D(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const void *) { }
|
||||||
|
inline void glGenerateMipmap(GLenum) { }
|
||||||
|
|
||||||
|
inline void glVertexAttribPointer(GLuint, GLint, GLenum, GLboolean, GLsizei, const void *) { }
|
||||||
|
inline void glDisableVertexAttribArray (GLuint) { }
|
||||||
|
inline void glEnableVertexAttribArray (GLuint) { }
|
||||||
|
inline void glDisable (GLenum cap) { }
|
||||||
|
inline void glEnable (GLenum cap) { }
|
||||||
|
inline void glCullFace (GLenum mode) { }
|
||||||
|
inline void glBlendFunc (GLenum, GLenum) { }
|
||||||
|
|
||||||
|
inline void glInvalidateFramebuffer (GLenum, GLsizei, const GLenum *) { }
|
||||||
|
inline void glInvalidateSubFramebuffer (GLenum, GLsizei, const GLenum *, GLint, GLint, GLsizei, GLsizei);
|
||||||
|
|
||||||
|
inline void glSamplerParameteri (GLuint, GLenum, GLint) { }
|
||||||
|
inline void glSamplerParameterf (GLuint, GLenum, GLfloat) { }
|
||||||
|
|
||||||
|
inline void glFramebufferRenderbuffer (GLenum, GLenum, GLenum, GLuint) { }
|
||||||
|
inline void glRenderbufferStorageMultisample (GLenum, GLsizei, GLenum, GLsizei, GLsizei) { }
|
||||||
|
inline void glRenderbufferStorage (GLenum, GLenum, GLsizei, GLsizei) { }
|
||||||
|
|
||||||
|
inline void glClear(GLbitfield) { }
|
||||||
|
inline void glDrawRangeElements(GLenum, GLuint, GLuint, GLsizei, GLenum, const void *) { }
|
||||||
|
inline void glBlitFramebuffer (GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum) { }
|
||||||
|
inline void glReadPixels (GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, void *) { }
|
||||||
|
|
||||||
|
inline GLenum glGetError() { return GL_NO_ERROR; }
|
||||||
|
|
||||||
|
} // namespace nullgles
|
||||||
|
|
||||||
|
// turn GLES calls defined above into no-ops
|
||||||
|
//using namespace nullgles;
|
||||||
|
|
||||||
|
} // namespace filament::backend
|
||||||
|
|
||||||
|
#endif // TNT_FILAMENT_BACKEND_OPENGL_NULLGLES_H
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2019 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef TNT_FILAMENT_BACKEND_PRIVATE_ACQUIREDIMAGE_H
|
||||||
|
#define TNT_FILAMENT_BACKEND_PRIVATE_ACQUIREDIMAGE_H
|
||||||
|
|
||||||
|
#include <backend/DriverEnums.h>
|
||||||
|
|
||||||
|
namespace filament::backend {
|
||||||
|
|
||||||
|
class CallbackHandler;
|
||||||
|
|
||||||
|
// This lightweight POD allows us to bundle the state required to process an ACQUIRED stream.
|
||||||
|
// Since these types of external images need to be moved around and queued up, an encapsulation is
|
||||||
|
// very useful.
|
||||||
|
|
||||||
|
struct AcquiredImage {
|
||||||
|
void* image = nullptr;
|
||||||
|
backend::StreamCallback callback = nullptr;
|
||||||
|
void* userData = nullptr;
|
||||||
|
CallbackHandler* handler = nullptr;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace filament::backend
|
||||||
|
|
||||||
|
#endif // TNT_FILAMENT_BACKEND_PRIVATE_ACQUIREDIMAGE_H
|
||||||
@@ -0,0 +1,223 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
//! \file
|
||||||
|
|
||||||
|
#ifndef TNT_FILAMENT_BACKEND_BUFFERDESCRIPTOR_H
|
||||||
|
#define TNT_FILAMENT_BACKEND_BUFFERDESCRIPTOR_H
|
||||||
|
|
||||||
|
#include <utils/compiler.h>
|
||||||
|
#include <utils/ostream.h>
|
||||||
|
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
namespace filament::backend {
|
||||||
|
|
||||||
|
class CallbackHandler;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A CPU memory-buffer descriptor, typically used to transfer data from the CPU to the GPU.
|
||||||
|
*
|
||||||
|
* A BufferDescriptor owns the memory buffer it references, therefore BufferDescriptor cannot
|
||||||
|
* be copied, but can be moved.
|
||||||
|
*
|
||||||
|
* BufferDescriptor releases ownership of the memory-buffer when it's destroyed.
|
||||||
|
*/
|
||||||
|
class UTILS_PUBLIC BufferDescriptor {
|
||||||
|
public:
|
||||||
|
/**
|
||||||
|
* Callback used to destroy the buffer data.
|
||||||
|
* Guarantees:
|
||||||
|
* Called on the main filament thread.
|
||||||
|
*
|
||||||
|
* Limitations:
|
||||||
|
* Must be lightweight.
|
||||||
|
* Must not call filament APIs.
|
||||||
|
*/
|
||||||
|
using Callback = void(*)(void* buffer, size_t size, void* user);
|
||||||
|
|
||||||
|
//! creates an empty descriptor
|
||||||
|
BufferDescriptor() noexcept = default;
|
||||||
|
|
||||||
|
//! calls the callback to advertise BufferDescriptor no-longer owns the buffer
|
||||||
|
~BufferDescriptor() noexcept {
|
||||||
|
if (mCallback) {
|
||||||
|
mCallback(buffer, size, mUser);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
BufferDescriptor(const BufferDescriptor& rhs) = delete;
|
||||||
|
BufferDescriptor& operator=(const BufferDescriptor& rhs) = delete;
|
||||||
|
|
||||||
|
BufferDescriptor(BufferDescriptor&& rhs) noexcept
|
||||||
|
: buffer(rhs.buffer), size(rhs.size),
|
||||||
|
mCallback(rhs.mCallback), mUser(rhs.mUser), mHandler(rhs.mHandler) {
|
||||||
|
rhs.buffer = nullptr;
|
||||||
|
rhs.mCallback = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
BufferDescriptor& operator=(BufferDescriptor&& rhs) noexcept {
|
||||||
|
if (this != &rhs) {
|
||||||
|
buffer = rhs.buffer;
|
||||||
|
size = rhs.size;
|
||||||
|
mCallback = rhs.mCallback;
|
||||||
|
mUser = rhs.mUser;
|
||||||
|
mHandler = rhs.mHandler;
|
||||||
|
rhs.buffer = nullptr;
|
||||||
|
rhs.mCallback = nullptr;
|
||||||
|
}
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a BufferDescriptor that references a CPU memory-buffer
|
||||||
|
* @param buffer Memory address of the CPU buffer to reference
|
||||||
|
* @param size Size of the CPU buffer in bytes
|
||||||
|
* @param callback A callback used to release the CPU buffer from this BufferDescriptor
|
||||||
|
* @param user An opaque user pointer passed to the callback function when it's called
|
||||||
|
*/
|
||||||
|
BufferDescriptor(void const* buffer, size_t size,
|
||||||
|
Callback callback = nullptr, void* user = nullptr) noexcept
|
||||||
|
: buffer(const_cast<void*>(buffer)), size(size), mCallback(callback), mUser(user) {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a BufferDescriptor that references a CPU memory-buffer
|
||||||
|
* @param buffer Memory address of the CPU buffer to reference
|
||||||
|
* @param size Size of the CPU buffer in bytes
|
||||||
|
* @param callback A callback used to release the CPU buffer from this BufferDescriptor
|
||||||
|
* @param user An opaque user pointer passed to the callback function when it's called
|
||||||
|
*/
|
||||||
|
BufferDescriptor(void const* buffer, size_t size,
|
||||||
|
CallbackHandler* handler, Callback callback, void* user = nullptr) noexcept
|
||||||
|
: buffer(const_cast<void*>(buffer)), size(size),
|
||||||
|
mCallback(callback), mUser(user), mHandler(handler) {
|
||||||
|
}
|
||||||
|
|
||||||
|
// --------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper to create a BufferDescriptor that uses a KNOWN method pointer w/ object passed
|
||||||
|
* by pointer as the callback. e.g.:
|
||||||
|
* auto bd = BufferDescriptor::make(buffer, size, &Foo::method, foo);
|
||||||
|
*
|
||||||
|
* @param buffer Memory address of the CPU buffer to reference
|
||||||
|
* @param size Size of the CPU buffer in bytes
|
||||||
|
* @param handler Handler to use to dispatch the callback, or nullptr for the default handler
|
||||||
|
* @return a new BufferDescriptor
|
||||||
|
*/
|
||||||
|
template<typename T, void(T::*method)(void const*, size_t)>
|
||||||
|
static BufferDescriptor make(
|
||||||
|
void const* buffer, size_t size, T* data, CallbackHandler* handler = nullptr) noexcept {
|
||||||
|
return {
|
||||||
|
buffer, size,
|
||||||
|
handler, [](void* b, size_t s, void* u) {
|
||||||
|
(*static_cast<T**>(u)->*method)(b, s);
|
||||||
|
}, data
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper to create a BufferDescriptor that uses a functor as the callback.
|
||||||
|
*
|
||||||
|
* Caveats:
|
||||||
|
* - DO NOT CALL setCallback() when using this helper.
|
||||||
|
* - This make a heap allocation
|
||||||
|
*
|
||||||
|
* @param buffer Memory address of the CPU buffer to reference
|
||||||
|
* @param size Size of the CPU buffer in bytes
|
||||||
|
* @param functor functor of type f(void const* buffer, size_t size)
|
||||||
|
* @param handler Handler to use to dispatch the callback, or nullptr for the default handler
|
||||||
|
* @return a new BufferDescriptor
|
||||||
|
*/
|
||||||
|
template<typename T>
|
||||||
|
static BufferDescriptor make(
|
||||||
|
void const* buffer, size_t size, T&& functor, CallbackHandler* handler = nullptr) noexcept {
|
||||||
|
return {
|
||||||
|
buffer, size,
|
||||||
|
handler, [](void* b, size_t s, void* u) {
|
||||||
|
T& that = *static_cast<T*>(u);
|
||||||
|
that(b, s);
|
||||||
|
delete &that;
|
||||||
|
},
|
||||||
|
new T(std::forward<T>(functor))
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// --------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set or replace the release callback function
|
||||||
|
* @param callback The new callback function
|
||||||
|
* @param user An opaque user pointer passed to the callbeck function when it's called
|
||||||
|
*/
|
||||||
|
void setCallback(Callback callback, void* user = nullptr) noexcept {
|
||||||
|
this->mCallback = callback;
|
||||||
|
this->mUser = user;
|
||||||
|
this->mHandler = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set or replace the release callback function
|
||||||
|
* @param handler The Handler to use to dispatch the callback
|
||||||
|
* @param callback The new callback function
|
||||||
|
* @param user An opaque user pointer passed to the callbeck function when it's called
|
||||||
|
*/
|
||||||
|
void setCallback(CallbackHandler* handler, Callback callback, void* user = nullptr) noexcept {
|
||||||
|
mCallback = callback;
|
||||||
|
mUser = user;
|
||||||
|
mHandler = handler;
|
||||||
|
}
|
||||||
|
|
||||||
|
//! Returns whether a release callback is set
|
||||||
|
bool hasCallback() const noexcept { return mCallback != nullptr; }
|
||||||
|
|
||||||
|
//! Returns the currently set release callback function
|
||||||
|
Callback getCallback() const noexcept {
|
||||||
|
return mCallback;
|
||||||
|
}
|
||||||
|
|
||||||
|
//! Returns the handler for this callback or nullptr if the default handler is to be used.
|
||||||
|
CallbackHandler* getHandler() const noexcept {
|
||||||
|
return mHandler;
|
||||||
|
}
|
||||||
|
|
||||||
|
//! Returns the user opaque pointer associated to this BufferDescriptor
|
||||||
|
void* getUser() const noexcept {
|
||||||
|
return mUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
//! CPU mempry-buffer virtual address
|
||||||
|
void* buffer = nullptr;
|
||||||
|
|
||||||
|
//! CPU memory-buffer size in bytes
|
||||||
|
size_t size = 0;
|
||||||
|
|
||||||
|
private:
|
||||||
|
// callback when the buffer is consumed.
|
||||||
|
Callback mCallback = nullptr;
|
||||||
|
void* mUser = nullptr;
|
||||||
|
CallbackHandler* mHandler = nullptr;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace filament::backend
|
||||||
|
|
||||||
|
#if !defined(NDEBUG)
|
||||||
|
utils::io::ostream& operator<<(utils::io::ostream& out, const filament::backend::BufferDescriptor& b);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // TNT_FILAMENT_BACKEND_BUFFERDESCRIPTOR_H
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef TNT_FILAMENT_BACKEND_CALLBACKHANDLER_H
|
||||||
|
#define TNT_FILAMENT_BACKEND_CALLBACKHANDLER_H
|
||||||
|
|
||||||
|
#include <utils/compiler.h>
|
||||||
|
|
||||||
|
namespace filament::backend {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A generic interface to dispatch callbacks.
|
||||||
|
*
|
||||||
|
* All APIs that take a callback as argument also take a
|
||||||
|
* CallbackHandler* which is used to dispatch the
|
||||||
|
* callback: CallbackHandler::post() method is called from a service thread as soon
|
||||||
|
* as possible (this will NEVER be the main thread), CallbackHandler::post()
|
||||||
|
* is responsible for scheduling the callback onto the thread the
|
||||||
|
* user desires.
|
||||||
|
*
|
||||||
|
* This is intended to make callbacks interoperate with
|
||||||
|
* the platform/OS's own messaging system.
|
||||||
|
*
|
||||||
|
* CallbackHandler* can always be nullptr in which case the default handler is used. The
|
||||||
|
* default handler always dispatches callbacks on filament's main thread opportunistically.
|
||||||
|
*
|
||||||
|
* Life time:
|
||||||
|
* ---------
|
||||||
|
*
|
||||||
|
* Filament make no attempts to manage the life time of the CallbackHandler* and never takes
|
||||||
|
* ownership.
|
||||||
|
* In particular, this means that the CallbackHandler instance must stay valid until all
|
||||||
|
* pending callbacks are been dispatched.
|
||||||
|
*
|
||||||
|
* Similarly, when shutting down filament, care must be taken to ensure that all pending callbacks
|
||||||
|
* that might access filament's state have been dispatched. Filament can no longer ensure this
|
||||||
|
* because callback execution is the responsibility of the CallbackHandler, which is external to
|
||||||
|
* filament.
|
||||||
|
* Typically, the concrete CallbackHandler would have a mechanism to drain and/or wait for all
|
||||||
|
* callbacks to be processed.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class CallbackHandler {
|
||||||
|
public:
|
||||||
|
using Callback = void(*)(void* user);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Schedules the callback to be called onto the appropriate thread.
|
||||||
|
* Typically this will be the application's main thead.
|
||||||
|
*
|
||||||
|
* Must be thread-safe.
|
||||||
|
*/
|
||||||
|
virtual void post(void* user, Callback callback) = 0;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual ~CallbackHandler();
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace filament::backend
|
||||||
|
|
||||||
|
#endif // TNT_FILAMENT_BACKEND_CALLBACKHANDLER_H
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef TNT_FILAMENT_BACKEND_PRIVATE_DRIVERAPIFORWARD_H
|
||||||
|
#define TNT_FILAMENT_BACKEND_PRIVATE_DRIVERAPIFORWARD_H
|
||||||
|
|
||||||
|
namespace filament::backend {
|
||||||
|
|
||||||
|
class CommandStream;
|
||||||
|
|
||||||
|
using DriverApi = CommandStream;
|
||||||
|
|
||||||
|
} // namespace filament::backend
|
||||||
|
|
||||||
|
#endif // TNT_FILAMENT_BACKEND_PRIVATE_DRIVERAPIFORWARD_H
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,136 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef TNT_FILAMENT_BACKEND_HANDLE_H
|
||||||
|
#define TNT_FILAMENT_BACKEND_HANDLE_H
|
||||||
|
|
||||||
|
#include <utils/compiler.h>
|
||||||
|
#if !defined(NDEBUG)
|
||||||
|
#include <utils/Log.h>
|
||||||
|
#endif
|
||||||
|
#include <utils/debug.h>
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include <limits>
|
||||||
|
#include <type_traits>
|
||||||
|
|
||||||
|
namespace filament::backend {
|
||||||
|
|
||||||
|
struct HwBufferObject;
|
||||||
|
struct HwFence;
|
||||||
|
struct HwIndexBuffer;
|
||||||
|
struct HwProgram;
|
||||||
|
struct HwRenderPrimitive;
|
||||||
|
struct HwRenderTarget;
|
||||||
|
struct HwSamplerGroup;
|
||||||
|
struct HwStream;
|
||||||
|
struct HwSwapChain;
|
||||||
|
struct HwSync;
|
||||||
|
struct HwTexture;
|
||||||
|
struct HwTimerQuery;
|
||||||
|
struct HwVertexBuffer;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* A handle to a backend resource. HandleBase is for internal use only.
|
||||||
|
* HandleBase *must* be a trivial for the purposes of calls, that is, it cannot have user-defined
|
||||||
|
* copy or move constructors.
|
||||||
|
*/
|
||||||
|
|
||||||
|
//! \privatesection
|
||||||
|
|
||||||
|
class HandleBase {
|
||||||
|
public:
|
||||||
|
using HandleId = uint32_t;
|
||||||
|
static constexpr const HandleId nullid = HandleId{ std::numeric_limits<HandleId>::max() };
|
||||||
|
|
||||||
|
constexpr HandleBase() noexcept: object(nullid) {}
|
||||||
|
|
||||||
|
// whether this Handle is initialized
|
||||||
|
explicit operator bool() const noexcept { return object != nullid; }
|
||||||
|
|
||||||
|
// clear the handle, this doesn't free associated resources
|
||||||
|
void clear() noexcept { object = nullid; }
|
||||||
|
|
||||||
|
// compare handles
|
||||||
|
bool operator==(const HandleBase& rhs) const noexcept { return object == rhs.object; }
|
||||||
|
bool operator!=(const HandleBase& rhs) const noexcept { return object != rhs.object; }
|
||||||
|
bool operator<(const HandleBase& rhs) const noexcept { return object < rhs.object; }
|
||||||
|
bool operator<=(const HandleBase& rhs) const noexcept { return object <= rhs.object; }
|
||||||
|
bool operator>(const HandleBase& rhs) const noexcept { return object > rhs.object; }
|
||||||
|
bool operator>=(const HandleBase& rhs) const noexcept { return object >= rhs.object; }
|
||||||
|
|
||||||
|
// get this handle's handleId
|
||||||
|
HandleId getId() const noexcept { return object; }
|
||||||
|
|
||||||
|
// initialize a handle, for internal use only.
|
||||||
|
explicit HandleBase(HandleId id) noexcept : object(id) {
|
||||||
|
assert_invariant(object != nullid); // usually means an uninitialized handle is used
|
||||||
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
HandleBase(HandleBase const& rhs) noexcept = default;
|
||||||
|
HandleBase& operator=(HandleBase const& rhs) noexcept = default;
|
||||||
|
|
||||||
|
private:
|
||||||
|
HandleId object;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Type-safe handle to backend resources
|
||||||
|
* @tparam T Type of the resource
|
||||||
|
*/
|
||||||
|
template<typename T>
|
||||||
|
struct Handle : public HandleBase {
|
||||||
|
|
||||||
|
Handle() noexcept = default;
|
||||||
|
|
||||||
|
Handle(Handle const& rhs) noexcept = default;
|
||||||
|
|
||||||
|
Handle& operator=(Handle const& rhs) noexcept = default;
|
||||||
|
|
||||||
|
explicit Handle(HandleId id) noexcept : HandleBase(id) { }
|
||||||
|
|
||||||
|
// type-safe Handle cast
|
||||||
|
template<typename B, typename = std::enable_if_t<std::is_base_of<T, B>::value> >
|
||||||
|
Handle(Handle<B> const& base) noexcept : HandleBase(base) { } // NOLINT(hicpp-explicit-conversions,google-explicit-constructor)
|
||||||
|
|
||||||
|
private:
|
||||||
|
#if !defined(NDEBUG)
|
||||||
|
template <typename U>
|
||||||
|
friend utils::io::ostream& operator<<(utils::io::ostream& out, const Handle<U>& h) noexcept;
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
// Types used by the command stream
|
||||||
|
// (we use this renaming because the macro-system doesn't deal well with "<" and ">")
|
||||||
|
using BufferObjectHandle = Handle<HwBufferObject>;
|
||||||
|
using FenceHandle = Handle<HwFence>;
|
||||||
|
using IndexBufferHandle = Handle<HwIndexBuffer>;
|
||||||
|
using ProgramHandle = Handle<HwProgram>;
|
||||||
|
using RenderPrimitiveHandle = Handle<HwRenderPrimitive>;
|
||||||
|
using RenderTargetHandle = Handle<HwRenderTarget>;
|
||||||
|
using SamplerGroupHandle = Handle<HwSamplerGroup>;
|
||||||
|
using StreamHandle = Handle<HwStream>;
|
||||||
|
using SwapChainHandle = Handle<HwSwapChain>;
|
||||||
|
using SyncHandle = Handle<HwSync>;
|
||||||
|
using TextureHandle = Handle<HwTexture>;
|
||||||
|
using TimerQueryHandle = Handle<HwTimerQuery>;
|
||||||
|
using VertexBufferHandle = Handle<HwVertexBuffer>;
|
||||||
|
|
||||||
|
} // namespace filament::backend
|
||||||
|
|
||||||
|
#endif // TNT_FILAMENT_BACKEND_HANDLE_H
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2019 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef TNT_FILAMENT_BACKEND_PIPELINESTATE_H
|
||||||
|
#define TNT_FILAMENT_BACKEND_PIPELINESTATE_H
|
||||||
|
|
||||||
|
#include <backend/DriverEnums.h>
|
||||||
|
#include <backend/Handle.h>
|
||||||
|
|
||||||
|
#include <limits>
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
namespace filament::backend {
|
||||||
|
|
||||||
|
//! \privatesection
|
||||||
|
|
||||||
|
struct PipelineState {
|
||||||
|
Handle<HwProgram> program;
|
||||||
|
RasterState rasterState;
|
||||||
|
StencilState stencilState;
|
||||||
|
PolygonOffset polygonOffset;
|
||||||
|
Viewport scissor{ 0, 0,
|
||||||
|
(uint32_t)std::numeric_limits<int32_t>::max(),
|
||||||
|
(uint32_t)std::numeric_limits<int32_t>::max()
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace filament::backend
|
||||||
|
|
||||||
|
#if !defined(NDEBUG)
|
||||||
|
utils::io::ostream& operator<<(utils::io::ostream& out, const filament::backend::PipelineState& ps);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif //TNT_FILAMENT_BACKEND_PIPELINESTATE_H
|
||||||
@@ -0,0 +1,317 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
//! \file
|
||||||
|
|
||||||
|
#ifndef TNT_FILAMENT_BACKEND_PIXELBUFFERDESCRIPTOR_H
|
||||||
|
#define TNT_FILAMENT_BACKEND_PIXELBUFFERDESCRIPTOR_H
|
||||||
|
|
||||||
|
#include <backend/BufferDescriptor.h>
|
||||||
|
#include <backend/DriverEnums.h>
|
||||||
|
|
||||||
|
#include <utils/compiler.h>
|
||||||
|
#include <utils/debug.h>
|
||||||
|
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
namespace filament::backend {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A descriptor to an image in main memory, typically used to transfer image data from the CPU
|
||||||
|
* to the GPU.
|
||||||
|
*
|
||||||
|
* A PixelBufferDescriptor owns the memory buffer it references, therefore PixelBufferDescriptor
|
||||||
|
* cannot be copied, but can be moved.
|
||||||
|
*
|
||||||
|
* PixelBufferDescriptor releases ownership of the memory-buffer when it's destroyed.
|
||||||
|
*/
|
||||||
|
class UTILS_PUBLIC PixelBufferDescriptor : public BufferDescriptor {
|
||||||
|
public:
|
||||||
|
using PixelDataFormat = backend::PixelDataFormat;
|
||||||
|
using PixelDataType = backend::PixelDataType;
|
||||||
|
|
||||||
|
PixelBufferDescriptor() = default;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new PixelBufferDescriptor referencing an image in main memory
|
||||||
|
*
|
||||||
|
* @param buffer Virtual address of the buffer containing the image
|
||||||
|
* @param size Size in bytes of the buffer containing the image
|
||||||
|
* @param format Format of the image pixels
|
||||||
|
* @param type Type of the image pixels
|
||||||
|
* @param alignment Alignment in bytes of pixel rows
|
||||||
|
* @param left Left coordinate in pixels
|
||||||
|
* @param top Top coordinate in pixels
|
||||||
|
* @param stride Stride of a row in pixels
|
||||||
|
* @param handler Handler to dispatch the callback or nullptr for the default handler
|
||||||
|
* @param callback A callback used to release the CPU buffer
|
||||||
|
* @param user An opaque user pointer passed to the callback function when it's called
|
||||||
|
*/
|
||||||
|
PixelBufferDescriptor(void const* buffer, size_t size,
|
||||||
|
PixelDataFormat format, PixelDataType type, uint8_t alignment,
|
||||||
|
uint32_t left, uint32_t top, uint32_t stride,
|
||||||
|
CallbackHandler* handler, Callback callback, void* user = nullptr) noexcept
|
||||||
|
: BufferDescriptor(buffer, size, handler, callback, user),
|
||||||
|
left(left), top(top), stride(stride),
|
||||||
|
format(format), type(type), alignment(alignment) {
|
||||||
|
}
|
||||||
|
|
||||||
|
PixelBufferDescriptor(void const* buffer, size_t size,
|
||||||
|
PixelDataFormat format, PixelDataType type, uint8_t alignment = 1,
|
||||||
|
uint32_t left = 0, uint32_t top = 0, uint32_t stride = 0,
|
||||||
|
Callback callback = nullptr, void* user = nullptr) noexcept
|
||||||
|
: BufferDescriptor(buffer, size, callback, user),
|
||||||
|
left(left), top(top), stride(stride),
|
||||||
|
format(format), type(type), alignment(alignment) {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new PixelBufferDescriptor referencing an image in main memory
|
||||||
|
*
|
||||||
|
* @param buffer Virtual address of the buffer containing the image
|
||||||
|
* @param size Size in bytes of the buffer containing the image
|
||||||
|
* @param format Format of the image pixels
|
||||||
|
* @param type Type of the image pixels
|
||||||
|
* @param handler Handler to dispatch the callback or nullptr for the default handler
|
||||||
|
* @param callback A callback used to release the CPU buffer
|
||||||
|
* @param user An opaque user pointer passed to the callback function when it's called
|
||||||
|
*/
|
||||||
|
PixelBufferDescriptor(void const* buffer, size_t size,
|
||||||
|
PixelDataFormat format, PixelDataType type,
|
||||||
|
CallbackHandler* handler, Callback callback, void* user = nullptr) noexcept
|
||||||
|
: BufferDescriptor(buffer, size, handler, callback, user),
|
||||||
|
stride(0), format(format), type(type), alignment(1) {
|
||||||
|
}
|
||||||
|
|
||||||
|
PixelBufferDescriptor(void const* buffer, size_t size,
|
||||||
|
PixelDataFormat format, PixelDataType type,
|
||||||
|
Callback callback, void* user = nullptr) noexcept
|
||||||
|
: BufferDescriptor(buffer, size, callback, user),
|
||||||
|
stride(0), format(format), type(type), alignment(1) {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new PixelBufferDescriptor referencing a compressed image in main memory
|
||||||
|
*
|
||||||
|
* @param buffer Virtual address of the buffer containing the image
|
||||||
|
* @param size Size in bytes of the buffer containing the image
|
||||||
|
* @param format Compressed format of the image
|
||||||
|
* @param imageSize Compressed size of the image
|
||||||
|
* @param handler Handler to dispatch the callback or nullptr for the default handler
|
||||||
|
* @param callback A callback used to release the CPU buffer
|
||||||
|
* @param user An opaque user pointer passed to the callback function when it's called
|
||||||
|
*/
|
||||||
|
PixelBufferDescriptor(void const* buffer, size_t size,
|
||||||
|
backend::CompressedPixelDataType format, uint32_t imageSize,
|
||||||
|
CallbackHandler* handler, Callback callback, void* user = nullptr) noexcept
|
||||||
|
: BufferDescriptor(buffer, size, handler, callback, user),
|
||||||
|
imageSize(imageSize), compressedFormat(format), type(PixelDataType::COMPRESSED),
|
||||||
|
alignment(1) {
|
||||||
|
}
|
||||||
|
|
||||||
|
PixelBufferDescriptor(void const* buffer, size_t size,
|
||||||
|
backend::CompressedPixelDataType format, uint32_t imageSize,
|
||||||
|
Callback callback, void* user = nullptr) noexcept
|
||||||
|
: BufferDescriptor(buffer, size, callback, user),
|
||||||
|
imageSize(imageSize), compressedFormat(format), type(PixelDataType::COMPRESSED),
|
||||||
|
alignment(1) {
|
||||||
|
}
|
||||||
|
|
||||||
|
// --------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
template<typename T, void(T::*method)(void const*, size_t)>
|
||||||
|
static PixelBufferDescriptor make(void const* buffer, size_t size,
|
||||||
|
PixelDataFormat format, PixelDataType type, uint8_t alignment,
|
||||||
|
uint32_t left, uint32_t top, uint32_t stride, T* data,
|
||||||
|
CallbackHandler* handler = nullptr) noexcept {
|
||||||
|
return { buffer, size, format, type, alignment, left, top, stride,
|
||||||
|
handler, [](void* b, size_t s, void* u) {
|
||||||
|
(*static_cast<T**>(u)->*method)(b, s); }, data };
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename T, void(T::*method)(void const*, size_t)>
|
||||||
|
static PixelBufferDescriptor make(void const* buffer, size_t size,
|
||||||
|
PixelDataFormat format, PixelDataType type, T* data,
|
||||||
|
CallbackHandler* handler = nullptr) noexcept {
|
||||||
|
return { buffer, size, format, type, handler, [](void* b, size_t s, void* u) {
|
||||||
|
(*static_cast<T**>(u)->*method)(b, s); }, data };
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename T, void(T::*method)(void const*, size_t)>
|
||||||
|
static PixelBufferDescriptor make(void const* buffer, size_t size,
|
||||||
|
backend::CompressedPixelDataType format, uint32_t imageSize, T* data,
|
||||||
|
CallbackHandler* handler = nullptr) noexcept {
|
||||||
|
return { buffer, size, format, imageSize, handler, [](void* b, size_t s, void* u) {
|
||||||
|
(*static_cast<T**>(u)->*method)(b, s); }, data
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
static PixelBufferDescriptor make(void const* buffer, size_t size,
|
||||||
|
PixelDataFormat format, PixelDataType type, uint8_t alignment,
|
||||||
|
uint32_t left, uint32_t top, uint32_t stride, T&& functor,
|
||||||
|
CallbackHandler* handler = nullptr) noexcept {
|
||||||
|
return { buffer, size, format, type, alignment, left, top, stride,
|
||||||
|
handler, [](void* b, size_t s, void* u) {
|
||||||
|
T& that = *static_cast<T*>(u);
|
||||||
|
that(b, s);
|
||||||
|
delete &that;
|
||||||
|
}, new T(std::forward<T>(functor))
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
static PixelBufferDescriptor make(void const* buffer, size_t size,
|
||||||
|
PixelDataFormat format, PixelDataType type, T&& functor,
|
||||||
|
CallbackHandler* handler = nullptr) noexcept {
|
||||||
|
return { buffer, size, format, type,
|
||||||
|
handler, [](void* b, size_t s, void* u) {
|
||||||
|
T& that = *static_cast<T*>(u);
|
||||||
|
that(b, s);
|
||||||
|
delete &that;
|
||||||
|
}, new T(std::forward<T>(functor))
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
static PixelBufferDescriptor make(void const* buffer, size_t size,
|
||||||
|
backend::CompressedPixelDataType format, uint32_t imageSize, T&& functor,
|
||||||
|
CallbackHandler* handler = nullptr) noexcept {
|
||||||
|
return { buffer, size, format, imageSize,
|
||||||
|
handler, [](void* b, size_t s, void* u) {
|
||||||
|
T& that = *static_cast<T*>(u);
|
||||||
|
that(b, s);
|
||||||
|
delete &that;
|
||||||
|
}, new T(std::forward<T>(functor))
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// --------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Computes the size in bytes needed to fit an image of given dimensions and format
|
||||||
|
*
|
||||||
|
* @param format Format of the image pixels
|
||||||
|
* @param type Type of the image pixels
|
||||||
|
* @param stride Stride of a row in pixels
|
||||||
|
* @param height Height of the image in rows
|
||||||
|
* @param alignment Alignment in bytes of pixel rows
|
||||||
|
* @return The buffer size needed to fit this image in bytes
|
||||||
|
*/
|
||||||
|
static constexpr size_t computeDataSize(PixelDataFormat format, PixelDataType type,
|
||||||
|
size_t stride, size_t height, size_t alignment) noexcept {
|
||||||
|
assert_invariant(alignment);
|
||||||
|
|
||||||
|
if (type == PixelDataType::COMPRESSED) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t n = 0;
|
||||||
|
switch (format) {
|
||||||
|
case PixelDataFormat::R:
|
||||||
|
case PixelDataFormat::R_INTEGER:
|
||||||
|
case PixelDataFormat::DEPTH_COMPONENT:
|
||||||
|
case PixelDataFormat::ALPHA:
|
||||||
|
n = 1;
|
||||||
|
break;
|
||||||
|
case PixelDataFormat::RG:
|
||||||
|
case PixelDataFormat::RG_INTEGER:
|
||||||
|
case PixelDataFormat::DEPTH_STENCIL:
|
||||||
|
n = 2;
|
||||||
|
break;
|
||||||
|
case PixelDataFormat::RGB:
|
||||||
|
case PixelDataFormat::RGB_INTEGER:
|
||||||
|
n = 3;
|
||||||
|
break;
|
||||||
|
case PixelDataFormat::UNUSED: // shouldn't happen (used to be rgbm)
|
||||||
|
case PixelDataFormat::RGBA:
|
||||||
|
case PixelDataFormat::RGBA_INTEGER:
|
||||||
|
n = 4;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t bpp = n;
|
||||||
|
switch (type) {
|
||||||
|
case PixelDataType::COMPRESSED: // Impossible -- to squash the IDE warnings
|
||||||
|
case PixelDataType::UBYTE:
|
||||||
|
case PixelDataType::BYTE:
|
||||||
|
// nothing to do
|
||||||
|
break;
|
||||||
|
case PixelDataType::USHORT:
|
||||||
|
case PixelDataType::SHORT:
|
||||||
|
case PixelDataType::HALF:
|
||||||
|
bpp *= 2;
|
||||||
|
break;
|
||||||
|
case PixelDataType::UINT:
|
||||||
|
case PixelDataType::INT:
|
||||||
|
case PixelDataType::FLOAT:
|
||||||
|
bpp *= 4;
|
||||||
|
break;
|
||||||
|
case PixelDataType::UINT_10F_11F_11F_REV:
|
||||||
|
// Special case, format must be RGB and uses 4 bytes
|
||||||
|
assert_invariant(format == PixelDataFormat::RGB);
|
||||||
|
bpp = 4;
|
||||||
|
break;
|
||||||
|
case PixelDataType::UINT_2_10_10_10_REV:
|
||||||
|
// Special case, format must be RGBA and uses 4 bytes
|
||||||
|
assert_invariant(format == PixelDataFormat::RGBA);
|
||||||
|
bpp = 4;
|
||||||
|
break;
|
||||||
|
case PixelDataType::USHORT_565:
|
||||||
|
// Special case, format must be RGB and uses 2 bytes
|
||||||
|
assert_invariant(format == PixelDataFormat::RGB);
|
||||||
|
bpp = 2;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t const bpr = bpp * stride;
|
||||||
|
size_t const bprAligned = (bpr + (alignment - 1)) & (~alignment + 1);
|
||||||
|
return bprAligned * height;
|
||||||
|
}
|
||||||
|
|
||||||
|
//! left coordinate in pixels
|
||||||
|
uint32_t left = 0;
|
||||||
|
//! top coordinate in pixels
|
||||||
|
uint32_t top = 0;
|
||||||
|
union {
|
||||||
|
struct {
|
||||||
|
//! stride in pixels
|
||||||
|
uint32_t stride;
|
||||||
|
//! Pixel data format
|
||||||
|
PixelDataFormat format;
|
||||||
|
};
|
||||||
|
struct {
|
||||||
|
//! compressed image size
|
||||||
|
uint32_t imageSize;
|
||||||
|
//! compressed image format
|
||||||
|
backend::CompressedPixelDataType compressedFormat;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
//! pixel data type
|
||||||
|
PixelDataType type : 4;
|
||||||
|
//! row alignment in bytes
|
||||||
|
uint8_t alignment : 4;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace backend::filament
|
||||||
|
|
||||||
|
#if !defined(NDEBUG)
|
||||||
|
utils::io::ostream& operator<<(utils::io::ostream& out, const filament::backend::PixelBufferDescriptor& b);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // TNT_FILAMENT_BACKEND_PIXELBUFFERDESCRIPTOR_H
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
//! \file
|
||||||
|
|
||||||
|
#ifndef TNT_FILAMENT_BACKEND_PLATFORM_H
|
||||||
|
#define TNT_FILAMENT_BACKEND_PLATFORM_H
|
||||||
|
|
||||||
|
#include <backend/DriverEnums.h>
|
||||||
|
|
||||||
|
#include <utils/compiler.h>
|
||||||
|
|
||||||
|
namespace filament::backend {
|
||||||
|
|
||||||
|
class Driver;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Platform is an interface that abstracts how the backend (also referred to as Driver) is
|
||||||
|
* created. The backend provides several common Platform concrete implementations, which are
|
||||||
|
* selected automatically. It is possible however to provide a custom Platform when creating
|
||||||
|
* the filament Engine.
|
||||||
|
*/
|
||||||
|
class UTILS_PUBLIC Platform {
|
||||||
|
public:
|
||||||
|
struct SwapChain {};
|
||||||
|
struct Fence {};
|
||||||
|
struct Stream {};
|
||||||
|
|
||||||
|
struct DriverConfig {
|
||||||
|
/*
|
||||||
|
* size of handle arena in bytes. Setting to 0 indicates default value is to be used.
|
||||||
|
* Driver clamps to valid values.
|
||||||
|
*/
|
||||||
|
size_t handleArenaSize = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
virtual ~Platform() noexcept;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Queries the underlying OS version.
|
||||||
|
* @return The OS version.
|
||||||
|
*/
|
||||||
|
virtual int getOSVersion() const noexcept = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates and initializes the low-level API (e.g. an OpenGL context or Vulkan instance),
|
||||||
|
* then creates the concrete Driver.
|
||||||
|
* The caller takes ownership of the returned Driver* and must destroy it with delete.
|
||||||
|
*
|
||||||
|
* @param sharedContext an optional shared context. This is not meaningful with all graphic
|
||||||
|
* APIs and platforms.
|
||||||
|
* For EGL platforms, this is an EGLContext.
|
||||||
|
*
|
||||||
|
* @param driverConfig specifies driver initialization parameters
|
||||||
|
*
|
||||||
|
* @return nullptr on failure, or a pointer to the newly created driver.
|
||||||
|
*/
|
||||||
|
virtual backend::Driver* createDriver(void* sharedContext,
|
||||||
|
const DriverConfig& driverConfig) noexcept = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Processes the platform's event queue when called from its primary event-handling thread.
|
||||||
|
*
|
||||||
|
* Internally, Filament might need to call this when waiting on a fence. It is only implemented
|
||||||
|
* on platforms that need it, such as macOS + OpenGL. Returns false if this is not the main
|
||||||
|
* thread, or if the platform does not need to perform any special processing.
|
||||||
|
*/
|
||||||
|
virtual bool pumpEvents() noexcept;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace filament
|
||||||
|
|
||||||
|
#endif // TNT_FILAMENT_BACKEND_PLATFORM_H
|
||||||
@@ -0,0 +1,104 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2019 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
//! \file
|
||||||
|
|
||||||
|
#ifndef TNT_FILAMENT_BACKEND_PRESENTCALLABLE
|
||||||
|
#define TNT_FILAMENT_BACKEND_PRESENTCALLABLE
|
||||||
|
|
||||||
|
#include <utils/compiler.h>
|
||||||
|
|
||||||
|
namespace filament {
|
||||||
|
namespace backend {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A PresentCallable is a callable object that, when called, schedules a frame for presentation on
|
||||||
|
* a SwapChain.
|
||||||
|
*
|
||||||
|
* Typically, Filament's backend is responsible scheduling a frame's presentation. However, there
|
||||||
|
* are certain cases where the application might want to control when a frame is scheduled for
|
||||||
|
* presentation.
|
||||||
|
*
|
||||||
|
* For example, on iOS, UIKit elements can be synchronized to 3D content by scheduling a present
|
||||||
|
* within a CATransation:
|
||||||
|
*
|
||||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
* void myFrameScheduledCallback(PresentCallable presentCallable, void* user) {
|
||||||
|
* [CATransaction begin];
|
||||||
|
* // Update other UI elements...
|
||||||
|
* presentCallable();
|
||||||
|
* [CATransaction commit];
|
||||||
|
* }
|
||||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
*
|
||||||
|
* To obtain a PresentCallable, set a SwapChain::FrameScheduledCallback on a SwapChain with the
|
||||||
|
* SwapChain::setFrameScheduledCallback method. The callback is called with a PresentCallable object
|
||||||
|
* and optional user data:
|
||||||
|
*
|
||||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
* swapChain->setFrameScheduledCallback(myFrameScheduledCallback, nullptr);
|
||||||
|
* if (renderer->beginFrame(swapChain)) {
|
||||||
|
* renderer->render(view);
|
||||||
|
* renderer->endFrame();
|
||||||
|
* }
|
||||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
*
|
||||||
|
* @remark Only Filament's Metal backend supports PresentCallables and frame callbacks. Other
|
||||||
|
* backends ignore the callback (which will never be called) and proceed normally.
|
||||||
|
*
|
||||||
|
* @remark The SwapChain::FrameScheduledCallback is called on an arbitrary thread.
|
||||||
|
*
|
||||||
|
* Applications *must* call each PresentCallable they receive. Each PresentCallable represents a
|
||||||
|
* frame that is waiting to be presented. If an application fails to call a PresentCallable, a
|
||||||
|
* memory leak could occur. To "cancel" the presentation of a frame, pass false to the
|
||||||
|
* PresentCallable, which will cancel the presentation of the frame and release associated memory.
|
||||||
|
*
|
||||||
|
* @see Renderer, SwapChain::setFrameScheduledCallback
|
||||||
|
*/
|
||||||
|
class UTILS_PUBLIC PresentCallable {
|
||||||
|
public:
|
||||||
|
|
||||||
|
using PresentFn = void(*)(bool presentFrame, void* user);
|
||||||
|
|
||||||
|
PresentCallable(PresentFn fn, void* user) noexcept;
|
||||||
|
~PresentCallable() noexcept = default;
|
||||||
|
PresentCallable(const PresentCallable& rhs) = default;
|
||||||
|
PresentCallable& operator=(const PresentCallable& rhs) = default;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Call this PresentCallable, scheduling the associated frame for presentation. Pass false for
|
||||||
|
* presentFrame to effectively "cancel" the presentation of the frame.
|
||||||
|
*
|
||||||
|
* @param presentFrame if false, will not present the frame but releases associated memory
|
||||||
|
*/
|
||||||
|
void operator()(bool presentFrame = true) noexcept;
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
PresentFn mPresentFn;
|
||||||
|
void* mUser = nullptr;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated, FrameFinishedCallback has been renamed to SwapChain::FrameScheduledCallback.
|
||||||
|
*/
|
||||||
|
using FrameFinishedCallback UTILS_DEPRECATED = void(*)(PresentCallable callable, void* user);
|
||||||
|
|
||||||
|
} // namespace backend
|
||||||
|
} // namespace filament
|
||||||
|
|
||||||
|
#endif // TNT_FILAMENT_BACKEND_PRESENTCALLABLE
|
||||||
@@ -0,0 +1,129 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef TNT_FILAMENT_BACKEND_PRIVATE_PROGRAM_H
|
||||||
|
#define TNT_FILAMENT_BACKEND_PRIVATE_PROGRAM_H
|
||||||
|
|
||||||
|
#include <utils/compiler.h>
|
||||||
|
#include <utils/CString.h>
|
||||||
|
#include <utils/FixedCapacityVector.h>
|
||||||
|
#include <utils/Invocable.h>
|
||||||
|
#include <utils/Log.h>
|
||||||
|
#include <utils/ostream.h>
|
||||||
|
|
||||||
|
#include <backend/DriverEnums.h>
|
||||||
|
|
||||||
|
#include <array>
|
||||||
|
#include <variant>
|
||||||
|
|
||||||
|
namespace filament::backend {
|
||||||
|
|
||||||
|
class Program {
|
||||||
|
public:
|
||||||
|
|
||||||
|
static constexpr size_t SHADER_TYPE_COUNT = 3;
|
||||||
|
static constexpr size_t UNIFORM_BINDING_COUNT = CONFIG_UNIFORM_BINDING_COUNT;
|
||||||
|
static constexpr size_t SAMPLER_BINDING_COUNT = CONFIG_SAMPLER_BINDING_COUNT;
|
||||||
|
|
||||||
|
struct Sampler {
|
||||||
|
utils::CString name = {}; // name of the sampler in the shader
|
||||||
|
uint32_t binding = 0; // binding point of the sampler in the shader
|
||||||
|
};
|
||||||
|
|
||||||
|
struct SamplerGroupData {
|
||||||
|
utils::FixedCapacityVector<Sampler> samplers;
|
||||||
|
ShaderStageFlags stageFlags = ShaderStageFlags::ALL_SHADER_STAGE_FLAGS;
|
||||||
|
};
|
||||||
|
|
||||||
|
using UniformBlockInfo = std::array<utils::CString, UNIFORM_BINDING_COUNT>;
|
||||||
|
using SamplerGroupInfo = std::array<SamplerGroupData, SAMPLER_BINDING_COUNT>;
|
||||||
|
using ShaderBlob = utils::FixedCapacityVector<uint8_t>;
|
||||||
|
using ShaderSource = std::array<ShaderBlob, SHADER_TYPE_COUNT>;
|
||||||
|
|
||||||
|
Program() noexcept;
|
||||||
|
|
||||||
|
Program(const Program& rhs) = delete;
|
||||||
|
Program& operator=(const Program& rhs) = delete;
|
||||||
|
|
||||||
|
Program(Program&& rhs) noexcept;
|
||||||
|
Program& operator=(Program&& rhs) noexcept;
|
||||||
|
|
||||||
|
~Program() noexcept;
|
||||||
|
|
||||||
|
// sets the material name and variant for diagnostic purposes only
|
||||||
|
Program& diagnostics(utils::CString const& name,
|
||||||
|
utils::Invocable<utils::io::ostream&(utils::io::ostream& out)>&& logger);
|
||||||
|
|
||||||
|
// sets one of the program's shader (e.g. vertex, fragment)
|
||||||
|
// string-based shaders are null terminated, consequently the size parameter must include the
|
||||||
|
// null terminating character.
|
||||||
|
Program& shader(ShaderStage shader, void const* data, size_t size);
|
||||||
|
|
||||||
|
// Note: This is only needed for GLES3.0 backends, because the layout(binding=) syntax is
|
||||||
|
// not permitted in glsl. The backend needs a way to associate a uniform block
|
||||||
|
// to a binding point.
|
||||||
|
Program& uniformBlockBindings(
|
||||||
|
utils::FixedCapacityVector<std::pair<utils::CString, uint8_t>> const& uniformBlockBindings) noexcept;
|
||||||
|
|
||||||
|
// sets the 'bindingPoint' sampler group descriptor for this program.
|
||||||
|
// 'samplers' can be destroyed after this call.
|
||||||
|
// This effectively associates a set of (BindingPoints, index) to a texture unit in the shader.
|
||||||
|
// Or more precisely, what layout(binding=) is set to in GLSL.
|
||||||
|
Program& setSamplerGroup(size_t bindingPoint, ShaderStageFlags stageFlags,
|
||||||
|
Sampler const* samplers, size_t count) noexcept;
|
||||||
|
|
||||||
|
struct SpecializationConstant {
|
||||||
|
uint32_t id; // id set in glsl
|
||||||
|
std::variant<int32_t, float, bool> value; // value and type
|
||||||
|
};
|
||||||
|
|
||||||
|
Program& specializationConstants(
|
||||||
|
utils::FixedCapacityVector<SpecializationConstant> specConstants) noexcept;
|
||||||
|
|
||||||
|
|
||||||
|
ShaderSource const& getShadersSource() const noexcept { return mShadersSource; }
|
||||||
|
ShaderSource& getShadersSource() noexcept { return mShadersSource; }
|
||||||
|
|
||||||
|
UniformBlockInfo const& getUniformBlockBindings() const noexcept { return mUniformBlocks; }
|
||||||
|
UniformBlockInfo& getUniformBlockBindings() noexcept { return mUniformBlocks; }
|
||||||
|
|
||||||
|
SamplerGroupInfo const& getSamplerGroupInfo() const { return mSamplerGroups; }
|
||||||
|
SamplerGroupInfo& getSamplerGroupInfo() { return mSamplerGroups; }
|
||||||
|
|
||||||
|
utils::CString const& getName() const noexcept { return mName; }
|
||||||
|
utils::CString& getName() noexcept { return mName; }
|
||||||
|
|
||||||
|
utils::FixedCapacityVector<SpecializationConstant> const& getSpecializationConstants() const noexcept {
|
||||||
|
return mSpecializationConstants;
|
||||||
|
}
|
||||||
|
utils::FixedCapacityVector<SpecializationConstant>& getSpecializationConstants() noexcept {
|
||||||
|
return mSpecializationConstants;
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
friend utils::io::ostream& operator<<(utils::io::ostream& out, const Program& builder);
|
||||||
|
|
||||||
|
UniformBlockInfo mUniformBlocks = {};
|
||||||
|
SamplerGroupInfo mSamplerGroups = {};
|
||||||
|
ShaderSource mShadersSource;
|
||||||
|
utils::CString mName;
|
||||||
|
utils::Invocable<utils::io::ostream&(utils::io::ostream& out)> mLogger;
|
||||||
|
utils::FixedCapacityVector<SpecializationConstant> mSpecializationConstants;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace filament::backend
|
||||||
|
|
||||||
|
#endif // TNT_FILAMENT_BACKEND_PRIVATE_PROGRAM_H
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
# include/backend Headers
|
||||||
|
|
||||||
|
Headers in `include/backend/` are fully public, in particular they can be included in filament's
|
||||||
|
public headers.
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2022 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
//! \file
|
||||||
|
|
||||||
|
#ifndef TNT_FILAMENT_BACKEND_SAMPLERDESCRIPTOR_H
|
||||||
|
#define TNT_FILAMENT_BACKEND_SAMPLERDESCRIPTOR_H
|
||||||
|
|
||||||
|
#include <backend/DriverEnums.h>
|
||||||
|
#include <backend/Handle.h>
|
||||||
|
|
||||||
|
#include <utils/compiler.h>
|
||||||
|
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
namespace filament::backend {
|
||||||
|
|
||||||
|
struct UTILS_PUBLIC SamplerDescriptor {
|
||||||
|
Handle<HwTexture> t;
|
||||||
|
SamplerParams s{};
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace filament::backend
|
||||||
|
|
||||||
|
#endif // TNT_FILAMENT_BACKEND_SAMPLERDESCRIPTOR_H
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2019 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef TNT_FILAMENT_BACKEND_TARGETBUFFERINFO_H
|
||||||
|
#define TNT_FILAMENT_BACKEND_TARGETBUFFERINFO_H
|
||||||
|
|
||||||
|
#include <backend/DriverEnums.h>
|
||||||
|
#include <backend/Handle.h>
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
namespace filament::backend {
|
||||||
|
|
||||||
|
//! \privatesection
|
||||||
|
|
||||||
|
struct TargetBufferInfo {
|
||||||
|
// texture to be used as render target
|
||||||
|
Handle<HwTexture> handle;
|
||||||
|
|
||||||
|
// level to be used
|
||||||
|
uint8_t level = 0;
|
||||||
|
|
||||||
|
// for cubemaps and 3D textures. See TextureCubemapFace for the face->layer mapping
|
||||||
|
uint16_t layer = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
class MRT {
|
||||||
|
public:
|
||||||
|
static constexpr uint8_t MIN_SUPPORTED_RENDER_TARGET_COUNT = 4u;
|
||||||
|
|
||||||
|
// When updating this, make sure to also take care of RenderTarget.java
|
||||||
|
static constexpr uint8_t MAX_SUPPORTED_RENDER_TARGET_COUNT = 8u;
|
||||||
|
|
||||||
|
private:
|
||||||
|
TargetBufferInfo mInfos[MAX_SUPPORTED_RENDER_TARGET_COUNT];
|
||||||
|
|
||||||
|
public:
|
||||||
|
TargetBufferInfo const& operator[](size_t i) const noexcept {
|
||||||
|
return mInfos[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
TargetBufferInfo& operator[](size_t i) noexcept {
|
||||||
|
return mInfos[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
MRT() noexcept = default;
|
||||||
|
|
||||||
|
MRT(TargetBufferInfo const& color) noexcept // NOLINT(hicpp-explicit-conversions)
|
||||||
|
: mInfos{ color } {
|
||||||
|
}
|
||||||
|
|
||||||
|
MRT(TargetBufferInfo const& color0, TargetBufferInfo const& color1) noexcept
|
||||||
|
: mInfos{ color0, color1 } {
|
||||||
|
}
|
||||||
|
|
||||||
|
MRT(TargetBufferInfo const& color0, TargetBufferInfo const& color1,
|
||||||
|
TargetBufferInfo const& color2) noexcept
|
||||||
|
: mInfos{ color0, color1, color2 } {
|
||||||
|
}
|
||||||
|
|
||||||
|
MRT(TargetBufferInfo const& color0, TargetBufferInfo const& color1,
|
||||||
|
TargetBufferInfo const& color2, TargetBufferInfo const& color3) noexcept
|
||||||
|
: mInfos{ color0, color1, color2, color3 } {
|
||||||
|
}
|
||||||
|
|
||||||
|
// this is here for backward compatibility
|
||||||
|
MRT(Handle<HwTexture> handle, uint8_t level, uint16_t layer) noexcept
|
||||||
|
: mInfos{{ handle, level, layer }} {
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace filament::backend
|
||||||
|
|
||||||
|
#if !defined(NDEBUG)
|
||||||
|
utils::io::ostream& operator<<(utils::io::ostream& out, const filament::backend::TargetBufferInfo& tbi);
|
||||||
|
utils::io::ostream& operator<<(utils::io::ostream& out, const filament::backend::MRT& mrt);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif //TNT_FILAMENT_BACKEND_TARGETBUFFERINFO_H
|
||||||
@@ -0,0 +1,261 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef TNT_FILAMENT_BACKEND_PRIVATE_OPENGLPLATFORM_H
|
||||||
|
#define TNT_FILAMENT_BACKEND_PRIVATE_OPENGLPLATFORM_H
|
||||||
|
|
||||||
|
#include <backend/AcquiredImage.h>
|
||||||
|
#include <backend/Platform.h>
|
||||||
|
|
||||||
|
namespace filament::backend {
|
||||||
|
|
||||||
|
class Driver;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A Platform interface that creates an OpenGL backend.
|
||||||
|
*
|
||||||
|
* WARNING: None of the methods below are allowed to change the GL state and must restore it
|
||||||
|
* upon return.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class OpenGLPlatform : public Platform {
|
||||||
|
protected:
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Derived classes can use this to instantiate the default OpenGLDriver backend.
|
||||||
|
* This is typically called from your implementation of createDriver()
|
||||||
|
*/
|
||||||
|
static Driver* createDefaultDriver(OpenGLPlatform* platform,
|
||||||
|
void* sharedContext, const DriverConfig& driverConfig);
|
||||||
|
|
||||||
|
~OpenGLPlatform() noexcept override;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
struct ExternalTexture {
|
||||||
|
unsigned int target; // GLenum target
|
||||||
|
unsigned int id; // GLuint id
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called by the driver to destroy the OpenGL context. This should clean up any windows
|
||||||
|
* or buffers from initialization. This is for instance where `eglDestroyContext` would be
|
||||||
|
* called.
|
||||||
|
*/
|
||||||
|
virtual void terminate() noexcept = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called by the driver to create a SwapChain for this driver.
|
||||||
|
*
|
||||||
|
* @param nativeWindow a token representing the native window. See concrete implementation
|
||||||
|
* for details.
|
||||||
|
* @param flags extra flags used by the implementation, see filament::SwapChain
|
||||||
|
* @return The driver's SwapChain object.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
virtual SwapChain* createSwapChain(void* nativeWindow, uint64_t flags) noexcept = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return whether createSwapChain supports the SWAP_CHAIN_CONFIG_SRGB_COLORSPACE flag.
|
||||||
|
* The default implementation returns false.
|
||||||
|
*
|
||||||
|
* @return true if SWAP_CHAIN_CONFIG_SRGB_COLORSPACE is supported, false otherwise.
|
||||||
|
*/
|
||||||
|
virtual bool isSRGBSwapChainSupported() const noexcept;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called by the driver create a headless SwapChain.
|
||||||
|
*
|
||||||
|
* @param width width of the buffer
|
||||||
|
* @param height height of the buffer
|
||||||
|
* @param flags extra flags used by the implementation, see filament::SwapChain
|
||||||
|
* @return The driver's SwapChain object.
|
||||||
|
*
|
||||||
|
* TODO: we need a more generic way of passing construction parameters
|
||||||
|
* A void* might be enough.
|
||||||
|
*/
|
||||||
|
virtual SwapChain* createSwapChain(uint32_t width, uint32_t height, uint64_t flags) noexcept = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called by the driver to destroys the SwapChain
|
||||||
|
* @param swapChain SwapChain to be destroyed.
|
||||||
|
*/
|
||||||
|
virtual void destroySwapChain(SwapChain* swapChain) noexcept = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called by the driver to establish the default FBO. The default implementation returns 0.
|
||||||
|
* @return a GLuint casted to a uint32_t that is an OpenGL framebuffer object.
|
||||||
|
*/
|
||||||
|
virtual uint32_t createDefaultRenderTarget() noexcept;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called by the driver to make the OpenGL context active on the calling thread and bind
|
||||||
|
* the drawSwapChain to the default render target (FBO) created with createDefaultRenderTarget.
|
||||||
|
* @param drawSwapChain SwapChain to draw to. It must be bound to the default FBO.
|
||||||
|
* @param readSwapChain SwapChain to read from (for operation like `glBlitFramebuffer`)
|
||||||
|
*/
|
||||||
|
virtual void makeCurrent(SwapChain* drawSwapChain, SwapChain* readSwapChain) noexcept = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called by the driver once the current frame finishes drawing. Typically, this should present
|
||||||
|
* the drawSwapChain. This is for example where `eglMakeCurrent()` would be called.
|
||||||
|
* @param swapChain the SwapChain to present.
|
||||||
|
*/
|
||||||
|
virtual void commit(SwapChain* swapChain) noexcept = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the time the next committed buffer should be presented to the user at.
|
||||||
|
*
|
||||||
|
* @param presentationTimeInNanosecond time in the future in nanosecond. The clock used depends
|
||||||
|
* on the concrete platform implementation.
|
||||||
|
*/
|
||||||
|
virtual void setPresentationTime(int64_t presentationTimeInNanosecond) noexcept;
|
||||||
|
|
||||||
|
// --------------------------------------------------------------------------------------------
|
||||||
|
// Fence support
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Can this implementation create a Fence.
|
||||||
|
* @return true if supported, false otherwise. The default implementation returns false.
|
||||||
|
*/
|
||||||
|
virtual bool canCreateFence() noexcept;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a Fence (e.g. eglCreateSyncKHR). This must be implemented if `canCreateFence`
|
||||||
|
* returns true. Fences are used for frame pacing.
|
||||||
|
*
|
||||||
|
* @return A Fence object. The default implementation returns nullptr.
|
||||||
|
*/
|
||||||
|
virtual Fence* createFence() noexcept;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destroys a Fence object. The default implementation does nothing.
|
||||||
|
*
|
||||||
|
* @param fence Fence to destroy.
|
||||||
|
*/
|
||||||
|
virtual void destroyFence(Fence* fence) noexcept;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Waits on a Fence.
|
||||||
|
*
|
||||||
|
* @param fence Fence to wait on.
|
||||||
|
* @param timeout Timeout.
|
||||||
|
* @return Whether the fence signaled or timed out. See backend::FenceStatus.
|
||||||
|
* The default implementation always return backend::FenceStatus::ERROR.
|
||||||
|
*/
|
||||||
|
virtual backend::FenceStatus waitFence(Fence* fence, uint64_t timeout) noexcept;
|
||||||
|
|
||||||
|
|
||||||
|
// --------------------------------------------------------------------------------------------
|
||||||
|
// Streaming support
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a Stream from a native Stream.
|
||||||
|
*
|
||||||
|
* WARNING: This is called synchronously from the application thread (NOT the Driver thread)
|
||||||
|
*
|
||||||
|
* @param nativeStream The native stream, this parameter depends on the concrete implementation.
|
||||||
|
* @return A new Stream object.
|
||||||
|
*/
|
||||||
|
virtual Stream* createStream(void* nativeStream) noexcept;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destroys a Stream.
|
||||||
|
* @param stream Stream to destroy.
|
||||||
|
*/
|
||||||
|
virtual void destroyStream(Stream* stream) noexcept;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The specified stream takes ownership of the texture (tname) object
|
||||||
|
* Once attached, the texture is automatically updated with the Stream's content, which
|
||||||
|
* could be a video stream for instance.
|
||||||
|
*
|
||||||
|
* @param stream Stream to take ownership of the texture
|
||||||
|
* @param tname GL texture id to "bind" to the Stream.
|
||||||
|
*/
|
||||||
|
virtual void attach(Stream* stream, intptr_t tname) noexcept;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destroys the texture associated to the stream
|
||||||
|
* @param stream Stream to detach from its texture
|
||||||
|
*/
|
||||||
|
virtual void detach(Stream* stream) noexcept;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates the content of the texture attached to the stream.
|
||||||
|
* @param stream Stream to update
|
||||||
|
* @param timestamp Output parameter: Timestamp of the image bound to the texture.
|
||||||
|
*/
|
||||||
|
virtual void updateTexImage(Stream* stream, int64_t* timestamp) noexcept;
|
||||||
|
|
||||||
|
|
||||||
|
// --------------------------------------------------------------------------------------------
|
||||||
|
// External Image support
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates an external texture handle. External textures don't have any parameters because
|
||||||
|
* these are undefined until setExternalImage() is called.
|
||||||
|
* @return a pointer to an ExternalTexture structure filled with valid token. However, the
|
||||||
|
* implementation could just return { 0, GL_TEXTURE_2D } at this point. The actual
|
||||||
|
* values can be delayed until setExternalImage.
|
||||||
|
*/
|
||||||
|
virtual ExternalTexture *createExternalImageTexture() noexcept;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destroys an external texture handle and associated data.
|
||||||
|
* @param texture a pointer to the handle to destroy.
|
||||||
|
*/
|
||||||
|
virtual void destroyExternalImage(ExternalTexture* texture) noexcept;
|
||||||
|
|
||||||
|
// called on the application thread to allow Filament to take ownership of the image
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Takes ownership of the externalImage. The externalImage parameter depends on the Platform's
|
||||||
|
* concrete implementation. Ownership is released when destroyExternalImage() is called.
|
||||||
|
*
|
||||||
|
* WARNING: This is called synchronously from the application thread (NOT the Driver thread)
|
||||||
|
*
|
||||||
|
* @param externalImage A token representing the platform's external image.
|
||||||
|
* @see destroyExternalImage
|
||||||
|
*/
|
||||||
|
virtual void retainExternalImage(void* externalImage) noexcept;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called to bind the platform-specific externalImage to an ExternalTexture.
|
||||||
|
* ExternalTexture::id is guaranteed to be bound when this method is called and ExternalTexture
|
||||||
|
* is updated with new values for id/target if necessary.
|
||||||
|
*
|
||||||
|
* WARNING: this method is not allowed to change the bound texture, or must restore the previous
|
||||||
|
* binding upon return. This is to avoid problem with a backend doing state caching.
|
||||||
|
*
|
||||||
|
* @param externalImage The platform-specific external image.
|
||||||
|
* @param texture an in/out pointer to ExternalTexture, id and target can be updated if necessary.
|
||||||
|
* @return true on success, false on error.
|
||||||
|
*/
|
||||||
|
virtual bool setExternalImage(void* externalImage, ExternalTexture* texture) noexcept;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The method allows platforms to convert a user-supplied external image object into a new type
|
||||||
|
* (e.g. HardwareBuffer => EGLImage). The default implementation returns source.
|
||||||
|
* @param source Image to transform.
|
||||||
|
* @return Transformed image.
|
||||||
|
*/
|
||||||
|
virtual AcquiredImage transformAcquiredImage(AcquiredImage source) noexcept;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace filament
|
||||||
|
|
||||||
|
#endif // TNT_FILAMENT_BACKEND_PRIVATE_OPENGLPLATFORM_H
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2017 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_COCOA_GL_H
|
||||||
|
#define TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_COCOA_GL_H
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include <backend/platforms/OpenGLPlatform.h>
|
||||||
|
|
||||||
|
#include <backend/DriverEnums.h>
|
||||||
|
|
||||||
|
namespace filament::backend {
|
||||||
|
|
||||||
|
struct PlatformCocoaGLImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A concrete implementation of OpenGLPlatform that supports macOS's Cocoa.
|
||||||
|
*/
|
||||||
|
class PlatformCocoaGL : public OpenGLPlatform {
|
||||||
|
public:
|
||||||
|
PlatformCocoaGL();
|
||||||
|
~PlatformCocoaGL() noexcept override;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
// --------------------------------------------------------------------------------------------
|
||||||
|
// Platform Interface
|
||||||
|
|
||||||
|
Driver* createDriver(void* sharedContext,
|
||||||
|
const Platform::DriverConfig& driverConfig) noexcept override;
|
||||||
|
|
||||||
|
// Currently returns 0
|
||||||
|
int getOSVersion() const noexcept override;
|
||||||
|
|
||||||
|
bool pumpEvents() noexcept override;
|
||||||
|
|
||||||
|
// --------------------------------------------------------------------------------------------
|
||||||
|
// OpenGLPlatform Interface
|
||||||
|
|
||||||
|
void terminate() noexcept override;
|
||||||
|
|
||||||
|
SwapChain* createSwapChain(void* nativewindow, uint64_t flags) noexcept override;
|
||||||
|
SwapChain* createSwapChain(uint32_t width, uint32_t height, uint64_t flags) noexcept override;
|
||||||
|
void destroySwapChain(SwapChain* swapChain) noexcept override;
|
||||||
|
void makeCurrent(SwapChain* drawSwapChain, SwapChain* readSwapChain) noexcept override;
|
||||||
|
void commit(SwapChain* swapChain) noexcept override;
|
||||||
|
OpenGLPlatform::ExternalTexture* createExternalImageTexture() noexcept override;
|
||||||
|
void destroyExternalImage(ExternalTexture* texture) noexcept override;
|
||||||
|
void retainExternalImage(void* externalImage) noexcept override;
|
||||||
|
bool setExternalImage(void* externalImage, ExternalTexture* texture) noexcept override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
PlatformCocoaGLImpl* pImpl = nullptr;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace filament::backend
|
||||||
|
|
||||||
|
#endif // TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_COCOA_GL_H
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2017 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_COCOA_TOUCH_GL_H
|
||||||
|
#define TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_COCOA_TOUCH_GL_H
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include <backend/platforms/OpenGLPlatform.h>
|
||||||
|
|
||||||
|
#include <backend/DriverEnums.h>
|
||||||
|
|
||||||
|
namespace filament::backend {
|
||||||
|
|
||||||
|
struct PlatformCocoaTouchGLImpl;
|
||||||
|
|
||||||
|
class PlatformCocoaTouchGL : public OpenGLPlatform {
|
||||||
|
public:
|
||||||
|
PlatformCocoaTouchGL();
|
||||||
|
~PlatformCocoaTouchGL() noexcept;
|
||||||
|
|
||||||
|
// --------------------------------------------------------------------------------------------
|
||||||
|
// Platform Interface
|
||||||
|
|
||||||
|
Driver* createDriver(void* sharedGLContext,
|
||||||
|
const Platform::DriverConfig& driverConfig) noexcept override;
|
||||||
|
|
||||||
|
int getOSVersion() const noexcept final { return 0; }
|
||||||
|
|
||||||
|
// --------------------------------------------------------------------------------------------
|
||||||
|
// OpenGLPlatform Interface
|
||||||
|
|
||||||
|
void terminate() noexcept override;
|
||||||
|
|
||||||
|
uint32_t createDefaultRenderTarget() noexcept override;
|
||||||
|
|
||||||
|
SwapChain* createSwapChain(void* nativewindow, uint64_t flags) noexcept override;
|
||||||
|
SwapChain* createSwapChain(uint32_t width, uint32_t height, uint64_t flags) noexcept override;
|
||||||
|
void destroySwapChain(SwapChain* swapChain) noexcept override;
|
||||||
|
void makeCurrent(SwapChain* drawSwapChain, SwapChain* readSwapChain) noexcept override;
|
||||||
|
void commit(SwapChain* swapChain) noexcept override;
|
||||||
|
|
||||||
|
OpenGLPlatform::ExternalTexture* createExternalImageTexture() noexcept override;
|
||||||
|
void destroyExternalImage(ExternalTexture* texture) noexcept override;
|
||||||
|
void retainExternalImage(void* externalImage) noexcept override;
|
||||||
|
bool setExternalImage(void* externalImage, ExternalTexture* texture) noexcept override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
PlatformCocoaTouchGLImpl* pImpl = nullptr;
|
||||||
|
};
|
||||||
|
|
||||||
|
using ContextManager = PlatformCocoaTouchGL;
|
||||||
|
|
||||||
|
} // namespace filament::backend
|
||||||
|
|
||||||
|
#endif // TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_COCOA_TOUCH_GL_H
|
||||||
@@ -0,0 +1,120 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2017 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_EGL_H
|
||||||
|
#define TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_EGL_H
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include <EGL/egl.h>
|
||||||
|
#include <EGL/eglext.h>
|
||||||
|
|
||||||
|
#include <backend/platforms/OpenGLPlatform.h>
|
||||||
|
|
||||||
|
#include <backend/DriverEnums.h>
|
||||||
|
|
||||||
|
namespace filament::backend {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A concrete implementation of OpenGLPlatform that supports EGL.
|
||||||
|
*/
|
||||||
|
class PlatformEGL : public OpenGLPlatform {
|
||||||
|
public:
|
||||||
|
|
||||||
|
PlatformEGL() noexcept;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
// --------------------------------------------------------------------------------------------
|
||||||
|
// Platform Interface
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initializes EGL, creates the OpenGL context and returns a concrete Driver implementation
|
||||||
|
* that supports OpenGL/OpenGL ES.
|
||||||
|
*/
|
||||||
|
Driver* createDriver(void* sharedContext,
|
||||||
|
const Platform::DriverConfig& driverConfig) noexcept override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This returns zero. This method can be overridden to return something more useful.
|
||||||
|
* @return zero
|
||||||
|
*/
|
||||||
|
int getOSVersion() const noexcept override;
|
||||||
|
|
||||||
|
// --------------------------------------------------------------------------------------------
|
||||||
|
// OpenGLPlatform Interface
|
||||||
|
|
||||||
|
void terminate() noexcept override;
|
||||||
|
|
||||||
|
bool isSRGBSwapChainSupported() const noexcept override;
|
||||||
|
SwapChain* createSwapChain(void* nativewindow, uint64_t flags) noexcept override;
|
||||||
|
SwapChain* createSwapChain(uint32_t width, uint32_t height, uint64_t flags) noexcept override;
|
||||||
|
void destroySwapChain(SwapChain* swapChain) noexcept override;
|
||||||
|
void makeCurrent(SwapChain* drawSwapChain, SwapChain* readSwapChain) noexcept override;
|
||||||
|
void commit(SwapChain* swapChain) noexcept override;
|
||||||
|
|
||||||
|
bool canCreateFence() noexcept override;
|
||||||
|
Fence* createFence() noexcept override;
|
||||||
|
void destroyFence(Fence* fence) noexcept override;
|
||||||
|
FenceStatus waitFence(Fence* fence, uint64_t timeout) noexcept override;
|
||||||
|
|
||||||
|
OpenGLPlatform::ExternalTexture* createExternalImageTexture() noexcept override;
|
||||||
|
void destroyExternalImage(ExternalTexture* texture) noexcept override;
|
||||||
|
bool setExternalImage(void* externalImage, ExternalTexture* texture) noexcept override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Logs glGetError() to slog.e
|
||||||
|
* @param name a string giving some context on the error. Typically __func__.
|
||||||
|
*/
|
||||||
|
static void logEglError(const char* name) noexcept;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Calls glGetError() to clear the current error flags. logs a warning to log.w if
|
||||||
|
* an error was pending.
|
||||||
|
*/
|
||||||
|
static void clearGlError() noexcept;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Always use this instead of eglMakeCurrent().
|
||||||
|
*/
|
||||||
|
EGLBoolean makeCurrent(EGLSurface drawSurface, EGLSurface readSurface) noexcept;
|
||||||
|
|
||||||
|
// TODO: this should probably use getters instead.
|
||||||
|
EGLDisplay mEGLDisplay = EGL_NO_DISPLAY;
|
||||||
|
EGLContext mEGLContext = EGL_NO_CONTEXT;
|
||||||
|
EGLSurface mCurrentDrawSurface = EGL_NO_SURFACE;
|
||||||
|
EGLSurface mCurrentReadSurface = EGL_NO_SURFACE;
|
||||||
|
EGLSurface mEGLDummySurface = EGL_NO_SURFACE;
|
||||||
|
EGLConfig mEGLConfig = EGL_NO_CONFIG_KHR;
|
||||||
|
|
||||||
|
// supported extensions detected at runtime
|
||||||
|
struct {
|
||||||
|
struct {
|
||||||
|
bool OES_EGL_image_external_essl3 = false;
|
||||||
|
} gl;
|
||||||
|
struct {
|
||||||
|
bool KHR_no_config_context = false;
|
||||||
|
bool KHR_gl_colorspace = false;
|
||||||
|
} egl;
|
||||||
|
} ext;
|
||||||
|
|
||||||
|
private:
|
||||||
|
void initializeGlExtensions() noexcept;
|
||||||
|
EGLConfig findSwapChainConfig(uint64_t flags) const;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace filament::backend
|
||||||
|
|
||||||
|
#endif // TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_EGL_H
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2017 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_EGL_ANDROID_H
|
||||||
|
#define TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_EGL_ANDROID_H
|
||||||
|
|
||||||
|
#include <backend/platforms/PlatformEGL.h>
|
||||||
|
|
||||||
|
namespace filament::backend {
|
||||||
|
|
||||||
|
class ExternalStreamManagerAndroid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A concrete implementation of OpenGLPlatform and subclass of PlatformEGL that supports
|
||||||
|
* EGL on Android. It adds Android streaming functionality to PlatformEGL.
|
||||||
|
*/
|
||||||
|
class PlatformEGLAndroid : public PlatformEGL {
|
||||||
|
public:
|
||||||
|
|
||||||
|
PlatformEGLAndroid() noexcept;
|
||||||
|
~PlatformEGLAndroid() noexcept override;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
// --------------------------------------------------------------------------------------------
|
||||||
|
// Platform Interface
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the Android SDK version.
|
||||||
|
* @return Android SDK version.
|
||||||
|
*/
|
||||||
|
int getOSVersion() const noexcept override;
|
||||||
|
|
||||||
|
Driver* createDriver(void* sharedContext,
|
||||||
|
const Platform::DriverConfig& driverConfig) noexcept override;
|
||||||
|
|
||||||
|
// --------------------------------------------------------------------------------------------
|
||||||
|
// OpenGLPlatform Interface
|
||||||
|
|
||||||
|
void terminate() noexcept override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the presentation time using `eglPresentationTimeANDROID`
|
||||||
|
* @param presentationTimeInNanosecond
|
||||||
|
*/
|
||||||
|
void setPresentationTime(int64_t presentationTimeInNanosecond) noexcept override;
|
||||||
|
|
||||||
|
|
||||||
|
Stream* createStream(void* nativeStream) noexcept override;
|
||||||
|
void destroyStream(Stream* stream) noexcept override;
|
||||||
|
void attach(Stream* stream, intptr_t tname) noexcept override;
|
||||||
|
void detach(Stream* stream) noexcept override;
|
||||||
|
void updateTexImage(Stream* stream, int64_t* timestamp) noexcept override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts a AHardwareBuffer to EGLImage
|
||||||
|
* @param source source.image is a AHardwareBuffer
|
||||||
|
* @return source.image contains an EGLImage
|
||||||
|
*/
|
||||||
|
AcquiredImage transformAcquiredImage(AcquiredImage source) noexcept override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
int mOSVersion;
|
||||||
|
ExternalStreamManagerAndroid& mExternalStreamManager;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace filament::backend
|
||||||
|
|
||||||
|
#endif // TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_EGL_ANDROID_H
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2022 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef TNT_FILAMENT_DRIVER_OPENGL_PLATFORM_EGL_HEADLESS_H
|
||||||
|
#define TNT_FILAMENT_DRIVER_OPENGL_PLATFORM_EGL_HEADLESS_H
|
||||||
|
|
||||||
|
#include "PlatformEGL.h"
|
||||||
|
|
||||||
|
namespace filament::backend {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A concrete implementation of OpenGLPlatform that supports EGL with only headless swapchains.
|
||||||
|
*/
|
||||||
|
class PlatformEGLHeadless : public PlatformEGL {
|
||||||
|
public:
|
||||||
|
PlatformEGLHeadless() noexcept;
|
||||||
|
|
||||||
|
Driver* createDriver(void* sharedContext,
|
||||||
|
const Platform::DriverConfig& driverConfig) noexcept override;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace filament
|
||||||
|
|
||||||
|
#endif // TNT_FILAMENT_DRIVER_OPENGL_PLATFORM_EGL_HEADLESS_H
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2017 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_GLX_H
|
||||||
|
#define TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_GLX_H
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include "bluegl/BlueGL.h"
|
||||||
|
#include <GL/glx.h>
|
||||||
|
|
||||||
|
#include <backend/platforms/OpenGLPlatform.h>
|
||||||
|
|
||||||
|
#include <backend/DriverEnums.h>
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
namespace filament::backend {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A concrete implementation of OpenGLPlatform that supports GLX.
|
||||||
|
*/
|
||||||
|
class PlatformGLX : public OpenGLPlatform {
|
||||||
|
protected:
|
||||||
|
// --------------------------------------------------------------------------------------------
|
||||||
|
// Platform Interface
|
||||||
|
|
||||||
|
Driver* createDriver(void* sharedGLContext,
|
||||||
|
const DriverConfig& driverConfig) noexcept override;
|
||||||
|
|
||||||
|
int getOSVersion() const noexcept final override { return 0; }
|
||||||
|
|
||||||
|
// --------------------------------------------------------------------------------------------
|
||||||
|
// OpenGLPlatform Interface
|
||||||
|
|
||||||
|
void terminate() noexcept override;
|
||||||
|
|
||||||
|
SwapChain* createSwapChain(void* nativewindow, uint64_t flags) noexcept override;
|
||||||
|
SwapChain* createSwapChain(uint32_t width, uint32_t height, uint64_t flags) noexcept override;
|
||||||
|
void destroySwapChain(SwapChain* swapChain) noexcept override;
|
||||||
|
void makeCurrent(SwapChain* drawSwapChain, SwapChain* readSwapChain) noexcept override;
|
||||||
|
void commit(SwapChain* swapChain) noexcept override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
Display *mGLXDisplay;
|
||||||
|
GLXContext mGLXContext;
|
||||||
|
GLXFBConfig* mGLXConfig;
|
||||||
|
GLXPbuffer mDummySurface;
|
||||||
|
std::vector<GLXPbuffer> mPBuffers;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace filament::backend
|
||||||
|
|
||||||
|
#endif // TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_GLX_H
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2018 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_WGL_H
|
||||||
|
#define TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_WGL_H
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include <windows.h>
|
||||||
|
#include "utils/unwindows.h"
|
||||||
|
|
||||||
|
#include <backend/platforms/OpenGLPlatform.h>
|
||||||
|
|
||||||
|
#include <backend/DriverEnums.h>
|
||||||
|
|
||||||
|
namespace filament::backend {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A concrete implementation of OpenGLPlatform that supports WGL.
|
||||||
|
*/
|
||||||
|
class PlatformWGL : public OpenGLPlatform {
|
||||||
|
protected:
|
||||||
|
// --------------------------------------------------------------------------------------------
|
||||||
|
// Platform Interface
|
||||||
|
|
||||||
|
Driver* createDriver(void* sharedGLContext,
|
||||||
|
const Platform::DriverConfig& driverConfig) noexcept override;
|
||||||
|
|
||||||
|
int getOSVersion() const noexcept final override { return 0; }
|
||||||
|
|
||||||
|
// --------------------------------------------------------------------------------------------
|
||||||
|
// OpenGLPlatform Interface
|
||||||
|
|
||||||
|
void terminate() noexcept override;
|
||||||
|
|
||||||
|
SwapChain* createSwapChain(void* nativewindow, uint64_t flags) noexcept override;
|
||||||
|
SwapChain* createSwapChain(uint32_t width, uint32_t height, uint64_t flags) noexcept override;
|
||||||
|
void destroySwapChain(SwapChain* swapChain) noexcept override;
|
||||||
|
void makeCurrent(SwapChain* drawSwapChain, SwapChain* readSwapChain) noexcept override;
|
||||||
|
void commit(SwapChain* swapChain) noexcept override;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
HGLRC mContext = NULL;
|
||||||
|
HWND mHWnd = NULL;
|
||||||
|
HDC mWhdc = NULL;
|
||||||
|
PIXELFORMATDESCRIPTOR mPfd = {};
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace filament::backend
|
||||||
|
|
||||||
|
#endif // TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_GLX_H
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2018 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_WEBGL_H
|
||||||
|
#define TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_WEBGL_H
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include <backend/platforms/OpenGLPlatform.h>
|
||||||
|
|
||||||
|
#include <backend/DriverEnums.h>
|
||||||
|
|
||||||
|
namespace filament::backend {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A concrete implementation of OpenGLPlatform that supports WebGL.
|
||||||
|
*/
|
||||||
|
class PlatformWebGL : public OpenGLPlatform {
|
||||||
|
protected:
|
||||||
|
// --------------------------------------------------------------------------------------------
|
||||||
|
// Platform Interface
|
||||||
|
|
||||||
|
Driver* createDriver(void* sharedGLContext,
|
||||||
|
const Platform::DriverConfig& driverConfig) noexcept override;
|
||||||
|
|
||||||
|
int getOSVersion() const noexcept override;
|
||||||
|
|
||||||
|
// --------------------------------------------------------------------------------------------
|
||||||
|
// OpenGLPlatform Interface
|
||||||
|
|
||||||
|
void terminate() noexcept override;
|
||||||
|
|
||||||
|
SwapChain* createSwapChain(void* nativewindow, uint64_t flags) noexcept override;
|
||||||
|
SwapChain* createSwapChain(uint32_t width, uint32_t height, uint64_t flags) noexcept override;
|
||||||
|
void destroySwapChain(SwapChain* swapChain) noexcept override;
|
||||||
|
void makeCurrent(SwapChain* drawSwapChain, SwapChain* readSwapChain) noexcept override;
|
||||||
|
void commit(SwapChain* swapChain) noexcept override;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace filament::backend
|
||||||
|
|
||||||
|
#endif // TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_WEBGL_H
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2019 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef TNT_FILAMENT_BACKEND_PLATFORMS_VULKANPLATFORM_H
|
||||||
|
#define TNT_FILAMENT_BACKEND_PLATFORMS_VULKANPLATFORM_H
|
||||||
|
|
||||||
|
#include <backend/Platform.h>
|
||||||
|
|
||||||
|
namespace filament::backend {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A Platform interface that creates a Vulkan backend.
|
||||||
|
*/
|
||||||
|
|
||||||
|
class VulkanPlatform : public Platform {
|
||||||
|
public:
|
||||||
|
struct SurfaceBundle {
|
||||||
|
void* surface;
|
||||||
|
// On certain platforms, the extent of the surface cannot be queried from Vulkan. In those
|
||||||
|
// situations, we allow the frontend to pass in the extent to use in creating the swap
|
||||||
|
// chains. Platform implementation should set extent to 0 if they do not expect to set the
|
||||||
|
// swap chain extent.
|
||||||
|
uint32_t width;
|
||||||
|
uint32_t height;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Given a Vulkan instance and native window handle, creates the platform-specific surface.
|
||||||
|
virtual SurfaceBundle createVkSurfaceKHR(void* nativeWindow, void* instance,
|
||||||
|
uint64_t flags) noexcept = 0;
|
||||||
|
|
||||||
|
~VulkanPlatform() override;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace filament::backend
|
||||||
|
|
||||||
|
#endif //TNT_FILAMENT_BACKEND_PLATFORMS_VULKANPLATFORM_H
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2020 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CAMUTILS_BOOKMARK_H
|
||||||
|
#define CAMUTILS_BOOKMARK_H
|
||||||
|
|
||||||
|
#include <camutils/compiler.h>
|
||||||
|
|
||||||
|
#include <math/vec2.h>
|
||||||
|
#include <math/vec3.h>
|
||||||
|
|
||||||
|
namespace filament {
|
||||||
|
namespace camutils {
|
||||||
|
|
||||||
|
template <typename FLOAT> class FreeFlightManipulator;
|
||||||
|
template <typename FLOAT> class OrbitManipulator;
|
||||||
|
template <typename FLOAT> class MapManipulator;
|
||||||
|
template <typename FLOAT> class Manipulator;
|
||||||
|
|
||||||
|
enum class Mode { ORBIT, MAP, FREE_FLIGHT };
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Opaque memento to a viewing position and orientation (e.g. the "home" camera position).
|
||||||
|
*
|
||||||
|
* This little struct is meant to be passed around by value and can be used to track camera
|
||||||
|
* animation between waypoints. In map mode this implements Van Wijk interpolation.
|
||||||
|
*
|
||||||
|
* @see Manipulator::getCurrentBookmark, Manipulator::jumpToBookmark
|
||||||
|
*/
|
||||||
|
template <typename FLOAT>
|
||||||
|
struct CAMUTILS_PUBLIC Bookmark {
|
||||||
|
/**
|
||||||
|
* Interpolates between two bookmarks. The t argument must be between 0 and 1 (inclusive), and
|
||||||
|
* the two endpoints must have the same mode (ORBIT or MAP).
|
||||||
|
*/
|
||||||
|
static Bookmark<FLOAT> interpolate(Bookmark<FLOAT> a, Bookmark<FLOAT> b, double t);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Recommends a duration for animation between two MAP endpoints. The return value is a unitless
|
||||||
|
* multiplier.
|
||||||
|
*/
|
||||||
|
static double duration(Bookmark<FLOAT> a, Bookmark<FLOAT> b);
|
||||||
|
|
||||||
|
private:
|
||||||
|
struct MapParams {
|
||||||
|
FLOAT extent;
|
||||||
|
filament::math::vec2<FLOAT> center;
|
||||||
|
};
|
||||||
|
struct OrbitParams {
|
||||||
|
FLOAT phi;
|
||||||
|
FLOAT theta;
|
||||||
|
FLOAT distance;
|
||||||
|
filament::math::vec3<FLOAT> pivot;
|
||||||
|
};
|
||||||
|
struct FlightParams {
|
||||||
|
FLOAT pitch;
|
||||||
|
FLOAT yaw;
|
||||||
|
filament::math::vec3<FLOAT> position;
|
||||||
|
};
|
||||||
|
Mode mode;
|
||||||
|
MapParams map;
|
||||||
|
OrbitParams orbit;
|
||||||
|
FlightParams flight;
|
||||||
|
friend class FreeFlightManipulator<FLOAT>;
|
||||||
|
friend class OrbitManipulator<FLOAT>;
|
||||||
|
friend class MapManipulator<FLOAT>;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace camutils
|
||||||
|
} // namespace filament
|
||||||
|
|
||||||
|
#endif // CAMUTILS_BOOKMARK_H
|
||||||
@@ -0,0 +1,298 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2020 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CAMUTILS_MANIPULATOR_H
|
||||||
|
#define CAMUTILS_MANIPULATOR_H
|
||||||
|
|
||||||
|
#include <camutils/Bookmark.h>
|
||||||
|
#include <camutils/compiler.h>
|
||||||
|
|
||||||
|
#include <math/vec2.h>
|
||||||
|
#include <math/vec3.h>
|
||||||
|
#include <math/vec4.h>
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
namespace filament {
|
||||||
|
namespace camutils {
|
||||||
|
|
||||||
|
enum class Fov { VERTICAL, HORIZONTAL };
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper that enables camera interaction similar to sketchfab or Google Maps.
|
||||||
|
*
|
||||||
|
* Clients notify the camera manipulator of various mouse or touch events, then periodically call
|
||||||
|
* its getLookAt() method so that they can adjust their camera(s). Three modes are supported: ORBIT,
|
||||||
|
* MAP, and FREE_FLIGHT. To construct a manipulator instance, the desired mode is passed into the
|
||||||
|
* create method.
|
||||||
|
*
|
||||||
|
* Usage example:
|
||||||
|
*
|
||||||
|
* using CameraManipulator = camutils::Manipulator<float>;
|
||||||
|
* CameraManipulator* manip;
|
||||||
|
*
|
||||||
|
* void init() {
|
||||||
|
* manip = CameraManipulator::Builder()
|
||||||
|
* .viewport(1024, 768)
|
||||||
|
* .build(camutils::Mode::ORBIT);
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
* void onMouseDown(int x, int y) {
|
||||||
|
* manip->grabBegin(x, y, false);
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
* void onMouseMove(int x, int y) {
|
||||||
|
* manip->grabUpdate(x, y);
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
* void onMouseUp(int x, int y) {
|
||||||
|
* manip->grabEnd();
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
* void gameLoop() {
|
||||||
|
* while (true) {
|
||||||
|
* filament::math::float3 eye, center, up;
|
||||||
|
* manip->getLookAt(&eye, ¢er, &up);
|
||||||
|
* camera->lookAt(eye, center, up);
|
||||||
|
* render();
|
||||||
|
* }
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
* @see Bookmark
|
||||||
|
*/
|
||||||
|
template <typename FLOAT>
|
||||||
|
class CAMUTILS_PUBLIC Manipulator {
|
||||||
|
public:
|
||||||
|
using vec2 = filament::math::vec2<FLOAT>;
|
||||||
|
using vec3 = filament::math::vec3<FLOAT>;
|
||||||
|
using vec4 = filament::math::vec4<FLOAT>;
|
||||||
|
|
||||||
|
/** Opaque handle to a viewing position and orientation to facilitate camera animation. */
|
||||||
|
using Bookmark = filament::camutils::Bookmark<FLOAT>;
|
||||||
|
|
||||||
|
/** Optional raycasting function to enable perspective-correct panning. */
|
||||||
|
typedef bool (*RayCallback)(const vec3& origin, const vec3& dir, FLOAT* t, void* userdata);
|
||||||
|
|
||||||
|
/** Builder state, direct access is allowed but Builder methods are preferred. **/
|
||||||
|
struct Config {
|
||||||
|
int viewport[2];
|
||||||
|
vec3 targetPosition;
|
||||||
|
vec3 upVector;
|
||||||
|
FLOAT zoomSpeed;
|
||||||
|
vec3 orbitHomePosition;
|
||||||
|
vec2 orbitSpeed;
|
||||||
|
Fov fovDirection;
|
||||||
|
FLOAT fovDegrees;
|
||||||
|
FLOAT farPlane;
|
||||||
|
vec2 mapExtent;
|
||||||
|
FLOAT mapMinDistance;
|
||||||
|
vec3 flightStartPosition;
|
||||||
|
FLOAT flightStartPitch;
|
||||||
|
FLOAT flightStartYaw;
|
||||||
|
FLOAT flightMaxSpeed;
|
||||||
|
FLOAT flightSpeedSteps;
|
||||||
|
vec2 flightPanSpeed;
|
||||||
|
FLOAT flightMoveDamping;
|
||||||
|
vec4 groundPlane;
|
||||||
|
RayCallback raycastCallback;
|
||||||
|
void* raycastUserdata;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct Builder {
|
||||||
|
// Common properties
|
||||||
|
Builder& viewport(int width, int height); //! Width and height of the viewing area
|
||||||
|
Builder& targetPosition(FLOAT x, FLOAT y, FLOAT z); //! World-space position of interest, defaults to (0,0,0)
|
||||||
|
Builder& upVector(FLOAT x, FLOAT y, FLOAT z); //! Orientation for the home position, defaults to (0,1,0)
|
||||||
|
Builder& zoomSpeed(FLOAT val); //! Multiplied with scroll delta, defaults to 0.01
|
||||||
|
|
||||||
|
// Orbit mode properties
|
||||||
|
Builder& orbitHomePosition(FLOAT x, FLOAT y, FLOAT z); //! Initial eye position in world space, defaults to (0,0,1)
|
||||||
|
Builder& orbitSpeed(FLOAT x, FLOAT y); //! Multiplied with viewport delta, defaults to 0.01
|
||||||
|
|
||||||
|
// Map mode properties
|
||||||
|
Builder& fovDirection(Fov fov); //! The axis that's held constant when viewport changes
|
||||||
|
Builder& fovDegrees(FLOAT degrees); //! The full FOV (not the half-angle)
|
||||||
|
Builder& farPlane(FLOAT distance); //! The distance to the far plane
|
||||||
|
Builder& mapExtent(FLOAT worldWidth, FLOAT worldHeight); //! The ground size for computing home position
|
||||||
|
Builder& mapMinDistance(FLOAT mindist); //! Constrains the zoom-in level
|
||||||
|
|
||||||
|
// Free flight properties
|
||||||
|
Builder& flightStartPosition(FLOAT x, FLOAT y, FLOAT z); //! Initial eye position in world space, defaults to (0,0,0)
|
||||||
|
Builder& flightStartOrientation(FLOAT pitch, FLOAT yaw); //! Initial orientation in pitch and yaw, defaults to (0,0)
|
||||||
|
Builder& flightMaxMoveSpeed(FLOAT maxSpeed); //! The maximum camera speed in world units per second, defaults to 10
|
||||||
|
Builder& flightSpeedSteps(int steps); //! The number of speed steps adjustable with scroll wheel, defaults to 80
|
||||||
|
Builder& flightPanSpeed(FLOAT x, FLOAT y); //! Multiplied with viewport delta, defaults to 0.01,0.01
|
||||||
|
Builder& flightMoveDamping(FLOAT damping); //! Applies a deceleration to camera movement, defaults to 0 (no damping)
|
||||||
|
//! Lower values give slower damping times, a good default is 15
|
||||||
|
//! Too high a value may lead to instability
|
||||||
|
|
||||||
|
// Raycast properties
|
||||||
|
Builder& groundPlane(FLOAT a, FLOAT b, FLOAT c, FLOAT d); //! Plane equation used as a raycast fallback
|
||||||
|
Builder& raycastCallback(RayCallback cb, void* userdata); //! Raycast function for accurate grab-and-pan
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new camera manipulator, either ORBIT, MAP, or FREE_FLIGHT.
|
||||||
|
*
|
||||||
|
* Clients can simply use "delete" to destroy the manipulator.
|
||||||
|
*/
|
||||||
|
Manipulator* build(Mode mode);
|
||||||
|
|
||||||
|
Config details = {};
|
||||||
|
};
|
||||||
|
|
||||||
|
virtual ~Manipulator() = default;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the immutable mode of the manipulator.
|
||||||
|
*/
|
||||||
|
Mode getMode() const { return mMode; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the viewport dimensions. The manipulator uses this to process grab events and raycasts.
|
||||||
|
*/
|
||||||
|
void setViewport(int width, int height);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the current orthonormal basis; this is usually called once per frame.
|
||||||
|
*/
|
||||||
|
void getLookAt(vec3* eyePosition, vec3* targetPosition, vec3* upward) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Given a viewport coordinate, picks a point in the ground plane, or in the actual scene if the
|
||||||
|
* raycast callback was provided.
|
||||||
|
*/
|
||||||
|
bool raycast(int x, int y, vec3* result) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Given a viewport coordinate, computes a picking ray (origin + direction).
|
||||||
|
*/
|
||||||
|
void getRay(int x, int y, vec3* origin, vec3* dir) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Starts a grabbing session (i.e. the user is dragging around in the viewport).
|
||||||
|
*
|
||||||
|
* In MAP mode, this starts a panning session.
|
||||||
|
* In ORBIT mode, this starts either rotating or strafing.
|
||||||
|
* In FREE_FLIGHT mode, this starts a nodal panning session.
|
||||||
|
*
|
||||||
|
* @param x X-coordinate for point of interest in viewport space
|
||||||
|
* @param y Y-coordinate for point of interest in viewport space
|
||||||
|
* @param strafe ORBIT mode only; if true, starts a translation rather than a rotation
|
||||||
|
*/
|
||||||
|
virtual void grabBegin(int x, int y, bool strafe) = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates a grabbing session.
|
||||||
|
*
|
||||||
|
* This must be called at least once between grabBegin / grabEnd to dirty the camera.
|
||||||
|
*/
|
||||||
|
virtual void grabUpdate(int x, int y) = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ends a grabbing session.
|
||||||
|
*/
|
||||||
|
virtual void grabEnd() = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Keys used to translate the camera in FREE_FLIGHT mode.
|
||||||
|
* FORWARD and BACKWARD dolly the camera forwards and backwards.
|
||||||
|
* LEFT and RIGHT strafe the camera left and right.
|
||||||
|
* UP and DOWN boom the camera upwards and downwards.
|
||||||
|
*/
|
||||||
|
enum class Key {
|
||||||
|
FORWARD,
|
||||||
|
LEFT,
|
||||||
|
BACKWARD,
|
||||||
|
RIGHT,
|
||||||
|
UP,
|
||||||
|
DOWN,
|
||||||
|
|
||||||
|
COUNT
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Signals that a key is now in the down state.
|
||||||
|
*
|
||||||
|
* In FREE_FLIGHT mode, the camera is translated forward and backward and strafed left and right
|
||||||
|
* depending on the depressed keys. This allows WASD-style movement.
|
||||||
|
*/
|
||||||
|
virtual void keyDown(Key key);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Signals that a key is now in the up state.
|
||||||
|
*
|
||||||
|
* @see keyDown
|
||||||
|
*/
|
||||||
|
virtual void keyUp(Key key);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* In MAP and ORBIT modes, dollys the camera along the viewing direction.
|
||||||
|
* In FREE_FLIGHT mode, adjusts the move speed of the camera.
|
||||||
|
*
|
||||||
|
* @param x X-coordinate for point of interest in viewport space, ignored in FREE_FLIGHT mode
|
||||||
|
* @param y Y-coordinate for point of interest in viewport space, ignored in FREE_FLIGHT mode
|
||||||
|
* @param scrolldelta In MAP and ORBIT modes, negative means "zoom in", positive means "zoom out"
|
||||||
|
* In FREE_FLIGHT mode, negative means "slower", positive means "faster"
|
||||||
|
*/
|
||||||
|
virtual void scroll(int x, int y, FLOAT scrolldelta) = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Processes input and updates internal state.
|
||||||
|
*
|
||||||
|
* This must be called once every frame before getLookAt is valid.
|
||||||
|
*
|
||||||
|
* @param deltaTime The amount of time, in seconds, passed since the previous call to update.
|
||||||
|
*/
|
||||||
|
virtual void update(FLOAT deltaTime);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets a handle that can be used to reset the manipulator back to its current position.
|
||||||
|
*
|
||||||
|
* @see jumpToBookmark
|
||||||
|
*/
|
||||||
|
virtual Bookmark getCurrentBookmark() const = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets a handle that can be used to reset the manipulator back to its home position.
|
||||||
|
*
|
||||||
|
* @see jumpToBookmark
|
||||||
|
*/
|
||||||
|
virtual Bookmark getHomeBookmark() const = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the manipulator position and orientation back to a stashed state.
|
||||||
|
*
|
||||||
|
* @see getCurrentBookmark, getHomeBookmark
|
||||||
|
*/
|
||||||
|
virtual void jumpToBookmark(const Bookmark& bookmark) = 0;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
Manipulator(Mode mode, const Config& props);
|
||||||
|
|
||||||
|
virtual void setProperties(const Config& props);
|
||||||
|
|
||||||
|
vec3 raycastFarPlane(int x, int y) const;
|
||||||
|
|
||||||
|
const Mode mMode;
|
||||||
|
Config mProps;
|
||||||
|
vec3 mEye;
|
||||||
|
vec3 mTarget;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace camutils
|
||||||
|
} // namespace filament
|
||||||
|
|
||||||
|
#endif /* CAMUTILS_MANIPULATOR_H */
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CAMUTILS_COMPILER_H
|
||||||
|
#define CAMUTILS_COMPILER_H
|
||||||
|
|
||||||
|
#if __has_attribute(visibility)
|
||||||
|
# define CAMUTILS_PUBLIC __attribute__((visibility("default")))
|
||||||
|
#else
|
||||||
|
# define CAMUTILS_PUBLIC
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // CAMUTILS_COMPILER_H
|
||||||
@@ -0,0 +1,98 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2018 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef TNT_ENUMMANAGER_H
|
||||||
|
#define TNT_ENUMMANAGER_H
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
#include <string>
|
||||||
|
#include <unordered_map>
|
||||||
|
|
||||||
|
#include <filamat/MaterialBuilder.h>
|
||||||
|
|
||||||
|
namespace filamat {
|
||||||
|
|
||||||
|
using Property = MaterialBuilder::Property;
|
||||||
|
using UniformType = MaterialBuilder::UniformType;
|
||||||
|
using SamplerType = MaterialBuilder::SamplerType;
|
||||||
|
using SubpassType = MaterialBuilder::SubpassType;
|
||||||
|
using SamplerFormat = MaterialBuilder::SamplerFormat;
|
||||||
|
using ParameterPrecision = MaterialBuilder::ParameterPrecision;
|
||||||
|
using OutputTarget = MaterialBuilder::OutputTarget;
|
||||||
|
using OutputQualifier = MaterialBuilder::VariableQualifier;
|
||||||
|
using OutputType = MaterialBuilder::OutputType;
|
||||||
|
using ConstantType = MaterialBuilder::ConstantType;
|
||||||
|
|
||||||
|
// Convenience methods to convert std::string to Enum and also iterate over Enum values.
|
||||||
|
class Enums {
|
||||||
|
public:
|
||||||
|
|
||||||
|
// Returns true if string "s" is a valid string representation of an element of enum T.
|
||||||
|
template<typename T>
|
||||||
|
static bool isValid(const std::string& s) noexcept {
|
||||||
|
std::unordered_map<std::string, T>& map = getMap<T>();
|
||||||
|
return map.find(s) != map.end();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Return enum matching its string representation. Returns undefined if s is not a valid enum T
|
||||||
|
// value. You should always call isValid() first to validate a string before calling toEnum().
|
||||||
|
template<typename T>
|
||||||
|
static T toEnum(const std::string& s) noexcept {
|
||||||
|
std::unordered_map<std::string, T>& map = getMap<T>();
|
||||||
|
return map.at(s);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
static std::string toString(T t) noexcept;
|
||||||
|
|
||||||
|
// Return a map of all values in an enum with their string representation.
|
||||||
|
template<typename T>
|
||||||
|
static std::unordered_map<std::string, T>& map() noexcept {
|
||||||
|
std::unordered_map<std::string, T>& map = getMap<T>();
|
||||||
|
return map;
|
||||||
|
};
|
||||||
|
|
||||||
|
private:
|
||||||
|
template<typename T>
|
||||||
|
static std::unordered_map<std::string, T>& getMap() noexcept;
|
||||||
|
|
||||||
|
static std::unordered_map<std::string, Property> mStringToProperty;
|
||||||
|
static std::unordered_map<std::string, UniformType> mStringToUniformType;
|
||||||
|
static std::unordered_map<std::string, SamplerType> mStringToSamplerType;
|
||||||
|
static std::unordered_map<std::string, SubpassType> mStringToSubpassType;
|
||||||
|
static std::unordered_map<std::string, SamplerFormat> mStringToSamplerFormat;
|
||||||
|
static std::unordered_map<std::string, ParameterPrecision> mStringToSamplerPrecision;
|
||||||
|
static std::unordered_map<std::string, OutputTarget> mStringToOutputTarget;
|
||||||
|
static std::unordered_map<std::string, OutputQualifier> mStringToOutputQualifier;
|
||||||
|
static std::unordered_map<std::string, OutputType> mStringToOutputType;
|
||||||
|
static std::unordered_map<std::string, ConstantType> mStringToConstantType;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
std::string Enums::toString(T t) noexcept {
|
||||||
|
std::unordered_map<std::string, T>& map = getMap<T>();
|
||||||
|
auto result = std::find_if(map.begin(), map.end(), [t](auto& pair) {
|
||||||
|
return pair.second == t;
|
||||||
|
});
|
||||||
|
if (result != map.end()) {
|
||||||
|
return result->first;
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace filamat
|
||||||
|
|
||||||
|
#endif //TNT_ENUMMANAGER_H
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user