Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17825

OpenGL partial rendering of item for GUI

$
0
0
Hi again, thanks to the good advise from the guys on this thread https://www.gamedev.net/forums/topic/692174-opengl-2d-gui-system-question/?tab=comments#comment-5356606 thanks guys! I have my basic 2D GUI working now, buttons, windows/dialogs and sliders are working, now i want to port my scrollbox, listview controls to OpenGL, unfortunately i dont have an idea on how 'clipping' a rendered object works, in 2D canvas such as in 2D SDL or javascript canvas, what i did is for example on listview/listbox control, i draw all items in an offscreen canvas, and just Blit copy the visible area to screen based on the amount it was scrolled. Since i dont think OpenGL has the BlitBlk style of partial rendering a texture/canvas, how should i approach implementing a control such as listview control? Background, i want a 2D GUI control where there will be items inside (like a listview) that hides/clip when scrolled based on scroll value, any tips on how to do this on OpenGL?

Viewing all articles
Browse latest Browse all 17825

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>