FireMonkey’s TCube & Tessellation

a cubeIf any of you had a look at FireMonkey’s TCube object, you might have noticed rendering it is quite slow and quite complex.

If you were curious enough to look at the code, you might have noticed that TCube is actually a static mesh made up of 452 vertices, 1440 indices and 480 triangles, instead of the 8 vertices and 6 quads (12 triangles) one could have expected.

(more…)

DWScript 2.2 beta

Delphi Web Script 2.2 is now in “beta”, and a DWS 2.2 Beta zip (337 kb)  is available.

No new features are expected up to the next stage (RC), only improvements to unit tests, to reach the psychological 90% code coverage milestone.

Changes since 2.2 preview 4:

  • extended “for in” syntax to work on all array types
  • support dynamic arrays new pseudo-method “IndexOf(item[, fromIndex])”
  • extended “in” operator to test presence of an item in an array: “item in dynamicArray” & “item not in dynamicArray”
  • support scoped enumerations for Delphi compatibility (“TMyEnum.Enum1”)
  • support “@” operator for explicitly obtaining function pointers
  • added TdwsBreakpointableLines class, which provides info about all source lines upon which a breakpoint is possible (useful for IDE “blue dots” support f.i.)
  • optimizations for “var” parameters and passing var parameters as var parameters
  • introduced minor optimization for multiple string concatenation (str1+str2+str3+…)
  • fixed dynamic array’s pseudo-method “.Add()” for arrays of delegates
  • improved unit tests coverage, various fixes (thanks again to Alexey Kazantsev)

For the curious ones looking at the SVN, there are actually other improvements and additions, but those aren’t ready just yet, and won’t be part of 2.2, but of 2.3.

A look at the 3D side of FireMonkey

This post was actually written sometime ago, alas XE2 Update 1 didn’t change much.

I’ve been looking at FireMonkey 3D side, by that I mean strictly the 3D side, not the UI components, or the 2D. Here are some observations, most born from maintaining and developing 3D software in C++ and later with GLScene, and with an eye to eventually porting some of GLScene code to FireMonkey (after all, most of GLScene’s code is actually linear algebra stuff, mesh manipulations, file format imports, etc. and not OpenGL-specific).

(more…)