rendering portion of an extra/temp framebuffer(FBO)

Started by
1 comment, last by GamerX1221 5 years, 7 months ago

hi all,

i am trying to implement a textbox with scroll where you can display as many text as you can and just use the scroll bar to see the rest of the image, same as to how listbox works, etc

I have implemented this using 2D SDL by displaying the messages in an extra framebuffer/texture and just bitBlk the portion of it to the main screen depending on offset.

I am porting my 2D SDL code to straight OpenGL ES 2.0 by creating extra framebuffer(FBO) and render to texture, now my question is how to select a portion of that texture to be rendered only in OpenGL ES 2.0 (more like how is bitblk can be implemented in OpenGL ES 2.0)?

 I was thinking to using scissors but im not sure if this is the right solution.
Also, I am using OpenGL ES 2.0 (Mobile) so not all libraries from desktop OpenGL is available.

In Summary

1. How to do bitblk in OpenGL ES.0 for textures rendered in orthographic projection (2D)?

Advertisement

I think you can just use texture coordinates and multiple quads or quad instancing, and pass per instance data per quad or something along those lines.

try scissoring 1st as it might be a better choice for the mobile GPU.

Navjot S. Sandhu

CEO, CTO, Software Engineer Bs.C

Master of Engineering in Tech. Innovation Mgmt.

Master of Computer Science in HCI

This topic is closed to new replies.

Advertisement