Skip to main content
GameDev.net gamedev.net
🔒 Locked

rendering portion of an extra/temp framebuffer(FBO)

Started by cebugdev Sep 8, 2018 at 4:04 PM 1 replies 1.2k views
Original Post
cebugdev
cebugdev

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)?

GamerX1221
GamerX1221

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  

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.