I’ve released new simple tool called PolyCount. It counts number of polygons in scene – optionally – All objects, Current layer or Selected only.
You can download it here
I’ve released new simple tool called PolyCount. It counts number of polygons in scene – optionally – All objects, Current layer or Selected only.
You can download it here
NextLimit will release their MaxwellRender in RC version today – as they promised last week. So we all are in expectations of new features, standalone gui and speed optimization (10x promised).
Details about RC are to be read here: http://www.maxwellrender.com/whitepaper/
Do you want to know more? Do you want to purchase a license? You’re welcome :)
I’ve released the new version of the Sunpos plugin. SunPos displays sun & moon position (azimuth, altitude angle) of given date/time and place. It’s usable for rendering tools. Shows a line of sun in views too.
download it here

The NextLimit company, inventor of Maxwell Render has set the date of final release – 1.0. The date is November, 22nd 2005.
from palm-dev e-mail list, credit goes to Logan Shaw
typedef struct
{
RectangleType bounds;
WinHandle savedbits;
} ProgBar;
void OpenProgressBar (ProgBar *progbar)
{
UInt16 savebitserror;
progbar->savedbits = WinSaveBits (& progbar->bounds, & savebitserror);
WinEraseRectangle (& progbar->bounds, 0);
}
void CloseProgressBar (ProgBar *progbar)
{
if (progbar->savedbits)
{
WinRestoreBits (
progbar->bounds.topLeft.x, progbar->bounds.topLeft.y,
progbar->savedbits);
}
else
{
/* maybe should enqueue a frmUpdateEvent instead, maybe not */
WinEraseRectangle (& progbar->bounds, 0);
}
}
void UpdateProgressBar (ProgBar *progbar, Int32 numerator, Int32 denominator)
{
RectangleType fillrect;
RctCopyRectangle (& progbar->bounds, & fillrect);
fillrect.extent.x = progbar->bounds.extent.x * numerator / denominator;
WinDrawRectangle (& fillrect, 0);
}
void TestProgressBar ()
{
Int32 i;
const Int32 max = 25;
ProgBar progbar;
progbar.bounds.topLeft.x = 20;
progbar.bounds.topLeft.y = 70;
progbar.extent.x = 120;
progbar.extent.y = 20;
OpenProgressBar (& progbar);
for (i = 0; i <= max; i++)
{
UpdateProgressBar (& progbar, i, max);
SysTaskDelay (SysTicksPerSecond() / 5);
}
CloseProgressBar (& progbar);
}
Load and initializing the library
#include
int MathLibRef = -1;
...
// is library already loaded?
err = SysLibFind("MathLib", &MathLibRef);
if (err != 0) {
// negative, load
err = SysLibLoad('libr', 'MthL', &MathLibRef);
if (err == 0) {
err = MathLibOpen (MathLibRef, 1);
}
}
Closing library
if (MathLibRef != -1) {
Err err;
UInt16 usecount;
err = MathLibClose (MathLibRef, &usecount);
if (usecount == 0) {
SysLibRemove (MathLibRef);
}
}
Preferences structure definition
typedef struct {
int skeletonData;
} Prefs;
Prefs prefs;
Open preferences
void startApp() {
Int16 prefSize = sizeof(Prefs);
if ((PrefGetAppPreferences (AppCreator,
1000, // pref database id
&prefs,
&prefSize,
true) // saved during Hotsync
== noPreferenceFound)
|| (prefSize != sizeof(Prefs))) {
// default initialization, since discovered
// Prefs was missing or old.
prefs.skeletonData=1;
}
}
Write preferences
void stopApp() {
PrefSetAppPreferences (AppCreator,
1000, // pref database id
1, // version of pref database
&prefs,
sizeof(Prefs),
true); // saved during hotsync
}
I’ve created (after some weird experiences with users in my hosting) small php patch (for version 4.3.10), which disables remote includes.This patch doesn’t work with Zend Optimizer enabled unfortunately :(
Download the patch there. After applying, see php.ini-dist and readme.security
example of bad code:
<?php $page = $_GET['page']; include ($page); ?>
example of better code:
<?php
// filter all unneeded characters
$page = eregi_replace("[^a-z0-9_]","", $_GET['page']).".inc.php";
// test if $page exists and is file
if (strlen($page) && @file_exists($page) && @is_file($page)) {
require_once ($page);
}
?>
Wanna be fired for your blog entries? Don’t write anything about your employer. Read more.
Steve Fossett landed (19:48:56 UTC) at Salina airport after successfull flight around the world. See more information at GlobalFlyer website.