| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2009, Google Inc. | 2 * Copyright 2009, Google Inc. |
| 3 * All rights reserved. | 3 * All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 pack.destroy() is effectively almost the same as this. | 57 pack.destroy() is effectively almost the same as this. |
| 58 | 58 |
| 59 \code | 59 \code |
| 60 var objectsInPack = pack.getObjectsByClassName('o3d.ObjectBase'); | 60 var objectsInPack = pack.getObjectsByClassName('o3d.ObjectBase'); |
| 61 for (var ii = 0; ii < objectsInPack.length; ++ii) { | 61 for (var ii = 0; ii < objectsInPack.length; ++ii) { |
| 62 pack.removeObject(objectsInPack[ii]); | 62 pack.removeObject(objectsInPack[ii]); |
| 63 } | 63 } |
| 64 \endcode | 64 \endcode |
| 65 | 65 |
| 66 The only difference is that after all the objects are removed the pack | 66 The only difference is that after all the objects are removed the pack |
| 67 itself will be released from the client. See documenation on | 67 itself will be released from the client. See documentation on |
| 68 pack.removeObject for why this is important. | 68 pack.removeObject for why this is important. |
| 69 | 69 |
| 70 It's important to note that many objects are only referenced by the pack. | 70 It's important to note that many objects are only referenced by the pack. |
| 71 Textures, Effects, Materials, for example. That means the moment you call | 71 Textures, Effects, Materials, for example. That means the moment you call |
| 72 pack.destroy() those objects will be freed. If the client then tries to | 72 pack.destroy() those objects will be freed. If the client then tries to |
| 73 render and some objects are missing you'll immediately get an error. | 73 render and some objects are missing you'll immediately get an error. |
| 74 %] | 74 %] |
| 75 void Destroy(); | 75 void Destroy(); |
| 76 | 76 |
| 77 %[ | 77 %[ |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 \param raw_data The RawData to create the texture from. | 302 \param raw_data The RawData to create the texture from. |
| 303 \param generate_mips True if you want O3D to generate mip maps for the | 303 \param generate_mips True if you want O3D to generate mip maps for the |
| 304 texture. | 304 texture. |
| 305 \return the Texture | 305 \return the Texture |
| 306 %] | 306 %] |
| 307 Texture? CreateTextureFromRawData(RawData raw_data, | 307 Texture? CreateTextureFromRawData(RawData raw_data, |
| 308 bool generate_mips); | 308 bool generate_mips); |
| 309 }; // Pack | 309 }; // Pack |
| 310 | 310 |
| 311 } // namespace o3d | 311 } // namespace o3d |
| OLD | NEW |