RenderKit / ospray

An Open, Scalable, Portable, Ray Tracing Based Rendering Engine for High-Fidelity Visualization
http://ospray.org
Apache License 2.0
982 stars 178 forks source link

Texture from image #515

Closed GerryArk closed 2 years ago

GerryArk commented 2 years ago

Could we have a few examples on how to make textures from images ?

For example from a png image could be nice

thanks

johguenther commented 2 years ago

You can find example code for how to create textures here: https://github.com/ospray/ospray/blob/master/apps/ospTestSuite/test_appearance.cpp#L113-L126

Or in OSPRay Studio (contains code for loading images using various libraries like STD or OIIO): https://github.com/ospray/ospray_studio/blob/master/sg/texture/Texture2D.cpp