Hi all, just a quick question!
OpenGL 3.3+, windows 10.
I have a texture onto which I render stuff and then I display that texture (render a quad) in a user window. The user can resize that window so that texture has to be resized as well.
My question is: Is it bad practice to resize the texture (read: delete and re-create it with new dimensions) every time a size change is detected, or is this usual business in nowaday’s openGL drivers?
Example: Suppose a user drags the window edges to resize the window. This movement might take a second and at that time the program might detect ~= 100 size changes while the mouse drag lasts. That is, the texture gets resized (ie destroyed and recreated) 100 times duting only that resize. Is this silly?
I already can thing of one decent alternative: Just create that texture to be as large as the screen itself from the get go. So instead of resizing just change the coordinates of the visible texture area.
Ultimately, is it worth it to edit all my code to avoid unnecessary texture deleting/re-creating, or is it no biggie in modern PCs?