OpenGL - Changing from immediate mode to vertex buffer objects

I am using OpenGl and SDL and I have reached the point in my life where I find out that immediate mode is deprecated.I have tried reading some tutorials but they aren't helping me at all. I learn from looking at existing code, and I can not find any code on vbos anywhere. Basically, all I want to know if how to change this:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
glEnable( GL_TEXTURE_2D );
		// Bind the texture to which subsequent calls refer to
		glBindTexture( GL_TEXTURE_2D, ret );
glEnable (GL_BLEND); glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

		glBegin( GL_QUADS );
		glColor3f(1.0f,1.0f,1.0f);
			//Bottom-left vertex (corner)
			glTexCoord2d( 0, 0 );
			glVertex3f( 100.f, 100.f, 0.0f );
	
			//Bottom-right vertex (corner)
			glTexCoord2d( 0.5, 0 );
			glVertex3f( 228.f, 100.f, 0.f );
	
			//Top-right vertex (corner)
			glTexCoord2d( 0.5, 1 );
			glVertex3f( 228.f, 228.f, 0.f );
	
			//Top-left vertex (corner)
			glTexCoord2d( 0, 1 );
			glVertex3f( 100.f, 228.f, 0.f );
		glEnd();

Into a vbo instead.
Last edited on
Topic archived. No new replies allowed.