How to enable OpenGL 3.3 using Mesa 10.1 on Ubuntu

前端 未结 2 1478
别跟我提以往
别跟我提以往 2020-12-03 12:29

I am trying to get an OpenGL-based rendering engine that relies on OpenGL 3.3 and GLSL 3.3 to run on Ubuntu 13.10 using an AMD Radeon 6950. I want to use the open source dri

2条回答
  •  情话喂你
    2020-12-03 13:09

    I answered the thread OP mentions regarding "OpenGL & GLSL 3.3 on an HD Graphics 4000 under Ubuntu 12.04" but I thought I would give the same answer here too considering info seems so scarce. This works for those using freeglut and glew:

    so Ive seen a lot of threads surrounding this and I thought here would be a good place to respond. Im running Ubuntu 15.04 with intel ivybridge. After using the "Intel Graphics installer for linux" application, glxinfo gives the following info regarding openGl:

    OpenGL core profile version string: 3.3 (Core Profile) Mesa 10.6.0
    OpenGL core profile shading language version string: 3.30
    OpenGL version string: 3.0 Mesa 10.6.0
    OpenGL shading language version string: 1.30
    

    Now from this you can see that the core profile and glsl version are 3.3,but compatible openGl is only 3.0 thus if you want your code to run with 3.3 you need to specify both an opengl core profile and a glsl core profile. The following steps should work if youre using freeglut and glew:

    -the glsl #version should specify that you want the core profile:

    #version 330 core

    -specify you want opengl 3.3:

    glutInitContextVersion (3, 3);

    -and finally set glewExperimental to true before glewInit():

    glewExperimental = GL_TRUE;

    hope this helps some people get started :)

提交回复
热议问题