configure.ac: Check for freeglut.

To get an OpenGL core profile context freeglut 2.6 or later is required.

Note that in spite of it's name HAVE_FREEGLUT is only defined if freeglut 2.6
(released in 2009) or later ist found.

Signed-off-by: Fabian Bieler <fabianbieler@fastmail.fm>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
glut_wrapper: Include freeglut.h if available.

The freeglut header only defines the extensions to request an OpenGL core
profile context if freeglut.h (rather than glut.h) is included.

Note that the header is installed to include/GL/freeglut.h on OS X, too.

Signed-off-by: Fabian Bieler <fabianbieler@fastmail.fm>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
glsl/gsraytrace: Use __LINE__ macro to set line numbers in GLSL source strings.

The hardcoded numbers are a few lines off at the moment.
Keeping track of the numbers through further modifications is inconvenient.
The __LINE__ "constant" takes care of this automatically.

v2: (by Kenneth Graunke) Don't specify the source string number
    (caught by Ian Romanick).

Signed-off-by: Fabian Bieler <fabianbieler@fastmail.fm>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
glsl/gsraytrace: Don't create new Buffer objects everytime the window is resized.

Signed-off-by: Fabian Bieler <fabianbieler@fastmail.fm>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
glsl/gsraytrace: Bind transform feedback buffer.

Bind the transform feedback buffer before drawing into it and unbind it
afterwards.

Signed-off-by: Fabian Bieler <fabianbieler@fastmail.fm>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
glsl/gsraytrace: Use core GL3.0 transform feedback

NV_transform_feedback is not supported by mesa.
Use transform feedback from core OpenGL 3.0.

This necessitates binding the transform feedback varyings before linking the
shader.

Signed-off-by: Fabian Bieler <fabianbieler@fastmail.fm>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
glsl/gsraytrace: Use GLSL 1.5 instead of 1.2.

This commit prepares the transition from extension to core geometry shaders.
(Core geometry shaders require GLSL version 1.5 or later.)
This includes using generic vertex attributes instead of built-ins.

Signed-off-by: Fabian Bieler <fabianbieler@fastmail.fm>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
glsl/gsraytrace: Use core geometry shaders.

V2: Don't remove ShaderSupported() test. It sets up some function pointers for
the CompileShader framework.

Signed-off-by: Fabian Bieler <fabianbieler@fastmail.fm>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
glsl/gsraytrace: Switch to core profile.

Signed-off-by: Fabian Bieler <fabianbieler@fastmail.fm>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
geom-outlining-150: Use a vbo.

Use a vbo for vertex data instead of client-side arrays.
Also bind a vertex array object.

This is necessary for the switch to a core profile context.

Signed-off-by: Fabian Bieler <fabianbieler@fastmail.fm>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
geom-outlining-150: Use core geometry shaders.

Signed-off-by: Fabian Bieler <fabianbieler@fastmail.fm>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
geom-outlining-150: Switch to core profile.

Signed-off-by: Fabian Bieler <fabianbieler@fastmail.fm>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>