A quick guide on how to develop the plugins in 1.5 vs. 1.3

The major difference in the VastPark Worlds platform v1.5 compared to v1.3 is that we've shifted from Direct X to OpenGL and in the process, we've removed SlimDX, so any calls to that assembly have to be changed. We've replicated all SlimDX's useful functions (matrices, vectors etc) in VastPark.FrameworkBase.Math, so most stuff you can just grab from there.

Also, texture loading has changed. It still uses the call:

public void Load(byte[] bytes, int width, int height);

However, while you used to be able to put the raw texture data in as the first parameter, now you must pass in the whole texture as a byte array, and only write the pure texture data when calling:

public void Write(byte[] bytes);

Here is an example of a plugin that generates an inworld media screen with src being the raw texture data:

To load:

 1             //just use an empty bitmap for now
 2             var bmp = new Bitmap(width, height, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
 3             byte[] bytes;
 4 
 5             using (var outMs = new MemoryStream())
 6             {
 7                bmp.Save(outMs, System.Drawing.Imaging.ImageFormat.Bmp);
 8                bytes = outMs.ToArray();
 9             }
10 
11             _OutputTexture = new Texture();
12             _OutputTexture.ID = Util.GenerateUniqueID();
13             _OutputTexture.SetParkEngine(parkEngine);
14             _OutputTexture.Parent = (backingElement as VastPark.Imml.IMaterialAppliable).MaterialGroups[-1];
15             _OutputTexture.Load(bytes, width, height);

And to write:

1           //writes raw pixel data to texture
2            _OutputTexture.Write(src);

Also,

1 ParkEngine.RenderEngine.SetTexture(Texture texture, IVisibleElement element, int group)

no longer needs to be called to assign a texture to a surface. Instead, the texture should have its parent set before loading, eg:

1    texture.Parent = anIMaterialAppliableElement.MaterialGroups[-1];
2    //or
3    anIMaterialAppliableElement.MaterialGroups[-1].Add(texture);