PySoy: Load RGB Texture
completed by: Matt Habel
mentors: Amaury Medeiros, Arc Riley, Tony Young, David Czech, Mayank Singh
We use Cairo to load PNG and SVG files into soy.textures.Texture, however Cairo uses a strange "BGRA" internal storage format which we need to copy into an OpenGL texture for rendering. This is an ideal use of Orc: a src and dst array, nested loops, and copying individual bytes.
Re-implement the current Genie code for copying RGB texture data from Cairo
into Texture, then replace the current Genie code with a call to this new Orc
function. Your code should go in libsoy/src/textures/Texture.orc
.
There are numerous examples on doing this sort of byte wrangling.
While working on this task you should join and remain in #PySoy on Freenode to get help, feedback, and guidance from mentors and other developers. Code updates which may affect your work are also announced here as they happen.
When you've done, commit your work and post the resulting changeset url to this task.