-
Notifications
You must be signed in to change notification settings - Fork 352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Python bindings for generation and rendering #1386
Add Python bindings for generation and rendering #1386
Conversation
@@ -0,0 +1,18 @@ | |||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GLTF loader was missing so can't load a number of sample geometry.
@@ -43,6 +43,9 @@ void bindPyDefinition(py::module& mod) | |||
.def("getFunction", &mx::Implementation::getFunction) | |||
.def("setNodeDef", &mx::Implementation::setNodeDef) | |||
.def("getNodeDef", &mx::Implementation::getNodeDef) | |||
.def("setNodeGraph", &mx::Implementation::setNodeGraph) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually for definition creation but added in to avoid another PR.
@@ -27,12 +27,18 @@ void bindPyGenOptions(py::module& mod) | |||
.def_readwrite("shaderInterfaceType", &mx::GenOptions::shaderInterfaceType) | |||
.def_readwrite("fileTextureVerticalFlip", &mx::GenOptions::fileTextureVerticalFlip) | |||
.def_readwrite("targetColorSpaceOverride", &mx::GenOptions::targetColorSpaceOverride) | |||
.def_readwrite("addUpstreamDependencies", &mx::GenOptions::addUpstreamDependencies) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is required to be able to generate reference code for nodes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes look good to me, thanks @kwokcb!
…dation#1386) Most of these wrapper updates are related to exposing missing APIs in Python for code gen and rendering.
Most of these wrapper updates are related to exposing missing APIs in Python for code gen and rendering.
For now this is for GLSL rendering in Python this is sufficient (driver is this example)