Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: OpenGL 4.2  (Read 3543 times)

0 Members and 2 Guests are viewing this topic.

i514x

  • Newbie
  • *
  • Posts: 15
    • View Profile
OpenGL 4.2
« on: July 31, 2012, 12:50:50 pm »
Hello all,

What should I do for my program(game) to use OpenGL 4.2? I've been searching on google for some time now and I can't figure it out. I am trying to follow these tutorials: http://www.opengl-tutorial.org/ but instead of using GLFW I am going to use SFML because I am more familiar with it and it seems easier and more powerful. I found some info about gl3.h file so I included it but I get linker errors about some missing .lib file which I cannot find at all. If anyone has got any information what so ever then please reply with something because I don't want to use deprecated OpenGL 1.1 functions.

@Edit: I also tried using glew because I read that I can use newest OpenGL with it but it crashes if using non-1.1-version functions when launching the application with it.

regards, i514x

CrazyBillyO

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: OpenGL 4.2
« Reply #1 on: July 31, 2012, 02:27:58 pm »
I've been using GLEW, OpenGL 4.2, and SFML 2 on  Ubuntu 12.04 with an nVidia card for a few months now and I've noticed few, if any, issues.  It should be possible.

What OS and video card do you use?  You may want to check to make sure that you're using up-to-date drivers.  It sounds like you may be defaulting to old 1.1 libraries (such as MESA on Linux, or a default 1.1  Windows DLL).

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11029
    • View Profile
    • development blog
    • Email
Re: OpenGL 4.2
« Reply #2 on: July 31, 2012, 03:03:51 pm »
Keep in mind SFML can't really be compaired with GLEW or GLFW since SFML is not an OpenGL wrapper, but a multimedia library that makes use of some OpenGL functionalities.
Additionally SFML is using GLEW internally.

Do you have any reason to use OpenGL 4.2 or do you just want to use it because it's the latest? The majority of graphic cards in use do not fully support OpenGL 4.2 features... ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

i514x

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: OpenGL 4.2
« Reply #3 on: July 31, 2012, 04:10:55 pm »
Yea I want to use it because it is the latest. I've updated my drivers few months ago and checked just now if I am up to date and I am.

If OpenGL is not fully supported by today's graphics card then what version should I use because I've read that for example glBegin(...) ... glEnd() is slower than using those 1 call functions with supplying the array as parameter.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: OpenGL 4.2
« Reply #4 on: July 31, 2012, 04:25:19 pm »
Quote
SFML is not an OpenGL wrapper
sfml-window is an OpenGL wrapper, if "wrapper" means to provide OpenGL contexts and windows. It is similar to SDL, GLUT, GLFW, etc. But not GLEW, which is an extension loader.
Laurent Gomila - SFML developer

kurasu1415

  • Newbie
  • *
  • Posts: 37
    • View Profile
    • Email
Re: OpenGL 4.2
« Reply #5 on: July 31, 2012, 04:37:19 pm »
I would recommend going with a OpenGL 3.2 context. Cards all the way back to the Geforce 800 series in 2005 can support this and it definitely covers the majority. GLBegin()/GLEnd() is what is known as the Fixed-Function Pipeline, and is quite old as well as inefficient. What you will be doing is using Shaders to render all of your graphics, which is known as the Programmable Pipeline. It is a little weird at first, but Shaders are extremely powerful, and much faster than our old rendering ways. Start doing some research on using GLSL (GL Shader Language). It is the language you will use to write your shaders. Take time to look over the language and really understand it. You can use GLSL to do basic drawing, particle effects, and anything crazy you want to do with your rendering. A good tutorial for an introduction is here : http://nehe.gamedev.net/article/glsl_an_introduction/25007/

There are some books about it, but in all honesty they are overcomplicated for someone new to the world of shaders. Have fun, good luck, and feel free to PM me if you have any questions. :)

i514x

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: OpenGL 4.2
« Reply #6 on: July 31, 2012, 06:04:41 pm »
Thanks for the info guys, how would I go with OpenGL 3.2 karusu?

 

anything