-
Notifications
You must be signed in to change notification settings - Fork 195
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
moderngl on Jupyter Notebook or Google Colab #378
Comments
Personally I have very little knowledge about Jupyter Notebook or Google Colab, so I woudn't be able to give a concrete answer. Maybe someone else here knows? |
The easiest way to get an image to appear as Jupyter cell output is by encoding it as a PNG, and passing that data to it's Image class.
You can register data types so this happens automatically. You could register types for There is some work to package this all up as an extension, this would probably be a seperate project - e.g moderngl-jupyter. VisPy have (or had?) GL rendering in Notebooks a while ago, via their Gloo library, so if you need it now that may be an option for you. Here's a Jupyter extension I made for cairo to display cairo Surfaces and Contexts, I lean heavily on the PngFormatter so I can just pass through png data to make this work. There is info on writing Jupyter extensions here. |
Thank you @stuaxo for answering the question. I'll close this for now. The issue still be useful in search results in the future. |
I'll also point to Vispys If somebody liked |
Hi
Is moderngl working on Jupyter Notebook or Google Colab, and if so can you please post an example?
Thank you.
The text was updated successfully, but these errors were encountered: