Updating to latest

We have been using openGL for years now and we are looking at possibly updating our code base to the newer libraries. We are using MFC, C++ visual studio 2019. Can anyone possibly give us some guidance on what that process would look like? are the old functions still supported for the most part ect? Thanks in advance for the help!

Nothing has been removed. In terms of libraries, nothing has been added; libopengl32.dll still only exports the OpenGL 1.1 API, requiring the use of wglGetProcAddress to obtain function pointers for any added after that version.

Most of the OpenGL 1.x API is considered deprecated, but it’s still supported (unless you specifically create a core-profile context). All of the mainstream hardware vendors (Nvidia, AMD, Intel) support the compatibility profile, so you can use both legacy and modern features simultaneously.

If you haven’t looked at anything past 1.x, the difference between legacy and modern OpenGL is large enough that you should probably just get a book on modern OpenGL (e.g. the latest edition of the red book, currently the ninth edition) and re-learn it.

we are using version 1.something. Do you feel its a good idea then to update? I’m assuming that their has been a good amount of development into the newer opengl. IE rendering speeds, animation speeds, memory utilizations?

Bear in mind that the OpenGL implementation is in the device driver and the hardware. The DLL is just an interface to that. Updating the library without changing the code won’t achieve anything; any improvements in the hardware or driver will automatically apply to any OpenGL application.

You may be able to get so performance improvement by using features in newer versions of the OpenGL API, but that could require a significant re-write. Whether you’ll get any improvement and how much depends upon exactly what the code is doing.

E.g. if you have mostly static geometry and you’re sending that to the GPU each frame using client-side vertex arrays or glBegin/glEnd, switching to vertex buffer objects (VBOs) keeps the data in video memory which avoids copying. But if you’re using display lists, the driver is probably already keeping that in video memory.

If you’re calculating vertex data in the application, you may be able to offload some or all of those calculations to the GPU by using a vertex shader.