Skip to content

Commit

Permalink
Updated shaders to use GLSL version 4.2.0 + extensions rather than 4.…
Browse files Browse the repository at this point in the history
…3.0, allowing us to run on some OpenGL 4.2 implementations such as Mesa on Ivy Bridge integrated graphics. See #212.
  • Loading branch information
azonenberg committed Apr 24, 2021
1 parent c5af685 commit 2afc795
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/glscopeclient/WaveformArea.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -530,10 +530,12 @@ void WaveformArea::on_realize()
!GLEW_EXT_framebuffer_object ||
!GLEW_ARB_vertex_array_object ||
!GLEW_ARB_shader_storage_buffer_object ||
!GLEW_ARB_arrays_of_arrays ||
!GLEW_ARB_compute_shader)
{
string err =
"Your graphics card or driver does not appear to support one or more of the following required extensions:\n"
"* GL_ARB_arrays_of_arrays\n"
"* GL_ARB_compute_shader\n"
"* GL_ARB_shader_storage_buffer_object\n"
"* GL_ARB_vertex_array_object\n"
Expand Down
6 changes: 5 additions & 1 deletion src/glscopeclient/shaders/waveform-compute-head-noint64.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@
@brief Waveform rendering shader for without GL_ARB_gpu_shader_int64 support
*/

#version 430
#version 420
#extension GL_ARB_compute_shader : require
#extension GL_ARB_gpu_shader_int64 : require
#extension GL_ARB_arrays_of_arrays : require
#extension GL_ARB_shader_storage_buffer_object : require

layout(std430, binding=1) buffer waveform_x
{
Expand Down
5 changes: 4 additions & 1 deletion src/glscopeclient/shaders/waveform-compute-head.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,11 @@
@brief Waveform rendering shader for analog waveforms with GL_ARB_gpu_shader_int64 support
*/

#version 450
#version 420
#extension GL_ARB_compute_shader : require
#extension GL_ARB_gpu_shader_int64 : require
#extension GL_ARB_arrays_of_arrays : require
#extension GL_ARB_shader_storage_buffer_object : require

layout(std430, binding=1) buffer waveform_x
{
Expand Down

0 comments on commit 2afc795

Please sign in to comment.