From 5c5e3e7f54620461091214a6b7180bb5d8e7afb9 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 9 May 2023 23:35:28 +0100 Subject: Support for tessellation shaders --- Jamroot.jam | 2 +- glsl.jam | 6 ++++++ ui/applicationBase.cpp | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Jamroot.jam b/Jamroot.jam index 35b48ea..a3ca984 100644 --- a/Jamroot.jam +++ b/Jamroot.jam @@ -57,7 +57,7 @@ explicit main ; run iliketrains : -- : [ sequence.insertion-sort [ glob-tree-ex res : *.* ] ] : : main ; lib ilt : - [ glob-tree *.cpp *.?s : application bin test ] + [ glob-tree *.cpp *.?s *.t?s : application bin test ] [ lib generated : [ glob-tree *.ll *.c ] : . lib diff --git a/glsl.jam b/glsl.jam index 87dee61..eeeb340 100644 --- a/glsl.jam +++ b/glsl.jam @@ -4,10 +4,14 @@ import generators : register-standard ; import scanner : register ; type.register GL_VERTEX_SHADER : vs ; +type.register GL_TESS_CONTROL_SHADER : tcs ; +type.register GL_TESS_EVALUATION_SHADER : tes ; type.register GL_GEOMETRY_SHADER : gs ; type.register GL_FRAGMENT_SHADER : fs ; generators.register-standard glsl.embed : GL_VERTEX_SHADER : CPP(vs-%) H(vs-%) ; +generators.register-standard glsl.embed : GL_TESS_CONTROL_SHADER : CPP(tcs-%) H(tcs-%) ; +generators.register-standard glsl.embed : GL_TESS_EVALUATION_SHADER : CPP(tes-%) H(tes-%) ; generators.register-standard glsl.embed : GL_GEOMETRY_SHADER : CPP(gs-%) H(gs-%) ; generators.register-standard glsl.embed : GL_FRAGMENT_SHADER : CPP(fs-%) H(fs-%) ; @@ -20,6 +24,8 @@ class m4-scanner : common-scanner { scanner.register m4-scanner : include ; type.set-scanner GL_VERTEX_SHADER : m4-scanner ; +type.set-scanner GL_TESS_CONTROL_SHADER : m4-scanner ; +type.set-scanner GL_TESS_EVALUATION_SHADER : m4-scanner ; type.set-scanner GL_GEOMETRY_SHADER : m4-scanner ; type.set-scanner GL_FRAGMENT_SHADER : m4-scanner ; diff --git a/ui/applicationBase.cpp b/ui/applicationBase.cpp index 5278228..32af3af 100644 --- a/ui/applicationBase.cpp +++ b/ui/applicationBase.cpp @@ -22,8 +22,8 @@ ApplicationBase::ApplicationBase() setGlAttribute(SDL_GL_DOUBLEBUFFER, 1); setGlAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE); - setGlAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3); - setGlAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 3); + setGlAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 4); + setGlAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2); setGlAttribute(SDL_GL_SHARE_WITH_CURRENT_CONTEXT, 1); } -- cgit v1.2.3