WIP: expect changes to public interfaces, missing features and bugs. Please feel free to open issues on missing functionality and changes to public interfaces.
Some basic examples are available in the example folder:
API documentation is available here.
This version includes a refactor of the geometry APIs and several related breaking changes:
IndexGeometryhas been renamed to
TriangleFan) has changed; the
countare now optional named parameters.
PointsPointViewno longer allow updates of their vertex indices directly. Instead the index list of the
PrimitiveSequenceon which they are defined needs to be updated.
index_geometrylibrary has been renamed to
geometric_primitiveslibrary has been removed; its contents were merged into the new
TriangleFan) now allow modification of the
countafter instantiation. This should help implement dynamic geometry, in which the index list size is overprovisioned initially such that later additional data can be added and the primitive sequence expanded (by increasing the
count) without having to recreate and rebind a new buffer for each change.
VertexArrayIterator were made private. These iterators provide nothing beyond
Iterator API and were cluttering the API documentation.
deprovisionSamplerhave been removed from
context.programResources.deprovisionand 'context.samplerResources.deprovision` instead.
samplerResourcesfields to allow manual management of resource provisioning/ deprovisioning.
autoProvisioningas an optional named parameter. When set to
false, BaGL will not automagically provision GPU resources for you. Instead resources should have been provisioned manually prior to the draw call (see change above).
This version refactors the rendering internals to make heavy use of
so as to only hold on to weak references to geometry, programs and samplers.
This means that once geometry, program and sampler objects become inaccessible
runtime. Importantly, any GPU resources that BaGL previously provisioned
for these objects will then also be freed by the runtime. This means that in
most cases, you do not have to worry about deprovisioning these resources
Matrix4now take separate
doublevalues for each translation direction rather than a single vector. This aligns the signature with the
Matrix4. These methods are no longer necessary with rl_matrix 0.6.0 and had no real function in BaGL. Use the
Frame.drawnow accepts uniform values of type
List<Struct>. These map to user defined struct types in GLSL shaders.
IndexGeometrynow takes a type parameter
Primitive(should be of type
Triangle) and extends
VertexArray.toBuilder()have been removed. For the moment I'm not sure they belong in this library and they introduce a lot of complexity. May be added back in at a later point in time.
attributeNameMaphave been reversed: keys should now be names as they appear in the shader program, values should be the name of the attribute on the geometry.
Frame.drawno longer allows missing attributes. If an attribute is active on the shader program, then the geometry must define a matching attribute (either by defining an attribute with the same name, or through a mapping provided by the
geometryprovided to a
Frame.drawcall may now define attributes that are not used by the shader program without raising an error.
Add this to your package's pubspec.yaml file:
dependencies: bagl: "^0.6.1"
You can install packages from the command line:
$ pub get
Alternatively, your editor might support
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
|0.6.1||Dec 7, 2016|
|0.6.0||Dec 5, 2016|
|0.5.0||Aug 30, 2016|
|0.4.0||Aug 24, 2016|
|0.3.1||Aug 16, 2016|
|0.3.0||Aug 11, 2016|
|0.2.0||Aug 2, 2016|
|0.1.1||Jul 12, 2016|
|0.1.0||Jul 12, 2016|
We analyzed this package on Jun 19, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Detected platforms: web
Fix analysis and formatting issues.
Analysis or formatting checks reported 2 errors 21 hints.
Strong-mode analysis of
lib/src/geometry/index_list.dartfailed with the following error:
line: 5 col: 7
Missing concrete implementations of 'Iterable.followedBy', 'Iterable.whereType', 'List.+', 'List.cast' and 4 more.
Strong-mode analysis of
lib/math.dartgave the following hint:
line: 7 col: 1
'dart.pkg.collection.equality' is deprecated and shouldn't be used.
Similar analysis of the following files failed:
Package is getting outdated.
The package was released 79 weeks ago.
The description is too short.
Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.
Package is pre-v1 release.
While there is nothing inherently wrong with versions of
0.*.*, it usually means that the author is still experimenting with the general direction API.
Maintain an example.
None of the files in your
example/directory matches a known example patterns. Common file name patterns include:
example.dartor you could also use
|Dart SDK||>=1.19.0 <2.0.0|