Commit bd900e47 authored by Simon Boyé's avatar Simon Boyé

Vitelotte: Removed remaining warnings by updating the way shaders.hpp are generated.

parent f40c34b7
......@@ -13,7 +13,7 @@
#include "../../common/gl_utils/shader.h"
#include "../Core/femUtils.h"
#include "shaders.hpp"
#include "vgMeshGL2RendererShaders.hpp"
namespace Vitelotte {
......
......@@ -36,9 +36,9 @@ VGMeshRendererGL2DefaultShader::useShader(TriangleType triangleType)
bool bRes = true;
bRes &= m_shader.addShader(GL_VERTEX_SHADER,
shader::vert_common_gl2_glsl);
VGMeshGL2RendererShaders::vert_common_glsl);
bRes &= m_shader.addShader(GL_FRAGMENT_SHADER,
shader::frag_quadratic_gl2_glsl);
VGMeshGL2RendererShaders::frag_quadratic_glsl);
bRes &= m_shader.finalize();
......@@ -131,9 +131,9 @@ VGMeshRendererGL2WireframeShader::useShader(TriangleType /*triangleType*/)
bool bRes = true;
bRes &= m_shader.addShader(GL_VERTEX_SHADER,
shader::vert_common_gl2_glsl);
VGMeshGL2RendererShaders::vert_common_glsl);
bRes &= m_shader.addShader(GL_FRAGMENT_SHADER,
shader::frag_wireframe_gl2_glsl);
VGMeshGL2RendererShaders::frag_wireframe_glsl);
bRes &= m_shader.finalize();
......
/*
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
// Generated by shader2cpp.
// 2015-01-16T11:06:00.318339
#ifndef _VITELOTTE_UTILS_VG_MESH_GL2_RENDERER_SHADERS_
#define _VITELOTTE_UTILS_VG_MESH_GL2_RENDERER_SHADERS_
namespace Vitelotte
{
namespace VGMeshGL2RendererShaders
{
static const char* frag_common_glsl =
"/*\n"
" This Source Code Form is subject to the terms of the Mozilla Public\n"
" License, v. 2.0. If a copy of the MPL was not distributed with this\n"
" file, You can obtain one at http://mozilla.org/MPL/2.0/.\n"
"*/\n"
"\n"
"#version 410 core\n"
"\n"
"uniform float zoom;\n"
"uniform float pointRadius;\n"
"uniform float halfLineWidth;\n"
"uniform bool showWireframe;\n"
"uniform vec4 wireframeColor;\n"
"uniform vec4 pointColor;\n"
"\n"
"in vec3 linearBasis;\n"
"in vec2 position;\n"
"flat in vec2 vertices[3];\n"
"flat in vec2 normEdges[3];\n"
"\n"
"int minIndex(in vec3 dist)\n"
"{\n"
" int minIdx = (dist[1] < dist[0])? 1: 0;\n"
" if(dist[2] < dist[minIdx])\n"
" minIdx = 2;\n"
"\n"
" return minIdx;\n"
"}\n"
"\n"
"vec3 computeVertexSqrDist()\n"
"{\n"
" return vec3(\n"
" dot(position - vertices[0], position - vertices[0]),\n"
" dot(position - vertices[1], position - vertices[1]),\n"
" dot(position - vertices[2], position - vertices[2]));\n"
"}\n"
"\n"
"vec3 computeEdgeDist()\n"
"{\n"
" return vec3(\n"
" determinant(mat2(normEdges[0], position - vertices[1])),\n"
" determinant(mat2(normEdges[1], position - vertices[2])),\n"
" determinant(mat2(normEdges[2], position - vertices[0])));\n"
"}\n"
"\n"
"float irlerp(in vec2 vx, in vec2 v1, in vec2 v2)\n"
"{\n"
" float alpha = acos(clamp(dot(v1, vx), -1., 1.));\n"
" float beta = acos(clamp(dot(v1, v2), -1., 1.));\n"
" return alpha / beta;\n"
"}\n"
"\n"
"vec4 quadraticInterp(in vec4 colors[6])\n"
"{\n"
" return\n"
" colors[0] * linearBasis.x * (2. * linearBasis.x - 1.) +\n"
" colors[1] * linearBasis.y * (2. * linearBasis.y - 1.) +\n"
" colors[2] * linearBasis.z * (2. * linearBasis.z - 1.) +\n"
" colors[3] * 4. * linearBasis.y * linearBasis.z +\n"
" colors[4] * 4. * linearBasis.z * linearBasis.x +\n"
" colors[5] * 4. * linearBasis.x * linearBasis.y;\n"
"}\n"
"\n"
"float interpFactor(float dist, float radius)\n"
"{\n"
" return clamp(.5 + radius - dist*zoom, 0, 1);\n"
"}\n"
"\n"
"vec4 colorWithBordersAndPoints(in vec4 colorNodes[6])\n"
"{\n"
" vec3 vertexSqrDist = computeVertexSqrDist();\n"
" int closestVx = minIndex(vertexSqrDist);\n"
"\n"
" vec3 edgeDist = computeEdgeDist();\n"
" int closestEdge = minIndex(edgeDist);\n"
"\n"
" vec4 color = quadraticInterp(colorNodes);\n"
"\n"
" if(showWireframe)\n"
" {\n"
" color = mix(color, wireframeColor,\n"
" interpFactor(edgeDist[closestEdge], halfLineWidth));\n"
"// color = mix(color, colorNodes[closestEdge + 3]*.5,\n"
"// interpFactor(edgeDist[closestEdge], halfLineWidth));\n"
" color = mix(color, pointColor,\n"
" interpFactor(sqrt(vertexSqrDist[closestVx]), pointRadius));\n"
"// color = mix(color, colorNodes[closestVx],\n"
"// interpFactor(sqrt(vertexSqrDist[closestVx]), pointRadius));\n"
" }\n"
"\n"
" return color;\n"
"}\n"
"";
static const char* frag_quadratic_glsl =
"/*\n"
" This Source Code Form is subject to the terms of the Mozilla Public\n"
" License, v. 2.0. If a copy of the MPL was not distributed with this\n"
" file, You can obtain one at http://mozilla.org/MPL/2.0/.\n"
"*/\n"
"\n"
"uniform sampler2D nodes;\n"
"uniform int baseNodeIndex;\n"
"uniform bool singularTriangles;\n"
"uniform int nodesTextureSize;\n"
"\n"
"varying highp vec2 position;\n"
"varying highp vec3 basis;\n"
"varying highp vec4 edges;\n"
"varying mediump vec2 baseNodeCoord;\n"
"\n"
"\n"
"highp float irlerp(in highp vec2 vx, in highp vec2 v1, in highp vec2 v2)\n"
"{\n"
" highp float alpha = acos(clamp(dot(v1, vx), -1., 1.));\n"
" highp float beta = acos(clamp(dot(v1, v2), -1., 1.));\n"
" return alpha / beta;\n"
"}\n"
"\n"
"lowp vec4 quadraticInterp(in lowp vec4 colors[6])\n"
"{\n"
" return\n"
" colors[0] * basis.x * (2. * basis.x - 1.) +\n"
" colors[1] * basis.y * (2. * basis.y - 1.) +\n"
" colors[2] * basis.z * (2. * basis.z - 1.) +\n"
" colors[3] * 4. * basis.y * basis.z +\n"
" colors[4] * 4. * basis.z * basis.x +\n"
" colors[5] * 4. * basis.x * basis.y;\n"
"}\n"
"\n"
"void main(void)\n"
"{\n"
" mediump float nodeAdvance = 1. / float(nodesTextureSize);\n"
" lowp vec4 colorNodes[6];\n"
" colorNodes[0] = texture2D(nodes, baseNodeCoord + vec2(0. * nodeAdvance, 0.));\n"
" colorNodes[1] = texture2D(nodes, baseNodeCoord + vec2(1. * nodeAdvance, 0.));\n"
" colorNodes[2] = texture2D(nodes, baseNodeCoord + vec2(2. * nodeAdvance, 0.));\n"
" colorNodes[3] = texture2D(nodes, baseNodeCoord + vec2(3. * nodeAdvance, 0.));\n"
" colorNodes[4] = texture2D(nodes, baseNodeCoord + vec2(4. * nodeAdvance, 0.));\n"
" colorNodes[5] = texture2D(nodes, baseNodeCoord + vec2(5. * nodeAdvance, 0.));\n"
"\n"
" if(singularTriangles)\n"
" {\n"
" highp vec2 p1 = edges.xy;\n"
" highp vec2 p2 = edges.zw + p1;\n"
" highp vec2 pos = basis[1] * p1 + basis[2] * p2;\n"
" colorNodes[0] = mix(colorNodes[0],\n"
" texture2D(nodes, baseNodeCoord + vec2(6. * nodeAdvance, 0.)),\n"
" irlerp(normalize(pos), normalize(p1), normalize(p2)));\n"
" }\n"
"\n"
" gl_FragColor = quadraticInterp(colorNodes);\n"
"}\n"
"";
static const char* frag_wireframe_glsl =
"/*\n"
" This Source Code Form is subject to the terms of the Mozilla Public\n"
" License, v. 2.0. If a copy of the MPL was not distributed with this\n"
" file, You can obtain one at http://mozilla.org/MPL/2.0/.\n"
"*/\n"
"\n"
"uniform highp float lineWidth;\n"
"uniform lowp vec4 wireframeColor;\n"
"uniform highp float zoom;\n"
"\n"
"varying highp vec2 position;\n"
"varying highp vec3 basis;\n"
"varying highp vec4 edges;\n"
"\n"
"\n"
"highp float interpFactor(highp float dist, highp float radius)\n"
"{\n"
" return clamp(.5 + radius - dist*zoom, 0., 1.);\n"
"}\n"
"\n"
"void main(void)\n"
"{\n"
" highp vec2 v0 = edges.xy;\n"
" highp vec2 v1 = edges.zw;\n"
" highp vec2 v2 = -(v0 + v1);\n"
"\n"
" highp float _2area = v0.x * v1.y - v0.y * v1.x;\n"
" highp vec3 edgeDist = basis * _2area / vec3(length(v0), length(v1), length(v2));\n"
"\n"
" highp float dist = 0.;\n"
" if(edgeDist.x < edgeDist.y && edgeDist.x < edgeDist.z)\n"
" dist = edgeDist.x;\n"
" else if(edgeDist.y < edgeDist.x && edgeDist.y < edgeDist.z)\n"
" dist = edgeDist.y;\n"
" else //if(edgeDist.z < edgeDist.x && edgeDist.z < edgeDist.y)\n"
" dist = edgeDist.z;\n"
"\n"
" highp float intensity = interpFactor(dist, lineWidth/2.);\n"
" if(intensity < 0.001)\n"
" discard;\n"
"\n"
" gl_FragColor = vec4(wireframeColor.rgb, wireframeColor.a * intensity);\n"
"}\n"
"";
static const char* vert_common_glsl =
"/*\n"
" This Source Code Form is subject to the terms of the Mozilla Public\n"
" License, v. 2.0. If a copy of the MPL was not distributed with this\n"
" file, You can obtain one at http://mozilla.org/MPL/2.0/.\n"
"*/\n"
"\n"
"uniform mat4 viewMatrix;\n"
"\n"
"attribute highp vec4 vx_position;\n"
"attribute highp vec3 vx_basis;\n"
"attribute highp vec4 vx_edges;\n"
"attribute mediump vec2 vx_baseNodeCoord;\n"
"\n"
"varying highp vec3 basis;\n"
"varying highp vec4 edges;\n"
"varying mediump vec2 baseNodeCoord;\n"
"\n"
"void main(void)\n"
"{\n"
" gl_Position = viewMatrix * vx_position;\n"
" basis = vx_basis;\n"
" edges = vx_edges;\n"
" baseNodeCoord = vx_baseNodeCoord;\n"
"}\n"
"";
}
}
#endif
......@@ -14,7 +14,7 @@
#include "../../common/gl_utils/color.h"
#include "../Core/femUtils.h"
#include "shaders.hpp"
#include "vgMeshRendererShaders.hpp"
namespace Vitelotte {
......
......@@ -48,15 +48,15 @@ VGMeshRendererDefaultShader::useShader(TriangleType triangleType)
bool bRes = true;
bRes &= shader.addShader(GL_VERTEX_SHADER,
shader::vert_common_glsl);
VGMeshRendererShaders::vert_common_glsl);
bRes &= shader.addShader(GL_GEOMETRY_SHADER,
shader::geom_common_glsl);
VGMeshRendererShaders::geom_common_glsl);
bRes &= shader.addShader(GL_FRAGMENT_SHADER,
shader::frag_common_glsl);
VGMeshRendererShaders::frag_common_glsl);
bRes &= shader.addShader(GL_FRAGMENT_SHADER,
quadratic?
shader::frag_quadratic_glsl:
shader::frag_linear_glsl);
VGMeshRendererShaders::frag_quadratic_glsl:
VGMeshRendererShaders::frag_linear_glsl);
bRes &= shader.finalize();
......@@ -158,13 +158,13 @@ VGMeshRendererWireframeShader::useShader(TriangleType /*triangleType*/)
bool bRes = true;
bRes &= m_shader.addShader(GL_VERTEX_SHADER,
shader::vert_common_glsl);
VGMeshRendererShaders::vert_common_glsl);
bRes &= m_shader.addShader(GL_GEOMETRY_SHADER,
shader::geom_common_glsl);
VGMeshRendererShaders::geom_common_glsl);
bRes &= m_shader.addShader(GL_FRAGMENT_SHADER,
shader::frag_common_glsl);
VGMeshRendererShaders::frag_common_glsl);
bRes &= m_shader.addShader(GL_FRAGMENT_SHADER,
shader::frag_wireframe_glsl);
VGMeshRendererShaders::frag_wireframe_glsl);
bRes &= m_shader.finalize();
......
......@@ -4,113 +4,18 @@
file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
// Generated by shader2cpp.
// 2015-01-14T14:57:30.576014
// 2015-01-16T11:06:00.288593
#ifndef PATATE_VITELOTTE_UTILS_SHADER_H
#define PATATE_VITELOTTE_UTILS_SHADER_H
#ifndef _VITELOTTE_UTILS_VG_MESH_RENDERER_SHADERS_
#define _VITELOTTE_UTILS_VG_MESH_RENDERER_SHADERS_
namespace Vitelotte
{
namespace shader
namespace VGMeshRendererShaders
{
static const char* frag_common_gl2_glsl =
"/*\n"
" This Source Code Form is subject to the terms of the Mozilla Public\n"
" License, v. 2.0. If a copy of the MPL was not distributed with this\n"
" file, You can obtain one at http://mozilla.org/MPL/2.0/.\n"
"*/\n"
"\n"
"#version 410 core\n"
"\n"
"uniform float zoom;\n"
"uniform float pointRadius;\n"
"uniform float halfLineWidth;\n"
"uniform bool showWireframe;\n"
"uniform vec4 wireframeColor;\n"
"uniform vec4 pointColor;\n"
"\n"
"in vec3 linearBasis;\n"
"in vec2 position;\n"
"flat in vec2 vertices[3];\n"
"flat in vec2 normEdges[3];\n"
"\n"
"int minIndex(in vec3 dist)\n"
"{\n"
" int minIdx = (dist[1] < dist[0])? 1: 0;\n"
" if(dist[2] < dist[minIdx])\n"
" minIdx = 2;\n"
"\n"
" return minIdx;\n"
"}\n"
"\n"
"vec3 computeVertexSqrDist()\n"
"{\n"
" return vec3(\n"
" dot(position - vertices[0], position - vertices[0]),\n"
" dot(position - vertices[1], position - vertices[1]),\n"
" dot(position - vertices[2], position - vertices[2]));\n"
"}\n"
"\n"
"vec3 computeEdgeDist()\n"
"{\n"
" return vec3(\n"
" determinant(mat2(normEdges[0], position - vertices[1])),\n"
" determinant(mat2(normEdges[1], position - vertices[2])),\n"
" determinant(mat2(normEdges[2], position - vertices[0])));\n"
"}\n"
"\n"
"float irlerp(in vec2 vx, in vec2 v1, in vec2 v2)\n"
"{\n"
" float alpha = acos(clamp(dot(v1, vx), -1., 1.));\n"
" float beta = acos(clamp(dot(v1, v2), -1., 1.));\n"
" return alpha / beta;\n"
"}\n"
"\n"
"vec4 quadraticInterp(in vec4 colors[6])\n"
"{\n"
" return\n"
" colors[0] * linearBasis.x * (2. * linearBasis.x - 1.) +\n"
" colors[1] * linearBasis.y * (2. * linearBasis.y - 1.) +\n"
" colors[2] * linearBasis.z * (2. * linearBasis.z - 1.) +\n"
" colors[3] * 4. * linearBasis.y * linearBasis.z +\n"
" colors[4] * 4. * linearBasis.z * linearBasis.x +\n"
" colors[5] * 4. * linearBasis.x * linearBasis.y;\n"
"}\n"
"\n"
"float interpFactor(float dist, float radius)\n"
"{\n"
" return clamp(.5 + radius - dist*zoom, 0, 1);\n"
"}\n"
"\n"
"vec4 colorWithBordersAndPoints(in vec4 colorNodes[6])\n"
"{\n"
" vec3 vertexSqrDist = computeVertexSqrDist();\n"
" int closestVx = minIndex(vertexSqrDist);\n"
"\n"
" vec3 edgeDist = computeEdgeDist();\n"
" int closestEdge = minIndex(edgeDist);\n"
"\n"
" vec4 color = quadraticInterp(colorNodes);\n"
"\n"
" if(showWireframe)\n"
" {\n"
" color = mix(color, wireframeColor,\n"
" interpFactor(edgeDist[closestEdge], halfLineWidth));\n"
"// color = mix(color, colorNodes[closestEdge + 3]*.5,\n"
"// interpFactor(edgeDist[closestEdge], halfLineWidth));\n"
" color = mix(color, pointColor,\n"
" interpFactor(sqrt(vertexSqrDist[closestVx]), pointRadius));\n"
"// color = mix(color, colorNodes[closestVx],\n"
"// interpFactor(sqrt(vertexSqrDist[closestVx]), pointRadius));\n"
" }\n"
"\n"
" return color;\n"
"}\n"
"";
static const char* frag_common_glsl =
"/*\n"
" This Source Code Form is subject to the terms of the Mozilla Public\n"
......@@ -259,67 +164,6 @@ static const char* frag_linear_glsl =
"}\n"
"";
static const char* frag_quadratic_gl2_glsl =
"/*\n"
" This Source Code Form is subject to the terms of the Mozilla Public\n"
" License, v. 2.0. If a copy of the MPL was not distributed with this\n"
" file, You can obtain one at http://mozilla.org/MPL/2.0/.\n"
"*/\n"
"\n"
"uniform sampler2D nodes;\n"
"uniform int baseNodeIndex;\n"
"uniform bool singularTriangles;\n"
"uniform int nodesTextureSize;\n"
"\n"
"varying highp vec2 position;\n"
"varying highp vec3 basis;\n"
"varying highp vec4 edges;\n"
"varying mediump vec2 baseNodeCoord;\n"
"\n"
"\n"
"highp float irlerp(in highp vec2 vx, in highp vec2 v1, in highp vec2 v2)\n"
"{\n"
" highp float alpha = acos(clamp(dot(v1, vx), -1., 1.));\n"
" highp float beta = acos(clamp(dot(v1, v2), -1., 1.));\n"
" return alpha / beta;\n"
"}\n"
"\n"
"lowp vec4 quadraticInterp(in lowp vec4 colors[6])\n"
"{\n"
" return\n"
" colors[0] * basis.x * (2. * basis.x - 1.) +\n"
" colors[1] * basis.y * (2. * basis.y - 1.) +\n"
" colors[2] * basis.z * (2. * basis.z - 1.) +\n"
" colors[3] * 4. * basis.y * basis.z +\n"
" colors[4] * 4. * basis.z * basis.x +\n"
" colors[5] * 4. * basis.x * basis.y;\n"
"}\n"
"\n"
"void main(void)\n"
"{\n"
" mediump float nodeAdvance = 1. / float(nodesTextureSize);\n"
" lowp vec4 colorNodes[6];\n"
" colorNodes[0] = texture2D(nodes, baseNodeCoord + vec2(0. * nodeAdvance, 0.));\n"
" colorNodes[1] = texture2D(nodes, baseNodeCoord + vec2(1. * nodeAdvance, 0.));\n"
" colorNodes[2] = texture2D(nodes, baseNodeCoord + vec2(2. * nodeAdvance, 0.));\n"
" colorNodes[3] = texture2D(nodes, baseNodeCoord + vec2(3. * nodeAdvance, 0.));\n"
" colorNodes[4] = texture2D(nodes, baseNodeCoord + vec2(4. * nodeAdvance, 0.));\n"
" colorNodes[5] = texture2D(nodes, baseNodeCoord + vec2(5. * nodeAdvance, 0.));\n"
"\n"
" if(singularTriangles)\n"
" {\n"
" highp vec2 p1 = edges.xy;\n"
" highp vec2 p2 = edges.zw + p1;\n"
" highp vec2 pos = basis[1] * p1 + basis[2] * p2;\n"
" colorNodes[0] = mix(colorNodes[0],\n"
" texture2D(nodes, baseNodeCoord + vec2(6. * nodeAdvance, 0.)),\n"
" irlerp(normalize(pos), normalize(p1), normalize(p2)));\n"
" }\n"
"\n"
" gl_FragColor = quadraticInterp(colorNodes);\n"
"}\n"
"";
static const char* frag_quadratic_glsl =
"/*\n"
" This Source Code Form is subject to the terms of the Mozilla Public\n"
......@@ -369,52 +213,6 @@ static const char* frag_quadratic_glsl =
"}\n"
"";
static const char* frag_wireframe_gl2_glsl =
"/*\n"
" This Source Code Form is subject to the terms of the Mozilla Public\n"
" License, v. 2.0. If a copy of the MPL was not distributed with this\n"
" file, You can obtain one at http://mozilla.org/MPL/2.0/.\n"
"*/\n"
"\n"
"uniform highp float lineWidth;\n"
"uniform lowp vec4 wireframeColor;\n"
"uniform highp float zoom;\n"
"\n"
"varying highp vec2 position;\n"
"varying highp vec3 basis;\n"
"varying highp vec4 edges;\n"
"\n"
"\n"
"highp float interpFactor(highp float dist, highp float radius)\n"
"{\n"
" return clamp(.5 + radius - dist*zoom, 0., 1.);\n"
"}\n"
"\n"
"void main(void)\n"
"{\n"
" highp vec2 v0 = edges.xy;\n"
" highp vec2 v1 = edges.zw;\n"
" highp vec2 v2 = -(v0 + v1);\n"
"\n"
" highp float _2area = v0.x * v1.y - v0.y * v1.x;\n"
" highp vec3 edgeDist = basis * _2area / vec3(length(v0), length(v1), length(v2));\n"
"\n"
" highp float dist = 0.;\n"
" if(edgeDist.x < edgeDist.y && edgeDist.x < edgeDist.z)\n"
" dist = edgeDist.x;\n"
" else if(edgeDist.y < edgeDist.x && edgeDist.y < edgeDist.z)\n"
" dist = edgeDist.y;\n"
" else //if(edgeDist.z < edgeDist.x && edgeDist.z < edgeDist.y)\n"
" dist = edgeDist.z;\n"
"\n"
" highp float intensity = interpFactor(dist, lineWidth/2.);\n"
" if(intensity < 0.001)\n"
" discard;\n"
"\n"
" gl_FragColor = vec4(wireframeColor.rgb, wireframeColor.a * intensity);\n"
"}\n"
"";
static const char* frag_wireframe_glsl =
"/*\n"
" This Source Code Form is subject to the terms of the Mozilla Public\n"
......@@ -495,33 +293,6 @@ static const char* geom_common_glsl =
"}\n"
"";
static const char* vert_common_gl2_glsl =
"/*\n"
" This Source Code Form is subject to the terms of the Mozilla Public\n"
" License, v. 2.0. If a copy of the MPL was not distributed with this\n"
" file, You can obtain one at http://mozilla.org/MPL/2.0/.\n"
"*/\n"
"\n"
"uniform mat4 viewMatrix;\n"
"\n"
"attribute highp vec4 vx_position;\n"
"attribute highp vec3 vx_basis;\n"
"attribute highp vec4 vx_edges;\n"
"attribute mediump vec2 vx_baseNodeCoord;\n"
"\n"
"varying highp vec3 basis;\n"
"varying highp vec4 edges;\n"
"varying mediump vec2 baseNodeCoord;\n"
"\n"
"void main(void)\n"
"{\n"
" gl_Position = viewMatrix * vx_position;\n"
" basis = vx_basis;\n"
" edges = vx_edges;\n"
" baseNodeCoord = vx_baseNodeCoord;\n"
"}\n"
"";
static const char* vert_common_glsl =
"/*\n"
" This Source Code Form is subject to the terms of the Mozilla Public\n"
......
......@@ -2,7 +2,14 @@
./bin/shader2cpp \
-l \
-n Vitelotte::shader \
-g PATATE_VITELOTTE_UTILS_SHADER_H \
-o Patate/Vitelotte/Utils/shaders.hpp \
Patate/Vitelotte/Shaders/*
-n Vitelotte::VGMeshRendererShaders \
-g _VITELOTTE_UTILS_VG_MESH_RENDERER_SHADERS_ \
-o Patate/Vitelotte/Utils/vgMeshRendererShaders.hpp \
Patate/Vitelotte/Utils/vgMeshRendererShaders/*
./bin/shader2cpp \
-l \
-n Vitelotte::VGMeshGL2RendererShaders \
-g _VITELOTTE_UTILS_VG_MESH_GL2_RENDERER_SHADERS_ \
-o Patate/Vitelotte/Utils/vgMeshGL2RendererShaders.hpp \
Patate/Vitelotte/Utils/vgMeshGL2RendererShaders/*
......@@ -6,7 +6,7 @@
ValueEditor::ValueEditor(QWidget* parent)
: QWidget(parent), m_document(0),
: QWidget(parent), m_document(0), m_meshType(Document::BASE_MESH),
m_selection(), m_grabHandle(false), m_selectedGradientHandle(-1),
// m_edgeToScreen(Eigen::Matrix3f::Identity()), m_size(1), m_overNode(-1),
m_edgeOffset(3), m_nodeOffset(16), m_nodeSize(6), m_textOffset(12)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment