Commit 0b85abd 1 parent 74dfb16 commit 0b85abd Copy full SHA for 0b85abd
File tree 4 files changed +52
-4
lines changed
4 files changed +52
-4
lines changed Original file line number Diff line number Diff line change @@ -6,10 +6,10 @@ cmake_minimum_required(VERSION 3.0)
6
6
cmake_policy (SET CMP0048 NEW)
7
7
8
8
##############################################################################
9
- set (VORPALINE_VERSION_RC FALSE )
9
+ set (VORPALINE_VERSION_RC TRUE )
10
10
set (VORPALINE_VERSION_MAJOR 1)
11
11
set (VORPALINE_VERSION_MINOR 8)
12
- set (VORPALINE_VERSION_PATCH 7 )
12
+ set (VORPALINE_VERSION_PATCH 8 )
13
13
14
14
set (VORPALINE_VERSION_PLAIN ${VORPALINE_VERSION_MAJOR} .${VORPALINE_VERSION_MINOR} .${VORPALINE_VERSION_PATCH} )
15
15
if (VORPALINE_VERSION_RC)
Original file line number Diff line number Diff line change @@ -42,7 +42,11 @@ void main(void) {
42
42
43
43
#if GLUP_PRIMITIVE_DIMENSION == 1
44
44
45
- #ifndef GLUP_NO_GL_CLIPPING
45
+ #ifndef GLUP_NO_GL_CLIPPING
46
+ // For GLUP_THICK_LINES, gl_ClipDistance is computed in
47
+ // geometry shader (and it is an error to write to it
48
+ // both in vertex and geometry shaders).
49
+ #if (GLUP_PRIMITIVE != GLUP_THICK_LINES )
46
50
if (glupIsEnabled (GLUP_CLIPPING )) {
47
51
gl_ClipDistance [0 ] = dot (
48
52
vertex_in , GLUP .world_clip_plane
@@ -51,6 +55,7 @@ void main(void) {
51
55
gl_ClipDistance [0 ] = 0.0 ;
52
56
}
53
57
#endif
58
+ #endif
54
59
55
60
#elif GLUP_PRIMITIVE_DIMENSION == 2
56
61
Original file line number Diff line number Diff line change @@ -1619,7 +1619,11 @@ namespace GLUP {
1619
1619
" \n "
1620
1620
" #if GLUP_PRIMITIVE_DIMENSION==1 \n "
1621
1621
" \n "
1622
- " #ifndef GLUP_NO_GL_CLIPPING \n "
1622
+ " #ifndef GLUP_NO_GL_CLIPPING \n "
1623
+ " // For GLUP_THICK_LINES, gl_ClipDistance is computed in \n "
1624
+ " // geometry shader (and it is an error to write to it \n "
1625
+ " // both in vertex and geometry shaders). \n "
1626
+ " #if (GLUP_PRIMITIVE != GLUP_THICK_LINES) \n "
1623
1627
" if(glupIsEnabled(GLUP_CLIPPING)) { \n "
1624
1628
" gl_ClipDistance[0] = dot( \n "
1625
1629
" vertex_in, GLUP.world_clip_plane \n "
@@ -1628,6 +1632,7 @@ namespace GLUP {
1628
1632
" gl_ClipDistance[0] = 0.0; \n "
1629
1633
" } \n "
1630
1634
" #endif \n "
1635
+ " #endif \n "
1631
1636
" \n "
1632
1637
" #elif GLUP_PRIMITIVE_DIMENSION==2 \n "
1633
1638
" \n "
Original file line number Diff line number Diff line change @@ -1075,6 +1075,44 @@ namespace GEO {
1075
1075
sources_texts[i] = sources[i].text ();
1076
1076
}
1077
1077
1078
+ // If GL_debug is set, save shaders to file
1079
+ // It makes it easier testing and debugging
1080
+ // them with glslangValidator
1081
+ if (CmdLine::get_arg_bool (" gfx:GL_debug" )) {
1082
+ static int index = 0 ;
1083
+ ++index ;
1084
+ std::string filename = String::format (" shader_%03d" ,index );
1085
+ switch (target) {
1086
+ case GL_VERTEX_SHADER:
1087
+ filename += " .vert" ;
1088
+ break ;
1089
+ case GL_TESS_CONTROL_SHADER:
1090
+ filename += " .tesc" ;
1091
+ break ;
1092
+ case GL_TESS_EVALUATION_SHADER:
1093
+ filename += " .tese" ;
1094
+ break ;
1095
+ case GL_GEOMETRY_SHADER:
1096
+ filename += " .geom" ;
1097
+ break ;
1098
+ case GL_FRAGMENT_SHADER:
1099
+ filename += " .frag" ;
1100
+ break ;
1101
+ case GL_COMPUTE_SHADER:
1102
+ filename += " .comp" ;
1103
+ break ;
1104
+ default :
1105
+ filename += " .shader" ;
1106
+ break ;
1107
+ }
1108
+
1109
+ std::ofstream out (filename.c_str ());
1110
+ Logger::out (" GLSLdbg" ) << " Saving shader " << filename << std::endl;
1111
+ for (index_t i=0 ; i<sources_texts.size (); ++i) {
1112
+ out << sources_texts[i];
1113
+ }
1114
+ }
1115
+
1078
1116
return compile_shader (
1079
1117
target, &sources_texts[0 ], index_t (sources_texts.size ())
1080
1118
);
You can’t perform that action at this time.
0 commit comments