0

I have Visual Studio Community installed on my pc and it comes with both gl.h and glu.h.

It does not include glew.h or any other library for OpenGL.

Is it possible to use the two headers above without getting other headers (I know this may not be very practical)?

I could not find any tutorials that did not include glew.h (or other headers that needed installing).

Xantium
  • 11,201
  • 10
  • 62
  • 89
  • 1
    It is possible if you use OpenGL 1.1. For a more modern version you need something that retrieves OGL API function pointers, that's what `glew` is for. – Ripi2 Jun 01 '18 at 19:00
  • @Ripi2 Thank you. So basically I need it. – Xantium Jun 01 '18 at 19:03
  • 1
    Or use another similar library. Or code it on your own. – Ripi2 Jun 01 '18 at 19:04
  • 1
    Note: Not such a library is needed for Apple OS. – Ripi2 Jun 01 '18 at 19:20
  • 1
    see [How to render an openGL frame in C++ builder?](https://stackoverflow.com/a/20679773/2521214) it is an example of constructing OpenGL 1.0 context. It is for VCL however so just rewrite the events to your style of programming and use Handle of your window instead of `Form1->Handle`. The other link in there shows you the same+GLEW (you need to download it) usage which loads all the extension available and can be used for the new stuff (GLSL,VAO/VBO examples are included there) Beware the window stuff is OS dependent so Windows use `wgl` functions if you got different OS use different prefix – Spektre Jun 02 '18 at 08:02
  • 1
    @Rabbid76 Why duplicate to that QA? this clearly asks for a different thing (or it is just me?) – Spektre Jun 02 '18 at 08:05

0 Answers0