summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-05-09 23:35:28 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2023-05-09 23:35:28 +0100
commit5c5e3e7f54620461091214a6b7180bb5d8e7afb9 (patch)
tree7b65c5ce8b8bb577ccc21437d62958e91ea81b3d
parentMerge branch 'containers' (diff)
downloadilt-5c5e3e7f54620461091214a6b7180bb5d8e7afb9.tar.bz2
ilt-5c5e3e7f54620461091214a6b7180bb5d8e7afb9.tar.xz
ilt-5c5e3e7f54620461091214a6b7180bb5d8e7afb9.zip
Support for tessellation shaders
-rw-r--r--Jamroot.jam2
-rw-r--r--glsl.jam6
-rw-r--r--ui/applicationBase.cpp4
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 ] :
<include>.
<include>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);
}