Drawing images in OpenGL app

  1. I admit this is more of a 'what library should I use question' than a 'Rust question', but the entire app is in Rust and I'm hoping for pointers / guidance on this.

  2. I have a Rust/x86/OpenGL (using glow) app running on Linux. Currently, I am using one vertex shader, one fragment shader, and one texture (for fonts).

  3. I now need to figure out an efficient way to display one off images. These images are always drawn orthographically, not rotated. Think how octave / matlab / iPython would draw an image. That's all what I need.

  4. Currently, the only way I can figure out how to do this is to (1) upload image as a texture, (2) modify shaders to special case dumb-drawing an image, and (3) using the OpenGL pipeline.

  5. Is there a better way to approach this problem? Given that these images are always drawn parallel to the x/y axis, I'm wondering if there is some special case route besides the more general texture approach.


That is the correct one, however I would use a second shader for images.

What are you building? There may be more elegant solutions with most problems solved already.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.