![]() |
|
OpenGL - GPU based rendering (GLList) - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3) +---- Forum: Programs (https://qb64phoenix.com/forum/forumdisplay.php?fid=7) +---- Thread: OpenGL - GPU based rendering (GLList) (/showthread.php?tid=4009) |
OpenGL - GPU based rendering (GLList) - Unseen Machine - 10-19-2025 Yo gang... From MasterGy's question in another thread GPU based rendering is now a thing im really looking into/learning about but still no working (modern GL) versions to show yet! In the meantime...though very old and considered outdated GLLists does work! Using it for animated models is not suggested but for anything static in your game, i.e, terrain, sky sphere/boxes, trees, rocks, etc...it's really useful The main joy is you can make lists that call lists! This way rather than have separate lists for a skysphere and terrain, you can have ONE for the whole world! You can then easily extended this to adding trees, buildings, etc... The second joy is you can also easily combine the loading of assets and list creation into one function... Base Function : Code: (Select All)
You will off course need to change the function name for each thing you want to make as a list in your program, remember to change the return value at the end of the function to match! DEMO : in my dev program this modded version of that function returns a handle (as _unsigned long) for a world (sky and terrain) Code: (Select All)
to create it : World~& = GDK_GL_Make_World_List~& '// Sky and terrain are created once and stored as a single list to render it : _GLCALLLIST World~& '// Draw the terrain and the sky As you'll see it calls two other variants of the MAke_List function for the terrain and sphere...(as i said, lists inside lists!) Anyway, hope you guys find it useful or at least informative. Unseen |