1

there are lots of OpenGL tutorials out there - I think more than 90% of them make use of glBegin()/glEnd() with vertices set between these two calls. Now I found some people telling me these functions are deprecated and no longer available in newer versions of OpenGL.

So: is this correct?

In my application I have to be compatible with OpenGL 2.1.

genpfault
  • 51,148
  • 11
  • 85
  • 139
Elmi
  • 5,899
  • 15
  • 72
  • 143

2 Answers2

3

Yes, glBegin()/glEnd() methods are deprecated. glDrawArrays is a modern approach and it is available in OpenGL 2.1. Here is related question on SO.

Also, I doubt about this 90% value.

Community
  • 1
  • 1
Ramil Kudashev
  • 1,166
  • 3
  • 15
  • 19
0

The answer is yes and no. The spirit of OpenGL 2 and more is to no longer use immediate mode and fixed pipeline. From OpenGL 3, these are "deprecated". But fortunately at the same time was recognize "Legacy OpenGL" And ARB compatibility extension. So you do can use still use them (modulo some variations between OS about what is inside or not).

Fabrice NEYRET
  • 644
  • 4
  • 16