I am following this tutorial to learn about sprite sheets, since I can't find any modern stuff on the topic for some reason:
https://lazyfoo.net/tutorials/OpenGL/19_sprite_sheets/index.phpHere is my problem: further down, at the function called renderSprite(int index), he's using deprecated code, more specifically, calls to the following deprecated functions:
>glEnableClientState( GL_VERTEX_ARRAY );>glEnableClientState( GL_TEXTURE_COORD_ARRAY );>glTexCoordPointer( 2, GL_FLOAT, sizeof(LVertexData2D), (GLvoid*) offsetof( LVertexData2D, texCoord ) );>glVertexPointer( 2, GL_FLOAT, sizeof(LVertexData2D), (GLvoid*) offsetof( LVertexData2D, position ) );>glDisableClientState( GL_TEXTURE_COORD_ARRAY );>glDisableClientState( GL_VERTEX_ARRAY );Looking around online, people suggest using the functions that have replaced them, however since I am clearly a beginner, I can't figure out HOW to replace these functions. Just when I thought I was starting to wrap my head around his tutorial, too. So my request is this: please look at each line in the green text up there, and then look at the rest of his class on that page (it's not very big) so you can tell me how to replace each line with modern OpenGL such that it compiles and draws the way it's supposed to.
If you help me, I will be extremely grateful. This has been a pain in the ass trying to learn efficient use of OpenGL when all the modern tutorials I seem to find only teach you the most basic and inefficient ways to do anything, and don't even mention techniques that are ACTUALLY used in practical settings, such as sprite sheets.