Commit graph

332 commits

Author SHA1 Message Date
David Rowe
a782b6779a Merge branch 'master' into 21709
# Conflicts:
#	interface/src/ui/overlays/Overlays.h
#	interface/src/ui/overlays/Shape3DOverlay.cpp
#	libraries/entities/src/EntityItemProperties.cpp
#	libraries/entities/src/EntityScriptingInterface.h
2018-02-28 12:42:05 +13:00
humbletim
4d43e54346 use shared buffer_helpers::clone 2018-02-22 08:41:15 -05:00
SamGondelman
4c6169ec78 merge and a little cleanup 2018-02-20 15:45:34 -08:00
humbletim
5791ca4c51 interim checkin 2018-02-20 12:22:04 -05:00
David Rowe
67cfe783be Entity properties JSDoc 2018-02-19 12:17:31 +13:00
SamGondelman
5337377ef5 Merge remote-tracking branch 'upstream/master' into decals 2018-02-09 14:40:20 -08:00
SamGondelman
4d4294dd6a Merge remote-tracking branch 'upstream/master' into decals 2018-02-02 16:50:01 -08:00
SamGondelman
d7f4b033e8 wip finish adding material entity 2018-02-02 16:49:33 -08:00
humbletim
06afaa7470 BufferView <-> QVariant/QScriptValue conversion
update MeshProxy/SimpleMeshProxy and ScriptableModel

ModelScriptingInterface / scriptable::ModelProvider

integration

update to RC-63

initial graphics-scripting refactoring

graphics-scripting baseline commit

wip commit

Geometry -> MeshPart

remove SimpleMeshProxy

collapse graphics-utils -> graphics-scripting

scriptable::Model => scriptable::ScriptableModel
2018-02-01 16:30:29 -05:00
Olivier Prat
95882e0cde Merged with master 2018-01-24 10:51:54 +01:00
Olivier Prat
efa6a8c0b5 Merged with master 2018-01-17 15:49:46 +01:00
Olivier Prat
49549ced17 Fixed compilation with new shader system 2018-01-17 10:52:58 +01:00
Brad Davis
6a06bf405a Merge remote-tracking branch 'upstream/master' into android 2018-01-16 18:24:44 -08:00
Olivier Prat
3911ce59cc Scribe now outputs .h and .cpp. Need to change how shader source is referenced in C++ code 2018-01-16 19:02:12 +01:00
humbletim
08ccda9cfc rename libraries/model(src/model) -> libraries/graphics(src/graphics) 2018-01-16 12:44:44 -05:00
Sam Gateau
d6e771f01d Adding the batch as aprameter to the custom pipeline register to be able to make program through a call to runLamda in order to perform the make call in the present thread where the gl context is valid 2018-01-13 10:02:53 -08:00
Sam Gateau
331a8f3094 fixing the stencil not clearing correctly and shaders not compiled correctly in main thread 2018-01-13 01:00:10 -08:00
Olivier Prat
814de4ab81 Scribe now outputs shaders as cpp files. 2018-01-12 11:59:19 +01:00
Olivier Prat
bd666406f4 Removed glColor reset hack in MeshPartPayload and replaced it by a reset of the color attribute to white in the execution of the setInputFormat command of the various GLBackends 2017-12-19 14:17:17 +01:00
David Rowe
91671722a5 Add Shape API types JSDoc 2017-11-25 16:09:54 +13:00
luiscuenca
1791ed01ca add width param to vertex shader 2017-11-08 18:35:26 -07:00
luiscuenca
332cb48a41 Lasers and teleport scale with avatar 2017-11-07 16:57:55 -07:00
Andrew Meadows
2710dca37c fix rendering of Circles and Quads 2017-10-26 22:58:50 -07:00
LaShonda Hopper
d1ab1c5e26 [WL21389] Fixes issue with the ShapeData vert buffer offset (details below).
When computing the buffer view offset for ShapeData the vertex vector
size should be scaled by a single vec3 size as opposed to 2.

This fix is taken from PR discussion:
 https://github.com/1P-Cusack/hifi/pull/10

 Proposed by: Andrew Meadows <andrew@highfidelity.io>

Changes Committed:
    modified:   libraries/render-utils/src/GeometryCache.cpp
2017-10-24 14:16:25 -04:00
LaShonda Hopper
226d51b8f5 [WL21389] Fix scaling issue when computing hull point list (details below).
The entity dimensions should be scaled by 1 as opposed to 0.5.

Changes Committed:
    modified:   interface/src/Util.cpp
    modified:   libraries/render-utils/src/GeometryCache.cpp
    modified:   libraries/render-utils/src/GeometryCache.h
2017-10-24 14:16:25 -04:00
LaShonda Hopper
d027993ac0 [WL21389] Address code review feedback (details below).
* Renamed squared var to be consistent with format of others in the code base.
* Removed fabsf() that was accidentally left in.
* Reduced squared distance filter within GeometryCache::computeSimpleHullPointListForShape
  as suggested from 0.0025f to recommended 1.0e-6f (1mm^2).

Feedback Link:  https://github.com/highfidelity/hifi/pull/11336#pullrequestreview-70060918

Changes Committed:
    modified:   libraries/render-utils/src/GeometryCache.cpp
2017-10-24 14:16:25 -04:00
LaShonda Hopper
070660eb04 [WL21389] Switch to _positionView & filter dupe verts for ShapeInfo (details below).
* Adjusts GeometryCache::computeSimpleHullPointListForShape to utilize
  ShapeData::_positionView as opposed to _normalView.
** Also filters out duplicate points or points close enough to be considered
   duplicate vertices.  This provides ShapeFactory with better point data
   and should reduce hits to the dedupe pass within createConvexHull.

Tested:
* Octagon & Tetrahedron
** They looked better than the prior commit, behaved closer to their shape as opposed
   to cone or narrow cylinder like.

Note:
* These changes are based on debug info observations using the Octagon and
  discussion with Andrew Meadows via Slack & https://github.com/highfidelity/hifi/pull/11336#pullrequestreview-69939120

Changes Committed:
    modified:   libraries/render-utils/src/GeometryCache.cpp
    modified:   libraries/render-utils/src/GeometryCache.h
2017-10-24 14:16:25 -04:00
LaShonda Hopper
0ad95806e3 [WL21389] Update point list function in line with GeometryCache::ShapeData update.
Changes Committed:
    modified:   libraries/render-utils/src/GeometryCache.cpp
2017-10-24 14:16:24 -04:00
LaShonda Hopper
9d64a3b991 [WL21389] Fixes warnings from last commit (details below).
* Fixes int vs size_t comparison warning within ShapeInfo.
* Fixes unused var warning for shapeVerts local var within GeometryCache.

This should fix the mac & ubuntu builds.

Changes Committed:
    modified:   libraries/render-utils/src/GeometryCache.cpp
    modified:   libraries/shared/src/ShapeInfo.cpp
2017-10-24 14:16:24 -04:00
LaShonda Hopper
7f9ce5a4cd [WL21389][BuildFix] Minor refactor due to render-utils lib change (details below).
As of Commit b93e91b9, render-utils no longer knows about entity lib.
This commit adjusts for that by altering the signature of
GeometryCache::computeSimpleHullPointListForShape to take in portions
of ShapeEntityItem data as opposed to the entity pointer.

Fixes build failure mentioned in:
 https://github.com/highfidelity/hifi/pull/11336#issuecomment-333635794

Reviewed-by: Leander Hasty <leander@1stplayable.com>

Changes Committed:
	modified:   interface/src/Util.cpp
	modified:   libraries/render-utils/src/GeometryCache.cpp
	modified:   libraries/render-utils/src/GeometryCache.h
2017-10-24 14:16:23 -04:00
LaShonda Hopper
789b850846 [WL21389] Addresses feedback from PR #11336.
* Removes todos from ShapeEntityItem::shapeCalculator stub commit.
* Removes defined out debugging, as requested, from GeometryCache::computeSimpleHullPointListForShape.
* Moves cone handling to its own section for better contextual flow.

Changes Committed:
	modified:   libraries/entities/src/ShapeEntityItem.cpp
	modified:   libraries/render-utils/src/GeometryCache.cpp
2017-10-24 14:16:23 -04:00
LaShonda Hopper
8a4ac9ebc4 [WL21389] Resolves size_t vs int warnings in GeometryCache.
Reviewed-by: Kris Pivin <krispivin@1stplayable.com>

Changes Committed:
	modified:   libraries/render-utils/src/GeometryCache.cpp
2017-10-24 14:16:23 -04:00
LaShonda Hopper
070c664ff2 [WL21389] Add out of bounds safeguard to computeShapeInfo helper (details below).
* Switched direct map indexing to helper function which has out of bounds safeguard.
* Also updated GeometryCache::getShapeForEntityShape default fallback return from
  GeometryCache::NUM_SHAPES to GeometryCache::Sphere inline with general preference
  to act as if a shape is a sphere in the event of an error.

Changes Committed:
	modified:   libraries/render-utils/src/GeometryCache.cpp
2017-10-24 14:16:23 -04:00
LaShonda Hopper
5b50b362f1 [WL21389] WL21389 PR2: Representation of collision shapes need updating (details below).
This commit adds support for the polyhedrons and polygons sans
Torus and Quad which aren't currently supported within GeometryCache.

* Moves GeometryCache::_shapes from public to private scope
    * Nothing aside from the class should be directly altering this, only querying
    * Updated instances of direct referencing which looks to have been limited to prior
      testing of instancing and shapes.
* Adds an accessor function for ShapeData to GeometryCache
* Consolidates point list generation to helper function
    * GeometryCache::computeSimpleHullPointListForShape
* Moves GeometryCache::Shape to entity::Shape mapping to GeometryCache from
  RenderableShapeEntityItem
    * Adds conversion accessor to GeometryCache, GeometryCache::Shape getShapeForEntityShape
* Sets ShapeEntityItem::ShapeInfoCalculator callback committed earlier.
    * This helps circumvent the issue with library inclusion.  entity-render knows about
      entity; however, entity doesn't know about entity-renderer; however, GeometryCache
      data is needed within entity::ShapeEntityItem to compose the ShapeInfo point list data.
    * This callback is set up within Application::init of the Interface as it knows about
      both halves of the equation, and the callback needs to be setup prior to any entities
      collision data getting generated.
* Removes _type reset within ShapeInfo::setPointCollection
    * This should avoid any issues due to subversively setting the type or
      incorrectly setting the type as a tangential operation.
        * Audited instances of ShapeInfo::setPointCollection and all seemed to be
          calling the function immediately after having set the type via
          ShapeInfo::setParams
* Adds new ShapeType: SHAPE_TYPE_CIRCLE
    * This type is reserved for the circle which is now treated as a special
      type of Cylinder_Y with regard to collision as opposed to a simple hull.
    * Fixes the issue where jumping on a circle, at times, would
      result in the avatar sliding off towards an edge as if atop a
      squished cone.
* Also updates ShapeInfo::getType() to return ShapeType as opposed to int
    * Auditing calls showed that majority of places were comparing against ShapeType
    * ShapeType::_type is a ShapeType so returning the type explicitly
      is more consistent.
        * ShapeInfo file houses ShapeType enum so any file aware of ShapeInfo is aware of
          ShapeType enumeration.
* entity::Quad defaults to SHAPE_TYPE_ELLIPSOID
    * Like entity::Shape::Torus, entity::Shape::Quad is currently unsupported within
      GeometryCache::buildShapes.
    * Also it appears that a Quad shape can't be created within world via the creation menu.
        * There's no explicit option at present to create one.
        * Trying subvert the Cube/Box creation option to generate one results in an enforced
          stubby box as opposed to a quad.
    * Given the aforementioned points, entity::Shape::Quad will default to
      SHAPE_TYPE_ELLIPSOID as opposed to SHAPE_TYPE_BOX.
        * Added Todo regarding the shape being unsupported along with a notation to create
          a special ShapeType, SHAPE_TYPE_QUAD, for it should it be added in the future.
* Adds some comments and has some minor clean up.

Reviewed-by: Leander Hasty <leander@1stplayable.com>

Changes Committed:
	modified:   interface/src/Application.cpp
	modified:   interface/src/Util.cpp
	modified:   interface/src/Util.h
	modified:   libraries/entities-renderer/src/RenderableShapeEntityItem.cpp
	modified:   libraries/entities/src/ShapeEntityItem.cpp
	modified:   libraries/entities/src/ShapeEntityItem.h
	modified:   libraries/physics/src/ShapeFactory.cpp
	modified:   libraries/render-utils/src/GeometryCache.cpp
	modified:   libraries/render-utils/src/GeometryCache.h
	modified:   libraries/shared/src/ShapeInfo.cpp
	modified:   libraries/shared/src/ShapeInfo.h
	modified:   tests/gpu-test/src/TestInstancedShapes.cpp
2017-10-24 14:16:17 -04:00
Andrew Meadows
d9ba75ca72 fix warning about implicit cast from 64 to 32 bits 2017-10-11 06:07:07 -07:00
Andrew Meadows
886422cbef remove unused variable 2017-10-10 17:07:17 -07:00
Andrew Meadows
4bf99fe9d2 remove unused variable 2017-10-10 17:05:54 -07:00
Andrew Meadows
026195223a more correct use of BufferView in GeometryCache 2017-10-10 17:02:26 -07:00
Bradley Austin Davis
e42068f681 Merge branch 'master' into android_new 2017-09-26 14:31:29 -07:00
Bradley Austin Davis
b93e91b9f3 New android toolchain 2017-09-19 13:45:12 -07:00
SamGondelman
f68a588323 rename isAA isAntiAliased 2017-09-13 10:24:10 -07:00
SamGondelman
1b85a453ab working on text3d overlays and entities 2017-09-12 16:49:51 -07:00
SamGondelman
4a49801217 web overlays and entities are always nonAA 2017-08-24 14:23:21 -07:00
Chris Collins
2456126bcc Merge pull request #11157 from SamGondelman/tabletLayer
Render non-AA overlays correctly
2017-08-18 14:59:20 -07:00
Sam Gateau
d624413c14 Merge pull request #11189 from SamGondelman/line3DFix
Fix drawInFront overlays only rendering in left eye
2017-08-15 09:26:18 -07:00
SamGondelman
194b7d6655 warning 2017-08-14 16:08:07 -07:00
SamGondelman
8163430282 fix depth buffer issue that was messing with drawInFront, plus some small fixes to line3ds 2017-08-14 15:03:14 -07:00
SamGondelman
e4c954e862 merge from master 2017-08-10 16:30:33 -07:00
SamGondelman
353a3e8c68 properly fix AA stenciling 2017-08-10 16:07:40 -07:00
SamGondelman
96b179386f working on fixing non-AA overlays 2017-08-10 16:07:40 -07:00