capabilities of opengl

Started by
5 comments, last by V-man 17 years, 8 months ago
Hello, Does opengl have native support for vertex/index buffers? I just got done reading lesson 5 on nehe, and it seems they just submitted coordinants, whereas in direct3d, you have to fill a vertex buffer and then render it. Thanks, exorcist_bob
Advertisement
Vertex buffer objects are avaiable in OpenGL 1.5 and on.
I see. However, I'm stuck programming using opengl 1.1 because I'm using visual c++. How can I bridge this gap?

Thanks,
exorcist_bob
Quote:Original post by exorcist_bob
I see. However, I'm stuck programming using opengl 1.1 because I'm using visual c++. How can I bridge this gap?

Thanks,
exorcist_bob
Read the Forum FAQ.
If it isn't an extension, can I still link it with opengl32.lib. Ex: glVertex3f
Vertex arrays and using indexed arrays to render is part of OpenGL 1.1 and so you won't need any extensions (for some documentation, look up glDrawElements).

However D3D's vertex and index buffers go further than that and allow you a certain degree of control over where in memory (AGP, vRam, etc.) the buffers are stored. To do this in OpenGL you need the Vertex Buffer Objects extension, which adds additional functionality on top of regular vertex arrays.
Quote:Original post by exorcist_bob
If it isn't an extension, can I still link it with opengl32.lib. Ex: glVertex3f


Of course. That's so simple that there is no need to ask.
If you want to work with features that are similar to D3D9, work with GL 1.5 or 2.0
Read
http://www.opengl.org/wiki/index.php/Getting_started

I suggest you use VBOs because you already know the D3D version.
http://www.opengl.org/wiki/index.php/GL_ARB_vertex_buffer_object

and search for some code on Nehe
http://nehe.gamedev.net/lesson.asp?index=09
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

This topic is closed to new replies.

Advertisement