mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-19 19:35:26 +00:00
gui shaders for opengl
First opengl geometry shader along with the other shaders for gui rendering opengl side.
This commit is contained in:
parent
d9c4269d8b
commit
fbed04050a
9 changed files with 274 additions and 9 deletions
|
|
@ -462,7 +462,7 @@ bool GFXGLShader::_init()
|
|||
if (!mGeometryFile.isEmpty())
|
||||
{
|
||||
macros.last().name = "TORQUE_GEOMETRY_SHADER";
|
||||
compiledGeometryShader = initShader(mPixelFile, GFXShaderStage::GEOMETRY_SHADER, macros);
|
||||
compiledGeometryShader = initShader(mGeometryFile, GFXShaderStage::GEOMETRY_SHADER, macros);
|
||||
if (!compiledGeometryShader)
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ void GuiShaderEditor::renderNodes(Point2I offset, const RectI& updateRect)
|
|||
}
|
||||
|
||||
RectI socketRect(pos, Point2I(mNodeSize, mNodeSize));
|
||||
drawer->drawCircleFill(socketRect, fill, mNodeSize / 2, 2.0f, border);
|
||||
drawer->drawCircleFill(socketRect, fill, mNodeSize / 2, 1.0f, border);
|
||||
}
|
||||
|
||||
for (NodeOutput* output : node->mOutputNodes)
|
||||
|
|
@ -208,7 +208,7 @@ void GuiShaderEditor::renderNodes(Point2I offset, const RectI& updateRect)
|
|||
}
|
||||
|
||||
RectI socketRect(pos, Point2I(mNodeSize, mNodeSize));
|
||||
drawer->drawCircleFill(socketRect, fill, mNodeSize / 2, 2.0f, border);
|
||||
drawer->drawCircleFill(socketRect, fill, mNodeSize / 2, 1.0f, border);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -244,7 +244,7 @@ void GuiShaderEditor::renderConnections(Point2I offset, const RectI& updateRect)
|
|||
start += Point2I(mNodeSize / 2, mNodeSize / 2);
|
||||
end += Point2I(mNodeSize / 2, mNodeSize / 2);
|
||||
|
||||
drawer->drawThickLine(start, end,ColorI(255,255,255,255), (F32)mNodeSize/3);
|
||||
drawer->drawThickLine(start, end,ColorI(255,255,255,255), 2.0f);
|
||||
}
|
||||
|
||||
// Restore the clip rect to what it was at the start
|
||||
|
|
@ -288,10 +288,9 @@ void GuiShaderEditor::onRender(Point2I offset, const RectI& updateRect)
|
|||
RectI sockActive(start, Point2I(mNodeSize, mNodeSize));
|
||||
start += Point2I(mNodeSize / 2, mNodeSize / 2);
|
||||
|
||||
drawer->drawThickLine(start, mLastMousePos + offset, color, (F32)mNodeSize / 3);
|
||||
drawer->drawThickLine(start, mLastMousePos + offset, color, 2.0f);
|
||||
|
||||
// draw socket overlay over the top of the line.
|
||||
sockActive.inset(1, 1);
|
||||
drawer->drawCircleFill(sockActive, color, mNodeSize / 2);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@ ConsoleDocClass(MathAddNode,
|
|||
"@internal"
|
||||
);
|
||||
|
||||
|
||||
MathAddNode::MathAddNode()
|
||||
: GuiShaderNode()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue