summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Nichols <andy.nichols@qt.io>2018-05-30 16:33:19 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2018-05-30 15:15:47 +0000
commit28ada80d8253c56320c2042b57f54b7103945e41 (patch)
tree29ccead947f82463ce9bed80a4e2f1da82bfc33c
parente5da583f0beed56e292dc6a7f713079f65506d9e (diff)
Fix text rendering!
Text still might not look smooth, but at least now it will be unsmooth in the correct location. Also I updated the MetaData.xml file to match Q3DS1 since they changed the default text size from 24 -> 36 Task-number: QT3DS-1823 Change-Id: Ibfe62a60a39ac6597462937c930fdf74f577b3c4 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
-rw-r--r--res/DataModelMetadata/en-us/MetaData.xml279
-rw-r--r--src/runtime/q3dsscenemanager.cpp6
-rw-r--r--src/runtime/q3dsscenemanager_p.h1
-rw-r--r--src/runtime/q3dstextrenderer.cpp11
-rw-r--r--src/runtime/q3dstextrenderer_p.h3
-rw-r--r--src/runtime/q3dsuippresentation.cpp6
6 files changed, 141 insertions, 165 deletions
diff --git a/res/DataModelMetadata/en-us/MetaData.xml b/res/DataModelMetadata/en-us/MetaData.xml
index 8b20f78..32a9c8f 100644
--- a/res/DataModelMetadata/en-us/MetaData.xml
+++ b/res/DataModelMetadata/en-us/MetaData.xml
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
<MetaData>
- <Category name="Custom Events" description="Custom events exposed on the behavior." icon="Objects-Behavior-Normal.png" highlightIcon="Objects-Behavior-Highlight.png" />
- <Category name="Default" description="Default events on all objects" icon="Objects-Folder-Highlight.png" highlightIcon="Objects-Folder-Highlight.png" />
- <Category name="Gesture" description="Input from the touch screen or the mouse" icon="Objects-Folder-Highlight.png" highlightIcon="Objects-Folder-Highlight.png" />
- <Category name="Slide" description="Events generated when a slide is changing." icon="Objects-Folder-Normal.png" highlightIcon="Objects-Folder-Highlight.png" />
- <Category name="Asset" description="Handlers exposed on the asset." icon="Objects-Folder-Normal.png" highlightIcon="Objects-Folder-Highlight.png" />
- <Category name="Custom Handlers" description="Custom Handlers exposed on the behavior." icon="Objects-Behavior-Normal.png" highlightIcon="Objects-Behavior-Highlight.png" />
- <Category name="Time" description="Handlers exposed on the asset's time." icon="Objects-Folder-Normal.png" highlightIcon="Objects-Folder-Highlight.png" />
+ <Category name="Custom Events" description="Custom events exposed on the behavior." icon="Objects-Behavior-Normal.png" highlightIcon="Objects-Behavior-Normal.png" />
+ <Category name="Default" description="Default events on all objects" icon="Objects-Folder-Normal.png" highlightIcon="Objects-Folder-Normal.png" />
+ <Category name="Gesture" description="Input from the touch screen or the mouse" icon="Objects-Folder-Normal.png" highlightIcon="Objects-Folder-Normal.png" />
+ <Category name="Slide" description="Events generated when a slide is changing." icon="Objects-Folder-Normal.png" highlightIcon="Objects-Folder-Normal.png" />
+ <Category name="Asset" description="Handlers exposed on the asset." icon="Objects-Folder-Normal.png" highlightIcon="Objects-Folder-Normal.png" />
+ <Category name="Custom Handlers" description="Custom Handlers exposed on the behavior." icon="Objects-Behavior-Normal.png" highlightIcon="Objects-Behavior-Normal.png" />
+ <Category name="Time" description="Handlers exposed on the asset's time." icon="Objects-Folder-Normal.png" highlightIcon="Objects-Folder-Normal.png" />
<Alias>
<Property name="name" formalName="Name" type="String" default="Alias" hidden="True" />
- <Property name="referencednode" formalName="Reference" description="Original element (e.g. group, component, model) to clone" type="ObjectRef" />
+ <Property name="referencednode" formalName="Reference" description="Original element (e.g. group, component, model)\nto clone" type="ObjectRef" />
</Alias>
<Asset>
<Property name="starttime" formalName="Start Time" type="Long" hidden="True" />
@@ -26,32 +26,28 @@
<Handler name="Fire Event" category="Asset" description="Fire an event on the target.">
<Argument name="Event" description="The event to fire" type="None" argumentType="Event" />
</Handler>
- <Handler name="Emit Signal" category="Asset" description="Emit a Signal.">
- <Argument name="Signal Name" description="The signal to emit" type="String" argumentType="Signal" />
- </Handler>
- <Handler name="Play Sound" category="Asset" description="Play a sound file.">
- <Argument name="Sound File" description="The sound file to play" type="String" argumentType="Sound" />
+ <Handler name="Emit Signal" category="Asset" description="Emit a Signal.">
+ <Argument name="Signal Name" description="The signal to emit" type="String" argumentType="Signal" />
</Handler>
</Asset>
<Behavior>
<Property name="name" formalName="Name" type="String" default="Behavior" hidden="True" />
</Behavior>
<Camera>
-
<Property name="name" formalName="Name" type="String" default="Camera" hidden="True" />
<Property name="opacity" formalName="Opacity" min="0" max="100" default="100" hidden="True" />
<Property name="orthographic" formalName="Orthographic" description="Remove all perspective from the camera?" type="Boolean" animatable="False" />
- <Property name="position" formalName="Position" description="Location in local space" type="Vector" default="0 0 -600" />
- <Property name="rotation" formalName="Rotation" description="Rotation around local axes" type="Rotation" />
- <Property name="scale" formalName="Scale" description="Size adjustments along local axes" type="Vector" default="1 1 1" />
- <Property name="pivot" formalName="Pivot" description="Offset of the contents away from the local center" type="Vector" />
- <Property name="fov" formalName="Field of View" description="Viewing angle of the camera (how much it can see)" min="1" max="180" default="60">
+ <Property name="position" formalName="Position" description="Location in local space" type="Vector" default="0 0 -600" controllable="True" />
+ <Property name="rotation" formalName="Rotation" description="Rotation around local axes" type="Rotation" controllable="True" />
+ <Property name="scale" formalName="Scale" description="Size adjustments along local axes" type="Vector" default="1 1 1" controllable="True" />
+ <Property name="pivot" formalName="Pivot" description="Offset of the contents away from the local center" type="Vector" controllable="True" />
+ <Property name="fov" formalName="Field of View" description="Viewing angle of the camera\n(how much it can see)" min="1" max="180" default="60">
<ShowIfEqual property="orthographic" value="False"/>
</Property>
<Property name="clipnear" formalName="Clipping Start" description="Near distance at which objects disappear" min="1" max="1000" default="10" />
<Property name="clipfar" formalName="Clipping End" description="Far distance at which objects disappear" default="5000" />
- <Property name="scalemode" formalName="Scale Mode" description="Render more content as the layer expands (same size) or scale up the content (fit)" list="Same Size:Fit:Fit Horizontal:Fit Vertical" default="Fit" />
- <Property name="scaleanchor" formalName="Scale Anchor" description="Corner of the content to pin as the layer size changes" list="Center:N:NE:E:SE:S:SW:W:NW" default="Center"/>
+ <Property name="scalemode" formalName="Scale Mode" description="Render more content as the layer expands\n(same size) or scale up the content (fit)" list="Same Size:Fit:Fit Horizontal:Fit Vertical" default="Fit" />
+ <Property name="scaleanchor" formalName="Scale Anchor" description="Corner of the content to pin as the\nlayer size changes" list="Center:N:NE:E:SE:S:SW:W:NW" default="Center"/>
</Camera>
<Component>
<Property name="name" formalName="Name" type="String" default="Component" hidden="True" />
@@ -67,36 +63,36 @@
<!--Images and materials don't have lifetimes, so we use a value that we know just won't cause any issues-->
<Property name="endtime" formalName="End Time" type="Long" default="2147483647" hidden="True" />
<Property name="name" formalName="Name" type="String" default="Image" hidden="True" />
- <Property name="scaleu" formalName="U Repeat" description="Number of times the image is tiled on the U direction of the material" default="1" />
- <Property name="scalev" formalName="V Repeat" description="Number of times the image is tiled on the V direction of the material" default="1" />
- <Property name="mappingmode" formalName="Texture Mapping" description="How the image is applied to the material" list="UV Mapping:Environmental Mapping:Light Probe" default="UV Mapping" />
- <Property name="tilingmodehorz" formalName="U Tiling" description="How the image is tiled in the U direction" list="Tiled:Mirrored:No Tiling" default="No Tiling" />
- <Property name="tilingmodevert" formalName="V Tiling" description="How the image is tiled in the V direction" list="Tiled:Mirrored:No Tiling" default="No Tiling" />
+ <Property name="scaleu" formalName="U Repeat" description="Number of times the image is tiled on\nthe U direction of the material" default="1" />
+ <Property name="scalev" formalName="V Repeat" description="Number of times the image is tiled on\nthe V direction of the material" default="1" />
+ <Property name="mappingmode" formalName="Texture Mapping" description="How the image is applied to the\nmaterial" list="UV Mapping:Environmental Mapping:Light Probe" default="UV Mapping" />
+ <Property name="tilingmodehorz" formalName="U Tiling" description="How the image is tiled in the\nU direction" list="Tiled:Mirrored:No Tiling" default="No Tiling" />
+ <Property name="tilingmodevert" formalName="V Tiling" description="How the image is tiled in the\nV direction" list="Tiled:Mirrored:No Tiling" default="No Tiling" />
<Property name="rotationuv" formalName="UV Rotation" description="Rotate the image's coordinates" />
- <Property name="positionu" formalName="U Position" description="Offset of the image along the U direction of the material" />
- <Property name="positionv" formalName="V Position" description="Offset of the image along the V direction of the material" />
- <Property name="pivotu" formalName="U Pivot" description="Offset the image in the U direction without affecting rotation center" />
- <Property name="pivotv" formalName="V Pivot" description="Offset the image in the V direction without affecting rotation center" />
- <Property name="subpresentation" formalName="Sub-Presentation" description="Presentation (or plugin) to use instead of the image" type="Renderable" />
+ <Property name="positionu" formalName="U Position" description="Offset of the image along the U\ndirection of the material" />
+ <Property name="positionv" formalName="V Position" description="Offset of the image along the V\ndirection of the material" />
+ <Property name="pivotu" formalName="U Pivot" description="Offset the image in the U direction\nwithout affecting rotation center" />
+ <Property name="pivotv" formalName="V Pivot" description="Offset the image in the V direction\nwithout affecting rotation center" />
+ <Property name="subpresentation" formalName="Sub-Presentation" description="Presentation or QML stream\nto use instead of the image" type="Renderable" />
</Image>
<Layer>
<Property name="name" formalName="Name" type="String" default="Layer" hidden="True" />
- <Property name="disabledepthtest" formalName="Disable Depth Test" description="Optimize render speed for layers with mostly transparent objects?" type="Boolean" animatable="False"/>
- <Property name="disabledepthprepass" formalName="Disable Depth Prepass" description="Optimize render speed for layers with low depth complexity" type="Boolean" animatable="False"/>
- <Property name="progressiveaa" formalName="Progressive AA" description="Improves the visual quality when no items are moving" list="None:2x:4x:8x" default="None" />
- <Property name="multisampleaa" formalName="Multisample AA" description="Improves geometry quality, e.g. silhouettes." list="None:2x:4x:SSAA" default="None" />
- <Property name="temporalaa" formalName="Temporal AA" description="Improve overall quality using camera jittering and frame blending?" type="Boolean" default="False"/>
- <Property name="background" formalName="Layer Background" description="The color to use for the layer each frame" list="Transparent:SolidColor:Unspecified" default="Transparent" />
+ <Property name="disabledepthtest" formalName="Disable Depth Test" description="Optimize render speed for layers with\nmostly transparent objects?" type="Boolean" animatable="False"/>
+ <Property name="disabledepthprepass" formalName="Disable Depth Prepass" description="Optimize render speed for layers\nwith low depth complexity" type="Boolean" animatable="False"/>
+ <Property name="progressiveaa" formalName="Progressive AA" description="Improves the visual quality when no\nitems are moving" list="None:2x:4x:8x" default="None" />
+ <Property name="multisampleaa" formalName="Multisample AA" description="Improves geometry quality, e.g.\nsilhouettes." list="None:2x:4x:SSAA" default="None" />
+ <Property name="temporalaa" formalName="Temporal AA" description="Improve overall quality using camera\njittering and frame blending?" type="Boolean" default="False"/>
+ <Property name="background" formalName="Layer Background" description="The color to use for the layer\neach frame" list="Transparent:SolidColor:Unspecified" default="Transparent" />
<Property name="backgroundcolor" formalName="Background Color" description="The background color for the layer" type="Color" animatable="False">
<ShowIfEqual property="background" value="SolidColor"/>
</Property>
- <Property name="blendtype" formalName="Blend Mode" list="Normal:Screen:Multiply:Add:Subtract:*Overlay:*ColorBurn:*ColorDodge" default="Normal" description="Mode of blending between this layer and layers below. Modes marked with * are available only with HW supporting advanced blending modes." />
- <Property name="horzfields" formalName="Horizontal Fields" description="Properties to use to control the horizontal size and placement" list="Left/Width:Left/Right:Width/Right" default="Left/Width" />
- <Property name="left" formalName="Left" description="Distance between presentation and layer left edges">
+ <Property name="blendtype" formalName="Blend Mode" list="Normal:Screen:Multiply:Add:Subtract:*Overlay:*ColorBurn:*ColorDodge" default="Normal" description="Mode of blending between this layer\nand layers below. Modes marked with\n* are available only with HW supporting\nadvanced blending modes." />
+ <Property name="horzfields" formalName="Horizontal Fields" description="Properties to use to control the\nhorizontal size and placement" list="Left/Width:Left/Right:Width/Right" default="Left/Width" />
+ <Property name="left" formalName="Left" description="Distance between presentation and\nlayer left edges">
<ShowIfEqual property="horzfields" value="Left/Width"/>
<ShowIfEqual property="horzfields" value="Left/Right"/>
</Property>
- <Property name="leftunits" formalName="Left Units" description="Left distance is percent of overall width or absolute pixels" list="percent:pixels" default="percent">
+ <Property name="leftunits" formalName="Left Units" description="Left distance is percent of overall\nwidth or absolute pixels" list="percent:pixels" default="percent">
<ShowIfEqual property="horzfields" value="Left/Width"/>
<ShowIfEqual property="horzfields" value="Left/Right"/>
</Property>
@@ -104,24 +100,24 @@
<ShowIfEqual property="horzfields" value="Left/Width"/>
<ShowIfEqual property="horzfields" value="Width/Right"/>
</Property>
- <Property name="widthunits" formalName="Width Units" description="Width is percent of overall width or absolute pixels" list="percent:pixels" default="percent">
+ <Property name="widthunits" formalName="Width Units" description="Width is percent of overall width\nor absolute pixels" list="percent:pixels" default="percent">
<ShowIfEqual property="horzfields" value="Left/Width"/>
<ShowIfEqual property="horzfields" value="Width/Right"/>
</Property>
- <Property name="right" formalName="Right" description="Distance between presentation and layer right edges">
+ <Property name="right" formalName="Right" description="Distance between presentation and layer\nright edges">
<ShowIfEqual property="horzfields" value="Left/Right"/>
<ShowIfEqual property="horzfields" value="Width/Right"/>
</Property>
- <Property name="rightunits" formalName="Right Units" description="Right distance is percent of overall width or absolute pixels" list="percent:pixels" default="percent">
+ <Property name="rightunits" formalName="Right Units" description="Right distance is percent of overall\nwidth or absolute pixels" list="percent:pixels" default="percent">
<ShowIfEqual property="horzfields" value="Left/Right"/>
<ShowIfEqual property="horzfields" value="Width/Right"/>
</Property>
- <Property name="vertfields" formalName="Vertical Fields" description="Properties to use to control the vertical size and placement" list="Top/Height:Top/Bottom:Height/Bottom" default="Top/Height" />
- <Property name="top" formalName="Top" description="Distance between presentation and layer top edges.">
+ <Property name="vertfields" formalName="Vertical Fields" description="Properties to use to control the\nvertical size and placement" list="Top/Height:Top/Bottom:Height/Bottom" default="Top/Height" />
+ <Property name="top" formalName="Top" description="Distance between presentation and layer\ntop edges.">
<ShowIfEqual property="vertfields" value="Top/Height"/>
<ShowIfEqual property="vertfields" value="Top/Bottom"/>
</Property>
- <Property name="topunits" formalName="Top Units" description="Top distance is percent of overall height or absolute pixels" list="percent:pixels" default="percent">
+ <Property name="topunits" formalName="Top Units" description="Top distance is percent of overall\nheight or absolute pixels" list="percent:pixels" default="percent">
<ShowIfEqual property="vertfields" value="Top/Height"/>
<ShowIfEqual property="vertfields" value="Top/Bottom"/>
</Property>
@@ -129,19 +125,19 @@
<ShowIfEqual property="vertfields" value="Top/Height"/>
<ShowIfEqual property="vertfields" value="Height/Bottom"/>
</Property>
- <Property name="heightunits" formalName="Height Units" description="Height is percent of overall height or absolute pixels" list="percent:pixels" default="percent">
+ <Property name="heightunits" formalName="Height Units" description="Height is percent of overall height\nor absolute pixels" list="percent:pixels" default="percent">
<ShowIfEqual property="vertfields" value="Top/Height"/>
<ShowIfEqual property="vertfields" value="Height/Bottom"/>
</Property>
- <Property name="bottom" formalName="Bottom" description="Distance between presentation and layer bottom edges">
+ <Property name="bottom" formalName="Bottom" description="Distance between presentation and layer\nbottom edges">
<ShowIfEqual property="vertfields" value="Top/Bottom"/>
<ShowIfEqual property="vertfields" value="Height/Bottom"/>
</Property>
- <Property name="bottomunits" formalName="Bottom Units" description="Bottom distance is percent of overall height or absolute pixels" list="percent:pixels" default="percent">
+ <Property name="bottomunits" formalName="Bottom Units" description="Bottom distance is percent of overall\nheight or absolute pixels" list="percent:pixels" default="percent">
<ShowIfEqual property="vertfields" value="Top/Bottom"/>
<ShowIfEqual property="vertfields" value="Height/Bottom"/>
</Property>
- <Property name="sourcepath" formalName="Sub-Presentation" description="Presentation (or plugin) to render for this layer" type="Renderable" />
+ <Property name="sourcepath" formalName="Sub-Presentation" description="Presentation or QML stream to\nrender for this layer" type="Renderable" />
<!-- Restating the node properties so they appear at the bottom of the list because they won't be used quite as much -->
<!--CN - removing properties that may force the layer to render offscreen. We aren't ready to support this feature-->
<Property name="position" formalName="Position" description="Position" type="Vector" hidden="True"/>
@@ -150,81 +146,58 @@
<Property name="pivot" formalName="Pivot" description="Pivot" type="Vector" hidden="True" />
<Property name="opacity" formalName="Opacity" min="0" max="100" default="100" hidden="True" />
- <Property name="aostrength" formalName="Ambient Occlusion" description="Amount of ambient occlusion shading to apply" min="0" max="100" default="0">
+ <Property name="aostrength" formalName="Ambient Occlusion" description="Amount of ambient occlusion shading\nto apply" min="0" max="100" default="0">
<ShowIfEqual property="sourcepath" value=""/>
</Property>
<Property name="aodistance" formalName="AO Distance" description="Size of the ambient occlusion shading" default="5">
- <HideIfEqual property="aostrength" value="0"/>
<ShowIfEqual property="sourcepath" value=""/>
</Property>
- <Property name="aosoftness" formalName="AO Softness" description="Magnitude of the blurring used to soften shading" min="0" max="50" default="50">
- <HideIfEqual property="aostrength" value="0"/>
+ <Property name="aosoftness" formalName="AO Softness" description="Magnitude of the blurring used to\nsoften shading" min="0" max="50" default="50">
<ShowIfEqual property="sourcepath" value=""/>
</Property>
- <Property name="aobias" formalName="AO Threshold" description="Remove AO from flat surfaces to prevent artifacts" default="0">
- <HideIfEqual property="aostrength" value="0"/>
+ <Property name="aobias" formalName="AO Threshold" description="Remove AO from flat surfaces to\nprevent artifacts" default="0">
<ShowIfEqual property="sourcepath" value=""/>
</Property>
<Property name="aosamplerate" formalName="AO Sampling Rate" description="Quality of AO sampling" type="Long" default="2" min="2" max="4">
- <HideIfEqual property="aostrength" value="0"/>
<ShowIfEqual property="sourcepath" value=""/>
</Property>
<Property name="aodither" formalName="AO Detail" description="Use close-range detail AO" type="Boolean" default="True">
- <HideIfEqual property="aostrength" value="0"/>
<ShowIfEqual property="sourcepath" value=""/>
</Property>
<Property name="shadowstrength" formalName="Shadow Strength" description="Amount of shadowing to apply" min="0" max="100" default="0" hidden="True">
<ShowIfEqual property="sourcepath" value=""/>
</Property>
- <Property name="shadowdist" formalName="Shadow Distance" description="Maximum distance to ray march for shadows test" default="10" hidden="True">
- <HideIfEqual property="shadowstrength" value="0"/>
+ <Property name="shadowdist" formalName="Shadow Distance" description="Maximum distance to ray march for\nshadows test" default="10" hidden="True">
<ShowIfEqual property="sourcepath" value=""/>
</Property>
- <Property name="shadowsoftness" formalName="Shadow Softness" description="Amount of softening of the shadow edges" min="0" max="100" default="100" hidden="True">
- <HideIfEqual property="shadowstrength" value="0"/>
+ <Property name="shadowsoftness" formalName="Shadow Softness" description="Amount of softening of the shadow\nedges" min="0" max="100" default="100" hidden="True">
<ShowIfEqual property="sourcepath" value=""/>
</Property>
- <Property name="shadowbias" formalName="Shadow Threshold" description="Remove self-shadowing from flat surfaces" default="0" hidden="True">
- <HideIfEqual property="shadowstrength" value="0"/>
+ <Property name="shadowbias" formalName="Shadow Threshold" description="Remove self-shadowing from flat\nsurfaces" default="0" hidden="True">
<ShowIfEqual property="sourcepath" value=""/>
</Property>
- <Property name="lightprobe" formalName="Light Probe" description="Image used for image-based lighting and reflections" type="Image" />
- <Property name="probebright" formalName="IBL Brightness" description="Amount of light emitted by the light probe." default="100" />
- <Property name="fastibl" formalName="Fast IBL" description="Use a faster approximation to image-based lighting" type="Boolean" default="True" hidden="True" />
- <Property name="probehorizon" formalName="IBL Horizon Cutoff" description="Upper limit for horizon darkening of the light probe" min="-1" max="-0.001" default="-1">
- <HideIfEqual property="lightprobe" value=""/>
- </Property>
- <Property name="probefov" formalName="IBL FOV Angle" description="Image source FOV for the case of using a camera-source as the IBL probe" min="1.0" max="180" default="180">
- <HideIfEqual property="lightprobe" value=""/>
- </Property>
- <Property name="lightprobe2" formalName="Secondary Light Probe" description="Image to blend over the primary light probe" type="Image">
- <HideIfEqual property="lightprobe" value=""/>
- </Property>
- <Property name="probe2fade" formalName="Probe Crossfade" description="Blend amount between the primary and seconary probes" min="0.0" max="1.0" default="1.0">
- <HideIfEqual property="lightprobe" value=""/>
- <HideIfEqual property="lightprobe2" value=""/>
- </Property>
- <Property name="probe2window" formalName="Secondary Probe Window" description="Texture-U window size used for the moving window (for scrolling textures" min="0.01" max="1.0" default="1.0" hidden="True">
- <HideIfEqual property="lightprobe" value=""/>
- <HideIfEqual property="lightprobe2" value=""/>
- </Property>
- <Property name="probe2pos" formalName="Secondary Probe Offset" description="Texture-U window offset used for the moving window" default="0.5" hidden="True">
- <HideIfEqual property="lightprobe" value=""/>
- <HideIfEqual property="lightprobe2" value=""/>
- </Property>
+ <Property name="lightprobe" formalName="Light Probe" description="Image used for image-based lighting\nand reflections" type="Image" />
+ <Property name="probebright" formalName="IBL Brightness" description="Amount of light emitted by the light\nprobe." default="100" />
+ <Property name="fastibl" formalName="Fast IBL" description="Use a faster approximation to\nimage-based lighting" type="Boolean" default="True" hidden="True" />
+ <Property name="probehorizon" formalName="IBL Horizon Cutoff" description="Upper limit for horizon darkening\nof the light probe" min="-1" max="-0.001" default="-1" />
+ <Property name="probefov" formalName="IBL FOV Angle" description="Image source FOV for the case of using\na camera-source as the IBL probe" min="1.0" max="180" default="180" />
+ <Property name="lightprobe2" formalName="Secondary Light Probe" description="Image to blend over the primary light\nprobe" type="Image" />
+ <Property name="probe2fade" formalName="Probe Crossfade" description="Blend amount between the primary and\nseconary probes" min="0.0" max="1.0" default="1.0" />
+ <Property name="probe2window" formalName="Secondary Probe Window" description="Texture-U window size used for the\nmoving window (for scrolling textures)" min="0.01" max="1.0" default="1.0" hidden="True" />
+ <Property name="probe2pos" formalName="Secondary Probe Offset" description="Texture-U window offset used for the\nmoving window" default="0.5" hidden="True" />
</Layer>
<Light>
<Property name="name" formalName="Name" type="String" default="Light" hidden="True" />
<Property name="opacity" formalName="Opacity" min="0" max="100" default="100" hidden="True" />
- <Property name='scope' formalName="Scope" description="Portion of the scene graph lit by this light; no value results in entire layer being affected." type='ObjectRef' />
+ <Property name='scope' formalName="Scope" description="Portion of the scene graph lit by this\nlight; no value results in entire layer\nbeing affected." type='ObjectRef' />
<Property name="lighttype" formalName="Light Type" description="Type of illumination to use" list="Directional:Point:Area" default="Directional" />
- <Property name="position" formalName="Position" description="Location in local space" type="Vector"/>
- <Property name="rotation" formalName="Rotation" description="Rotation around local axes" type="Rotation" />
- <Property name="scale" formalName="Scale" description="Size adjustments along local axes" type="Vector" default="1 1 1" />
- <Property name="pivot" formalName="Pivot" description="Offset of the contents away from the local center" type="Vector" />
- <Property name="lightdiffuse" formalName="Light Color" description="Color of diffuse lighting effect" type="Color" default="1 1 1"/>
+ <Property name="position" formalName="Position" description="Location in local space" type="Vector" controllable="True"/>
+ <Property name="rotation" formalName="Rotation" description="Rotation around local axes" type="Rotation" controllable="True" />
+ <Property name="scale" formalName="Scale" description="Size adjustments along local axes" type="Vector" default="1 1 1" controllable="True" />
+ <Property name="pivot" formalName="Pivot" description="Offset of the contents away from the local center" type="Vector" controllable="True" />
+ <Property name="lightdiffuse" formalName="Light Color" description="Color of diffuse lighting effect" type="Color" default="1 1 1" controllable="True" />
<Property name="lightspecular" formalName="Specular Color" description="Color of specular lighting highlights" type="Color" default="1 1 1"/>
<Property name="lightambient" formalName="Ambient Color" description="Color of unlit areas (black for none)" type="Color"/>
<Property name="brightness" formalName="Brightness" description="Strength of the light" default="100"/>
@@ -243,65 +216,53 @@
<Property name="castshadow" formalName="Cast Shadows?" description="Enable shadow casting for this light" type="Boolean" default="False"/>
<Property name="shdwfactor" formalName="Shadow Darkness" description="Factor used to darken shadows" default="10.0" min="1.0" max="100.0" />
<Property name="shdwfilter" formalName="Shadow Softness" description="Width of the blur filter on the shadow map" min="1" max="100" default="35" />
- <Property name="shdwmapres" formalName="Shadow Resolution" description="Resolution of shadow map (powers of two)" type="ShadowMapResolution" default="9" animatable="False" />
- <Property name="shdwbias" formalName="Shadow Depth Bias" description="Slight offset to avoid self-shadowing artifacts" default="0" min="-1.0" max="1.0" />
- <Property name="shdwmapfar" formalName="Shadow Far Clip" description="Affects the maximum distance for the shadow depth map" default="5000" />
- <Property name="shdwmapfov" formalName="Shadow Field of View" description="Affects the field of view of the shadow camera" default="90" min="1" max="179" />
+ <Property name="shdwmapres" formalName="Shadow Resolution" description="Resolution of shadow map\n(powers of two)" type="ShadowMapResolution" default="9" animatable="False" />
+ <Property name="shdwbias" formalName="Shadow Depth Bias" description="Slight offset to avoid self-shadowing\nartifacts" default="0" min="-1.0" max="1.0" />
+ <Property name="shdwmapfar" formalName="Shadow Far Clip" description="Affects the maximum distance for the shadow\ndepth map" default="5000" />
+ <Property name="shdwmapfov" formalName="Shadow Field of View" description="Affects the field of view of the shadow\ncamera" default="90" min="1" max="179" />
</Light>
<Lightmaps>
<Property name="name" formalName="Name" type="String" default="Lightmaps" hidden="True" category="Lighting" />
- <Property name="lightmapindirect" formalName="Indirect Lightmap" description="Image providing indirect lighty values for GI" type="Image" category="Lighting" />
+ <Property name="lightmapindirect" formalName="Indirect Lightmap" description="Image providing indirect light values\nfor GI" type="Image" category="Lighting" />
<Property name="lightmapradiosity" formalName="Radiosity Lightmap" description="Image providing directional light values" type="Image" category="Lighting" />
<Property name="lightmapshadow" formalName="Shadow Lightmap" description="Baked Shadow map" type="Image" category="Lighting" />
</Lightmaps>
<MaterialBase>
<Property name="name" formalName="Name" type="String" default="MaterialBase" hidden="True" category="Material" />
- <Property name="iblprobe" formalName="IBL Override" description="IBL probe to use in place of the layer probe for this material" type="Image" category="Material" />
+ <Property name="iblprobe" formalName="IBL Override" description="IBL probe to use in place of the\nlayer probe for this material" type="Image" category="Material" />
</MaterialBase>
<Material>
<Property name="name" formalName="Name" type="String" default="Material" hidden="True" category="Material" />
<Property name="shaderlighting" formalName="Lighting" description="Light model" list="Pixel:None" default="Pixel" category="Material" />
- <Property name="blendmode" formalName="Blending Mode" description="How this material blends with content behind it. Modes marked with * are available only with HW supporting advanced blending modes." list="Normal:Screen:Multiply:*Overlay:*ColorBurn:*ColorDodge" default="Normal" category="Material" />
- <Property name="diffuse" formalName="Diffuse Color" description="Color when lit from any direction" type="Color" default="1 1 1" category="Material" />
+ <Property name="blendmode" formalName="Blending Mode" description="How this material blends with content\nbehind it. Modes marked with * are\navailable only with HW supporting\nadvanced blending modes." list="Normal:Screen:Multiply:*Overlay:*ColorBurn:*ColorDodge" default="Normal" category="Material" />
+ <Property name="vertexcolors" formalName="Enable Vertex Colors" description="Use vertex colors from the mesh" type="Boolean" default="False" animatable="False" category="Material" />
+ <Property name="diffuse" formalName="Diffuse Color" description="Color when lit from any direction" type="Color" default="1 1 1" category="Material" controllable="True" />
<Property name="diffusemap" formalName="Diffuse Map" description="Image to multiply with diffuse color" type="Image" category="Material" />
<Property name="diffusemap2" formalName="Diffuse Map 2" description="Image to multiply with diffuse color" type="Image" category="Material" />
<Property name="diffusemap3" formalName="Diffuse Map 3" description="Image to multiply with diffuse color" type="Image" category="Material" />
<Property name="specularreflection" formalName="Specular Reflection" description="Image to use as a faked reflection" type="Image" category="Material" />
<Property name="speculartint" formalName="Specular Tint" type="Color" description="Coloration applied to specular reflections" default="1 1 1" category="Material" />
<Property name="specularamount" formalName="Specular Amount" description="Amount of shine/gloss" category="Material" />
- <Property name="specularmap" formalName="Specular Map" description="Image to vary the specular amount across the material" type="Image" category="Material" >
- <HideIfEqual property="specularamount" value='0'/>
- </Property>
- <Property name="specularmodel" formalName="Specular Model" description="Equation to use when calculating specular highlights for CG lights" list="Default:KGGX:KWard" default="Default" category="Material" >
- <HideIfEqual property="specularamount" value='0'/>
- </Property>
- <Property name="specularroughness" formalName="Specular Roughness" description="Softening applied to reflections and highlights" min='0.001' max='1' category="Material" >
- <HideIfEqual property="specularamount" value='0'/>
- </Property>
+ <Property name="specularmap" formalName="Specular Map" description="Image to vary the specular amount across\nthe material" type="Image" category="Material" />
+ <Property name="specularmodel" formalName="Specular Model" description="Equation to use when calculating specular\nhighlights for CG lights" list="Default:KGGX:KWard" default="Default" category="Material" />
+ <Property name="specularroughness" formalName="Specular Roughness" description="Softening applied to reflections and\nhighlights" min='0.001' max='1' category="Material" />
+ <Property name="roughnessmap" formalName="Roughness Map" description="Image to vary the specular roughness across\nthe material" type="Image" category="Material" />
<Property name="fresnelPower" formalName="Fresnel Power" description="Damping of head-on reflections" category="Material" />
- <Property name="ior" formalName="Index of Refraction" description="Angle at which fresnel reflection damping applies" min="0" max="1" default=".2" category="Material" >
- <HideIfEqual property="fresnelPower" value="0"/>
- </Property>
- <Property name="bumpmap" formalName="Bump Map" description="Grayscale image simulating roughness in the lighting" type="Image" category="Material" />
- <Property name="normalmap" formalName="Normal Map" description="Special RGB image describing surface roughness" type="Image" category="Material" />
+ <Property name="ior" formalName="Index of Refraction" description="Angle at which fresnel reflection damping\napplies" min="0" max="1" default=".2" category="Material" />
+ <Property name="bumpmap" formalName="Bump Map" description="Grayscale image simulating roughness in the\nlighting" type="Image" category="Material" />
+ <Property name="normalmap" formalName="Normal Map" description="Special RGB image describing surface\nroughness" type="Image" category="Material" />
<Property name="bumpamount" formalName="Bump Amount" description="Strength of bump/normal map effect" type="float" default=".5" category="Material" />
- <Property name="displacementmap" formalName="Displacement Map" description="Grayscale image used to offset vertices of the geometry" type="Image" category="Material" />
- <Property name="displaceamount" formalName="Displacement Amount" description="Distance to offset vertices" type="float" default="20" category="Material" >
- <HideIfEqual property="displacementmap" value=""/>
- </Property>
+ <Property name="displacementmap" formalName="Displacement Map" description="Grayscale image used to offset vertices\nof the geometry" type="Image" category="Material" />
+ <Property name="displaceamount" formalName="Displacement Amount" description="Distance to offset vertices" type="float" default="20" category="Material" />
<Property name="opacity" formalName="Opacity" description="Visibility of the geometry for this material." min="0" max="100" default="100" category="Material" />
<Property name="opacitymap" formalName="Opacity Map" description="Image to vary the opacity across the material" type="Image" category="Material" />
<Property name="emissivecolor" formalName="Emissive Color" description="Color of self-illumination for this material" type="Color" default="1 1 1" category="Material" />
- <Property name="emissivepower" formalName="Emissive Power" description="Amount of self-illumination for this material (will not light other objects)" category="Material" />
- <Property name="emissivemap" formalName="Emissive Map" description="Image to vary the emissive power across the material" type="Image" category="Material" />
- <Property name="emissivemap2" formalName="Emissive Map 2" description="Second image to modulate the emissive power across the material" type="Image" category="Material" />
- <Property name="translucencymap" formalName="Translucency Map" description="Grayscale image controlling how much light can pass through the material from behind" type="Image" category="Material" />
- <Property name="translucentfalloff" formalName="Translucent Falloff" type="float" default="1" category="Material" >
- <HideIfEqual property="translucencymap" value=""/>
- </Property>
- <Property name="diffuselightwrap" formalName="Diffuse Light Wrap" type="float" min='0.0' max='1.0' category="Material" >
- <HideIfEqual property="translucencymap" value=""/>
- </Property>
+ <Property name="emissivepower" formalName="Emissive Power" description="Amount of self-illumination for this material\n(will not light other objects)" category="Material" />
+ <Property name="emissivemap" formalName="Emissive Map" description="Image to vary the emissive power across\nthe material" type="Image" category="Material" />
+ <Property name="emissivemap2" formalName="Emissive Map 2" description="Second image to modulate the emissive power\nacross the material" type="Image" category="Material" />
+ <Property name="translucencymap" formalName="Translucency Map" description="Grayscale image controlling how much light can\npass through the material from behind" type="Image" category="Material" />
+ <Property name="translucentfalloff" formalName="Translucent Falloff" description="Translucent Falloff" type="float" default="1" category="Material" />
+ <Property name="diffuselightwrap" formalName="Diffuse Light Wrap" description="Diffuse Light Wrap" type="float" min='0.0' max='1.0' category="Material" />
</Material>
<ReferencedMaterial>
<Property name="name" formalName="Name" type="String" default="Material" hidden="True" category="Material" />
@@ -311,13 +272,9 @@
<Property name="name" formalName="Name" type="String" default="Model" hidden="True" />
<Property name="sourcepath" formalName="Mesh" description="Geometry to use for this model" type="Mesh" />
<Property name="poseroot" hidden="True" type="Long" default="-1" />
- <Property name="tessellation" formalName="Tessellation Mode" description="Type of tessellation to subdivide the geometry" list="None:Linear:Phong:NPatch" default="None" />
- <Property name="edgetess" formalName="Edge Tessellation" description="Max Tessellation amount" min="1" max="64" default="4">
- <HideIfEqual property="tessellation" value="None"/>
- </Property>
- <Property name="innertess" formalName="Inner Tessellation" description="Min Tessellation amount" min="1" max="64" default="4">
- <HideIfEqual property="tessellation" value="None"/>
- </Property>
+ <Property name="tessellation" formalName="Tessellation Mode" description="Type of tessellation to subdivide\nthe geometry" list="None:Linear:Phong:NPatch" default="None" />
+ <Property name="edgetess" formalName="Edge Tessellation" description="Max Tessellation amount" min="1" max="64" default="4" />
+ <Property name="innertess" formalName="Inner Tessellation" description="Min Tessellation amount" min="1" max="64" default="4" />
</Model>
<Node>
<Event name="onPressureDown" category="Gesture" />
@@ -342,11 +299,11 @@
<Event name="onTwoPointSwipeDown" category="Gesture" />
-->
- <Property name="position" formalName="Position" description="Location in local space" type="Vector"/>
- <Property name="rotation" formalName="Rotation" description="Rotation around local axes" type="Rotation" />
- <Property name="scale" formalName="Scale" description="Size adjustments along local axes" type="Vector" default="1 1 1" />
- <Property name="pivot" formalName="Pivot" description="Offset of the contents away from the local center" type="Vector" />
- <Property name="opacity" formalName="Opacity" description="How much the element (and its children) occlude items behind them" min="0" max="100" default="100" />
+ <Property name="position" formalName="Position" description="Location in local space" type="Vector" controllable="True" />
+ <Property name="rotation" formalName="Rotation" description="Rotation around local axes" type="Rotation" controllable="True" />
+ <Property name="scale" formalName="Scale" description="Size adjustments along local axes" type="Vector" default="1 1 1" controllable="True" />
+ <Property name="pivot" formalName="Pivot" description="Offset of the contents away from the\nlocal center" type="Vector" controllable="True" />
+ <Property name="opacity" formalName="Opacity" description="How much the element (and its children)\nocclude items behind them" min="0" max="100" default="100" controllable="True" />
<Property name="rotationorder" formalName="Rotation Order" description="Rotation Order" list="XYZ:YZX:ZXY:XZY:YXZ:ZYX:XYZr:YZXr:ZXYr:XZYr:YXZr:ZYXr" default="YXZ" hidden="True"/>
<Property name="orientation" formalName="Orientation" description="Orientation" list="Left Handed:Right Handed" default="Left Handed" hidden="True"/>
<Property name="boneid" type="Long" hidden="True" default="-1" />
@@ -354,20 +311,20 @@
</Node>
<Path>
<Property name="name" formalName="Name" type="String" default="Path" hidden="True" />
- <Property name="opacity" formalName="Opacity" description="How much the element (and its children) occlude items behind them" min="0" max="100" default="100" />
+ <Property name="opacity" formalName="Opacity" description="How much the element (and its children)\nocclude items behind them" min="0" max="100" default="100" />
<Property name="sourcepath" formalName="Path" description="Path data to use for this path" type="PathBuffer" />
<Property name='width' formalName="Stroke Width" description="The size of the stroke in local units" default='5'/>
<Property name='pathtype' formalName='Path Type' description="The type of this path" list='Painted:Geometry' default='Painted' />
- <Property name='linearerror' formalName="CPU Limit" description="Amount of tessellation work done on the CPU before GPU tessellation is involved" default='1000'>
+ <Property name='linearerror' formalName="CPU Limit" description="Amount of tessellation work done on the\nCPU before GPU tessellation is involved" default='1000'>
<ShowIfEqual property='pathtype' value='Geometry'/>
</Property>
- <Property name='edgetessamount' formalName="Edge Detail" description="Amount of GPU tessellation along the length of the path." default='8' min='1' max='64' >
+ <Property name='edgetessamount' formalName="Edge Detail" description="Amount of GPU tessellation along the\nlength of the path." default='8' min='1' max='64' >
<ShowIfEqual property='pathtype' value='Geometry'/>
</Property>
- <Property name='innertessamount' formalName="Width Detail" description="Amount of GPU tessellation across the stroke of the path." default='1' min='1' max='64' >
+ <Property name='innertessamount' formalName="Width Detail" description="Amount of GPU tessellation across the\nstroke of the path." default='1' min='1' max='64' >
<ShowIfEqual property='pathtype' value='Geometry'/>
</Property>
- <Property name='begincap' formalName="Begin Cap Style" description='Set this to &quot;Taper&quot; to finely taper the beginning of your stroke over a specified distance' list="None:Taper" default="None">
+ <Property name='begincap' formalName="Begin Cap Style" description='Set this to &quot;Taper&quot; to finely\ntaper the beginning of your stroke over\na specified distance' list="None:Taper" default="None">
<ShowIfEqual property='pathtype' value='Geometry'/>
</Property>
<Property name='begincapoffset' formalName='Taper Length' description="Control the length of the taper" default='10'>
@@ -382,7 +339,7 @@
<HideIfEqual property='pathtype' value='Painted'/>
<ShowIfEqual property='begincap' value='Taper'/>
</Property>
- <Property name='endcap' formalName="End Cap Style" description='Set this to &quot;Taper&quot; to finely taper the end of your stroke over a specified distance' list="None:Taper" default="None">
+ <Property name='endcap' formalName="End Cap Style" description='Set this to &quot;Taper&quot; to finely\ntaper the end of your stroke over a\nspecified distance' list="None:Taper" default="None">
<ShowIfEqual property='pathtype' value='Geometry'/>
</Property>
<Property name='endcapoffset' formalName='Taper Length' description="Control the length of the taper" default='10'>
@@ -416,7 +373,7 @@
<Particle>
<Property name="name" formalName="Name" type="String" default="Particle" hidden="True" />
<Property name="particletype" formalName="Particle Type" description="Type of particle System" list="Simple:Smoke:Cloud:Fluid:User" default="Cloud" />
- <Property name="opacity" formalName="Opacity" description="How much the element (and its children) occlude items behind them" min="0" max="100" default="100" />
+ <Property name="opacity" formalName="Opacity" description="How much the element (and its children)\nocclude items behind them" min="0" max="100" default="100" />
<Property name="maxparticles" formalName="MaxParticle" description="Max count of particles" type="Long" min="0" max="1000000" default="100" />
<Property name="particlesize" formalName="ParticleSize" description="Render size of particle" min="0" default="1" />
<Property name="lifetime" formalName="Lifetime" description="Particle lifetime before it dies" min="-1" default="5">
@@ -428,10 +385,8 @@
</RenderPlugin>
<Scene>
<Property name="name" formalName="Name" type="String" default="Scene" hidden="True" />
- <Property name="bgcolorenable" formalName="Use Background" description="Clear the contents to a solid color before each frame?" type="Boolean" default="True" />
- <Property name="backgroundcolor" formalName="Background Color" description="Color to use for the background" type="Color" animatable="False">
- <ShowIfEqual property="bgcolorenable" value="True"/>
- </Property>
+ <Property name="bgcolorenable" formalName="Use Background" description="Clear the contents to a solid color\nbefore each frame?" type="Boolean" default="True" />
+ <Property name="backgroundcolor" formalName="Background Color" description="Color to use for the background" type="Color" animatable="False" />
<Event name="onPressureDown" category="Gesture" />
<Event name="onPressureUp" category="Gesture" />
<Event name="onTap" category="Gesture" />
@@ -455,11 +410,11 @@
-->
</Scene>
<Slide>
- <Property name="playmode" formalName="Play Mode" description="Action to take when reaching the end of all timebars on this slide" list="Stop at end:Looping:PingPong:Ping:Play Through To..." default="Stop at end" animatable="False" />
+ <Property name="playmode" formalName="Play Mode" description="Action to take when reaching the end of\nall timebars on this slide" list="Stop at end:Looping:PingPong:Ping:Play Through To..." default="Stop at end" animatable="False" />
<Property name="playthroughto" formalName="Play Through To" description="Slide to go to after this one" type="StringListOrInt" list="Next:Previous" default="Next" animatable="False">
<ShowIfEqual property="playmode" value="Play Through To..."/>
</Property>
- <Property name="initialplaystate" formalName="Initial Play State" description="Do animations start when coming to this slide?" list="Play:Pause" default="Play" animatable="False" />
+ <Property name="initialplaystate" formalName="Initial Play State" description="Do animations start when coming to\nthis slide?" list="Play:Pause" default="Play" animatable="False" />
</Slide>
<SlideOwner>
<Event name="onSlideEnter" category="Slide" description="Fired when the slide is changing" />
@@ -479,16 +434,22 @@
</SlideOwner>
<Text>
<Property name="name" formalName="Name" type="String" default="Text" hidden="True" />
- <Property name="textstring" formalName="Text String" description="Text String" type="MultiLineString" default="Text" />
- <Property name="textcolor" formalName="Text Color" description="Text Color" type="Color" default="1 1 1" />
+ <Property name="textstring" formalName="Text String" description="Text String" type="MultiLineString" default="Text" controllable="True" />
+ <Property name="textcolor" formalName="Text Color" description="Text Color" type="Color" default="1 1 1" controllable="True" />
<Property name="font" formalName="Font" description="Font" type="Font" default="TitilliumWeb-Regular" />
<!-- HW accelerated fonts not supported
<Property name="enableacceleratedfont" formalName="Hardware accelerated font" description="Enabled hardware acclerated font" type="Boolean" default="false" />
-->
- <Property name="size" formalName="Font Size" description="Font Size" type="FontSize" default="24" animatable="False" />
+ <Property name="size" formalName="Font Size" description="Font Size" type="FontSize" default="36" animatable="False" controllable="True" />
<Property name="horzalign" formalName="Horizontal Alignment" description="Horizontal Alignment" list="Left:Center:Right" default="Center" />
<Property name="vertalign" formalName="Vertical Alignment" description="Vertical Alignment" list="Top:Middle:Bottom" default="Middle" />
<Property name="leading" formalName="Leading" description="Leading" />
<Property name="tracking" formalName="Tracking" description="Tracking" />
</Text>
+ <DataInput>
+ <Property name="name" formalName="Name" type="String" default="DataInput" hidden="True" />
+ <Property name="timefrom" formalName="Time from" description="Datainput incoming value corresponding\nto playhead time zero" animatable="False" min="0" default="0"/>
+ <Property name="timeto" formalName="Time to" description="Datainput incoming value corresponding\nto playhead end" animatable="False" min="0" default="0" />
+ <Property name="controlledelemprop" formalName="Controlled Element-Properties" type="MultiLineString" description ="Element/properties connected to this\ndata input" animatable="False" />
+ </DataInput>
</MetaData>
diff --git a/src/runtime/q3dsscenemanager.cpp b/src/runtime/q3dsscenemanager.cpp
index c664267..96c49ed 100644
--- a/src/runtime/q3dsscenemanager.cpp
+++ b/src/runtime/q3dsscenemanager.cpp
@@ -438,7 +438,7 @@ Q3DSSceneManager::Q3DSSceneManager()
m_matGen(new Q3DSDefaultMaterialGenerator),
m_customMaterialGen(new Q3DSCustomMaterialGenerator),
m_textMatGen(new Q3DSTextMaterialGenerator),
- m_textRenderer(new Q3DSTextRenderer),
+ m_textRenderer(new Q3DSTextRenderer(this)),
m_profiler(new Q3DSProfiler),
m_slidePlayer(new Q3DSSlidePlayer(this)),
m_inputManager(new Q3DSInputManager(this))
@@ -3951,7 +3951,7 @@ Qt3DCore::QEntity *Q3DSSceneManager::buildText(Q3DSTextNode *text3DS, Q3DSLayerN
std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
text3DS->addEventHandler(QString(), std::bind(&Q3DSSceneManager::handleEvent, this, std::placeholders::_1));
- QSize sz = m_textRenderer->textImageSize(text3DS);
+ QSize sz = m_textRenderer->textImageSize(text3DS) * m_viewportData.viewportDpr;
if (sz.isEmpty())
return entity;
@@ -3998,7 +3998,7 @@ void Q3DSSceneManager::updateText(Q3DSTextNode *text3DS, bool needsNewImage)
if (needsNewImage) {
// textstring, leading, tracking
- const QSize sz = m_textRenderer->textImageSize(text3DS);
+ const QSize sz = m_textRenderer->textImageSize(text3DS) * m_viewportData.viewportDpr;
if (!sz.isEmpty()) {
data->mesh->setWidth(sz.width());
data->mesh->setHeight(sz.height());
diff --git a/src/runtime/q3dsscenemanager_p.h b/src/runtime/q3dsscenemanager_p.h
index fd565b9..fe6cf45 100644
--- a/src/runtime/q3dsscenemanager_p.h
+++ b/src/runtime/q3dsscenemanager_p.h
@@ -899,6 +899,7 @@ private:
friend class Q3DSSlidePlayer;
friend class Q3DSInputManager;
friend class Q3DSConsoleCommands;
+ friend class Q3DSTextRenderer;
};
Q_DECLARE_OPERATORS_FOR_FLAGS(Q3DSSceneManager::SceneBuilderFlags)
diff --git a/src/runtime/q3dstextrenderer.cpp b/src/runtime/q3dstextrenderer.cpp
index b53f2a7..aac521f 100644
--- a/src/runtime/q3dstextrenderer.cpp
+++ b/src/runtime/q3dstextrenderer.cpp
@@ -28,6 +28,7 @@
****************************************************************************/
#include "q3dstextrenderer_p.h"
+#include "q3dsscenemanager_p.h"
#include "q3dsuippresentation_p.h"
#include "q3dslogging_p.h"
@@ -43,6 +44,12 @@
QT_BEGIN_NAMESPACE
+Q3DSTextRenderer::Q3DSTextRenderer(Q3DSSceneManager *sceneManager)
+ : m_sceneManager(sceneManager)
+{
+
+}
+
void Q3DSTextRenderer::registerFonts(const QStringList &dirs)
{
const QStringList nameFilters = { QStringLiteral("*.ttf"), QStringLiteral("*.otf") };
@@ -117,7 +124,7 @@ Q3DSTextRenderer::Font *Q3DSTextRenderer::findFont(const QString &name)
void Q3DSTextRenderer::updateFontInfo(Font *font, Q3DSTextNode *text3DS)
{
- font->font.setPointSizeF(qreal(text3DS->size()));
+ font->font.setPixelSize(text3DS->size());
font->font.setLetterSpacing(QFont::AbsoluteSpacing, qreal(text3DS->tracking()));
}
@@ -132,7 +139,7 @@ QRectF Q3DSTextRenderer::textBoundingBox(Q3DSTextNode *text3DS, const QFontMetri
for (int i = 0; i < lineList.size(); ++i) {
const float width = float(fm.width(lineList[i]));
const float right = float(fm.boundingRect(lineList[i]).right());
- const float lineWidth = qMax(width, right);
+ const float lineWidth = qMax(width, right) + float(m_sceneManager->m_viewportData.viewportDpr);
(*lineWidths)[i] = lineWidth;
if (float(boundingBox.width()) < lineWidth)
boundingBox.setWidth(qreal(lineWidth));
diff --git a/src/runtime/q3dstextrenderer_p.h b/src/runtime/q3dstextrenderer_p.h
index 842333f..2af0bfa 100644
--- a/src/runtime/q3dstextrenderer_p.h
+++ b/src/runtime/q3dstextrenderer_p.h
@@ -48,12 +48,14 @@
QT_BEGIN_NAMESPACE
class Q3DSTextNode;
+class Q3DSSceneManager;
class QFontMetricsF;
class QPainter;
class Q3DSTextRenderer
{
public:
+ Q3DSTextRenderer(Q3DSSceneManager *sceneManager);
void registerFonts(const QStringList &dirs);
QSize textImageSize(Q3DSTextNode *text3DS);
void renderText(QPainter *painter, Q3DSTextNode *text3DS);
@@ -71,6 +73,7 @@ private:
const QStringList &lineList, QVector<float> *lineWidths);
QVector<Font> m_fonts;
+ Q3DSSceneManager *m_sceneManager;
};
QT_END_NAMESPACE
diff --git a/src/runtime/q3dsuippresentation.cpp b/src/runtime/q3dsuippresentation.cpp
index 6a8ffb2..40392e0 100644
--- a/src/runtime/q3dsuippresentation.cpp
+++ b/src/runtime/q3dsuippresentation.cpp
@@ -3443,7 +3443,11 @@ int Q3DSTextNode::mapChangeFlags(const Q3DSPropertyChangeList &changeList)
for (auto it = changeList.cbegin(), itEnd = changeList.cend(); it != itEnd; ++it) {
if (it->nameStr() == QStringLiteral("textstring")
|| it->nameStr() == QStringLiteral("leading")
- || it->nameStr() == QStringLiteral("tracking"))
+ || it->nameStr() == QStringLiteral("tracking")
+ || it->nameStr() == QStringLiteral("size")
+ || it->nameStr() == QStringLiteral("font")
+ || it->nameStr() == QStringLiteral("horzalign")
+ || it->nameStr() == QStringLiteral("vertalign"))
{
changeFlags |= TextureImageDepChanges;
}