summaryrefslogtreecommitdiffstats
path: root/o3d/samples/o3d-webgl/field.js
diff options
context:
space:
mode:
authorpetersont@google.com <petersont@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-12 21:00:00 +0000
committerpetersont@google.com <petersont@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-12 21:00:00 +0000
commite512583b79e366db399a6566964412bb6e5af823 (patch)
treee15e3c05e273a0366caf2fcbc5689ae377b3e877 /o3d/samples/o3d-webgl/field.js
parenta37a999f87eed77b08e7e1b6bdb86d406f31ea9b (diff)
downloadchromium_src-e512583b79e366db399a6566964412bb6e5af823.zip
chromium_src-e512583b79e366db399a6566964412bb6e5af823.tar.gz
chromium_src-e512583b79e366db399a6566964412bb6e5af823.tar.bz2
Added textures, texture samplers and render targets to o3d-webgl. Also fixed bugs, added calls to parent class constructor to classes that didn't have them before, added a few demos to exhibit/test textures and render surfaces.
Review URL: http://codereview.chromium.org/856004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41482 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/samples/o3d-webgl/field.js')
-rw-r--r--o3d/samples/o3d-webgl/field.js18
1 files changed, 13 insertions, 5 deletions
diff --git a/o3d/samples/o3d-webgl/field.js b/o3d/samples/o3d-webgl/field.js
index 5f82237..23058bf 100644
--- a/o3d/samples/o3d-webgl/field.js
+++ b/o3d/samples/o3d-webgl/field.js
@@ -37,7 +37,9 @@
* Buffer the Field's buffer property will be set to null.
* @constructor
*/
-o3d.Field = function() { };
+o3d.Field = function() {
+ o3d.NamedObject.call(this);
+};
o3d.inherit('Field', 'NamedObject');
/**
@@ -101,7 +103,7 @@ o3d.Field.prototype.setAt =
*
* @param {number} start_index index of the first value to get.
* @param {number} num_elements number of elements to read from field.
- * @returns {number} The values of the field.
+ * @return {number} The values of the field.
*/
o3d.Field.prototype.getAt =
function(start_index, num_elements) {
@@ -114,21 +116,27 @@ o3d.Field.prototype.getAt =
* A field that contains floating point numbers.
* @constructor
*/
-o3d.FloatField = function() { };
+o3d.FloatField = function() {
+ o3d.Field.call(this);
+};
o3d.inherit('FloatField', 'Field');
/**
* A field that contains unsigned integers.
* @constructor
*/
-o3d.UInt32Field = function() { };
+o3d.UInt32Field = function() {
+ o3d.Field.call(this);
+};
o3d.inherit('UInt32Field', 'Field');
/**
* A field that contains unsigned bytes.
* @constructor
*/
-o3d.UByteNField = function() { };
+o3d.UByteNField = function() {
+ o3d.Field.call(this);
+};
o3d.inherit('UByteNField', 'Field');