opentk / LearnOpenTK

A port of learnopengl.com's tutorials to OpenTK and C#.
Creative Commons Attribution 4.0 International
463 stars 115 forks source link

Confusing openTK implement openGL version 2,3,4 #65

Closed MauNguyenVan closed 2 years ago

MauNguyenVan commented 2 years ago

Hi.

I'm quite confusing about openTK name space "OpenTK.Graphics.OpenGL", and "OpenTK.Graphics.OpenGL4".

Does OpenTk only implement OpenGL2 and OpenGL4, where is openGL3 I read on Lean openTK site. It used openTK 3 but I can not see any code implement openGL 3 in opentk project.
Only 2 folder/ namespce for openGL2 and openGL4 (image bellow).

Help me resolve. Thanks
image

aquagoose commented 2 years ago

The OpenGL namespace is primarily for the older FFP. You'll want to use the OpenGL4 namespace for all modern OpenGL (including version 3)

NogginBops commented 2 years ago

The names of the namespaces are a bit confusing. With Graphics.OpenGL you get all opengl that have existed, even deprecated ones. With Graphics.OpenGL4 you get only the "modern features", which doesn't include the functions that where deprecated in Open GL 3.1/3.2.

If you are targeting any version newer or equal to 3.1 or 3.2 use Graphics.OpenGL4.

MauNguyenVan commented 2 years ago

Oh. that's it. I understand.
Thanks a lot