Skip to content

Commit

Permalink
GLSLDefinitions: added option for the client to use gl_PointSize by d…
Browse files Browse the repository at this point in the history
…efining USE_GL_POINT_SIZE
  • Loading branch information
TheMostDiligent committed Nov 7, 2023
1 parent 6b79351 commit abdf2bc
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 12 deletions.
27 changes: 21 additions & 6 deletions Graphics/HLSL2GLSLConverterLib/include/GLSLDefinitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -1111,6 +1111,9 @@ float2x2 MatrixFromRows(float2 row0, float2 row1)
out gl_PerVertex
{
vec4 gl_Position;
#ifdef USE_GL_POINT_SIZE
float gl_PointSize;
#endif
};
#endif

Expand Down Expand Up @@ -1140,14 +1143,18 @@ out gl_PerVertex
in gl_PerVertex
{
vec4 gl_Position;
//float gl_PointSize;
#ifdef USE_GL_POINT_SIZE
float gl_PointSize;
#endif
//float gl_ClipDistance[];
} gl_in[];

out gl_PerVertex
{
vec4 gl_Position;
//float gl_PointSize;
#ifdef USE_GL_POINT_SIZE
float gl_PointSize;
#endif
//float gl_ClipDistance[];
};

Expand All @@ -1166,14 +1173,18 @@ out gl_PerVertex
in gl_PerVertex
{
vec4 gl_Position;
//float gl_PointSize;
#ifdef USE_GL_POINT_SIZE
float gl_PointSize;
#endif
//float gl_ClipDistance[];
} gl_in[gl_MaxPatchVertices];

out gl_PerVertex
{
vec4 gl_Position;
//float gl_PointSize;
#ifdef USE_GL_POINT_SIZE
float gl_PointSize;
#endif
//float gl_ClipDistance[];
} gl_out[];

Expand Down Expand Up @@ -1219,14 +1230,18 @@ void _SetGLTessLevelInner(float InnerLevel)
in gl_PerVertex
{
vec4 gl_Position;
//float gl_PointSize;
#ifdef USE_GL_POINT_SIZE
float gl_PointSize;
#endif
//float gl_ClipDistance[];
} gl_in[gl_MaxPatchVertices];

out gl_PerVertex
{
vec4 gl_Position;
//float gl_PointSize;
#ifdef USE_GL_POINT_SIZE
float gl_PointSize;
#endif
//float gl_ClipDistance[];
};

Expand Down
27 changes: 21 additions & 6 deletions Graphics/HLSL2GLSLConverterLib/include/GLSLDefinitions_inc.h
Original file line number Diff line number Diff line change
Expand Up @@ -1111,6 +1111,9 @@
"out gl_PerVertex\n"
"{\n"
" vec4 gl_Position;\n"
"#ifdef USE_GL_POINT_SIZE\n"
" float gl_PointSize;\n"
"#endif\n"
"};\n"
"#endif\n"
"\n"
Expand Down Expand Up @@ -1140,14 +1143,18 @@
"in gl_PerVertex\n"
"{\n"
" vec4 gl_Position;\n"
" //float gl_PointSize;\n"
"#ifdef USE_GL_POINT_SIZE\n"
" float gl_PointSize;\n"
"#endif\n"
" //float gl_ClipDistance[];\n"
"} gl_in[];\n"
"\n"
"out gl_PerVertex\n"
"{\n"
" vec4 gl_Position;\n"
" //float gl_PointSize;\n"
"#ifdef USE_GL_POINT_SIZE\n"
" float gl_PointSize;\n"
"#endif\n"
" //float gl_ClipDistance[];\n"
"};\n"
"\n"
Expand All @@ -1166,14 +1173,18 @@
"in gl_PerVertex\n"
"{\n"
" vec4 gl_Position;\n"
" //float gl_PointSize;\n"
"#ifdef USE_GL_POINT_SIZE\n"
" float gl_PointSize;\n"
"#endif\n"
" //float gl_ClipDistance[];\n"
"} gl_in[gl_MaxPatchVertices];\n"
"\n"
"out gl_PerVertex\n"
"{\n"
" vec4 gl_Position;\n"
" //float gl_PointSize;\n"
"#ifdef USE_GL_POINT_SIZE\n"
" float gl_PointSize;\n"
"#endif\n"
" //float gl_ClipDistance[];\n"
"} gl_out[];\n"
"\n"
Expand Down Expand Up @@ -1219,14 +1230,18 @@
"in gl_PerVertex\n"
"{\n"
" vec4 gl_Position;\n"
" //float gl_PointSize;\n"
"#ifdef USE_GL_POINT_SIZE\n"
" float gl_PointSize;\n"
"#endif\n"
" //float gl_ClipDistance[];\n"
"} gl_in[gl_MaxPatchVertices];\n"
"\n"
"out gl_PerVertex\n"
"{\n"
" vec4 gl_Position;\n"
" //float gl_PointSize;\n"
"#ifdef USE_GL_POINT_SIZE\n"
" float gl_PointSize;\n"
"#endif\n"
" //float gl_ClipDistance[];\n"
"};\n"
"\n"
Expand Down

0 comments on commit abdf2bc

Please sign in to comment.