Introducing TRefCountedObject
DWScript source code recently introduced a newcomer: TRefCountedObject.
This base class takes the place of TObject in dwsUtils, and is now present throughout the DWScript code. What it adds is, well, a manually reference-counted class.
Casting an Interface to a Class, the efficient way
Delphi 2010 added support for the “as” to cast an interface reference to its implementation class.
Here is an alternative that can help both performance and correctness.
Hello WebGL source code
With SmartMS v1.0.1 out you can now use WebGL!
Download HelloWebGL.zip (51 kB), it contains the first demo (in .opp form and pre-compiled), as well as the initial WebGLScene units which you’ll have to copy to your “Libraries” folder (the WebGL import units should have been delivered in v1.0.1).
- GLS.Vectors: contains vector manipulations types as well as a collection of helpers to operate on them.
- GLS.Base: contains Pascal classes to simplify basic OpenGL tasks revolving around buffers and shaders.
WebGLScene: something is brewing in the lab
This is an informal announcement that work has begun on WebGL and bringing some of GLScene browser-side!
If you’ve got a a WebGL-capable browser (see “compatibility” below) click on the following links to see it in action: