Jump to content

Part 3: extending not only .Net

klepto2

1,693 views

Hi Folks,

 

another small progress update I would like to share with you.

 

While working on extending the exported functionality of the dll i have discussed with some people here in the forum and I came to the conclusion that just extending the dll and program advanced parts in .Net is not really the best for the community. While some extensions will work only for .Net at first (eg Awesomium, full XBOX360 Controller support) most extension will be programmed fully in Blitzmax and exposed through multiple include files for Blitzmax users and an extended engine.dll for all other users.

 

eg I will convert my Sceneloader to Blitzmax and export the functions via dll.

For those who haven't seen it yet:

 

Sceneloading with accurate progress support (the 102% bug is already resolved :) )

 

Also I can already show you a temporary state of the reapidly growing function list which are already added to the dll:

IntPtr CreateCubebuffer(Texture cubemap,Buffer cubemapbuffer)
void ActivateCubeBufferFace(Cubebuffer cubebuffer,int face= 0)
void DeactivateCubeBuffer(Cubebuffer cubebuffer)
IntPtr CreateCubemap(int width,int height)
int SetVegetationModel(Terrain terrain,string file,int Index= 0)
int SetVegetationDensity(Terrain terrain,float density,int index= 0)
float GetVegetationDensity(Terrain terrain,int index=0)
int GetVegetationShadowMode(Terrain terrain,int index=0)
int SetVegetationRandomTilt(Terrain terrain,float tilt,int index=0)
float GetVegetationRandomTilt(Terrain terrain,int index=0)
int SetVegetationRandomRotation(Terrain terrain,float rotation,int index=0)
int GetVegetationRandomRotation(Terrain terrain,int index=0)
int SetVegetationRandomScale(Terrain terrain,float scale,int index= 0)
float GetVegetationRandomScale(Terrain terrain,int index=0)
int SetVegetationLODDistance(Terrain terrain,float dist,int index=0)
float GetVegetationLODDistance(Terrain terrain,int index=0)
int SetVegetationViewRange(Terrain terrain,float Range,int index=0)
float GetVegetationViewRange(Terrain terrain,int index=0)
int SetVegetationAlignment(Terrain terrain,int Mode,int index=0)
int GetVegetationAlignment(Terrain terrain,int index=0)
int DistributeVegetation(Terrain terrain,int index=0,int aligntoslope=0)
void DeleteVegetation(Terrain terrain,int index=0)
void GenerateColorMap(Terrain terrain,int resolution)
void SetLayerCollisionType(Terrain terrain,int layer,int _type)
void SaveVegetation(Terrain terrain,string file,int Index)
void LoadVegetation(Terrain terrain,string file,int Index)
void AddVegetationInstance(Terrain terrain,float x,float z,int layer,float density,int randrotation,float randscale,int aligntonormal,float tilt)
void SetTerrainBaseMap(Terrain terrain,Texture texture)
int SetMaterialBlendMode(Material material,int mode)
int GetMaterialBlendMode(Material material)
int SetMaterialBumpScale(Material material,float Scale)
float GetMaterialBumpScale(Material material)
int SetMaterialCastShadows(Material material,int enabled)
int GetMaterialCastShadows(Material material)
int SetMaterialColorMask(Material material,int enabled)
int GetMaterialColorMask(Material material)
int SetMaterialCullFace(Material material,int enabled)
int GetMaterialCullFace(Material material)
int SetMaterialDepthMask(Material material,int enabled)
int GetMaterialDepthMask(Material material)
int SetMaterialDepthTest(Material material,int enabled)
int GetMaterialDepthTest(Material material)
int SetMaterialGloss(Material material,float gloss)
float GetMaterialGloss(Material material)
int SetMaterialInvisible(Material material,int enabled)
int GetMaterialInvisible(Material material)
int SetMaterialOverlay(Material material,int enabled)
int GetMaterialOverlay(Material material)
int SetMaterialSpecular(Material material,float specular)
float GetMaterialSpecular(Material material)
int SetMaterialStipple(Material material,int enabled)
int GetMaterialStipple(Material material)
int SetMaterialZsort(Material material,int enabled)
int GetMaterialZsort(Material material)

 

Total extensions: 54

 

A lot of functions will be added in the next days and i have a lot of ideas about additional helper functions and additions all Leadwerks user should benefit from.

 

thx for reading

 

klepto2



11 Comments


Recommended Comments

//eg I will convert my Sceneloader to Blitzmax and export the functions via dll.

 

Any chance to get normal C++ DLL?

Share this comment


Link to comment

that is exactly the intention of implementing the funtionality into bmx and exporting it together with rest of LE in the engine.dll.

Share this comment


Link to comment

That' neat ;)

 

How do the vegetation functions work? Are you manually creating .sbx and raw files and then loading them with LoadScene()?

Share this comment


Link to comment

no, I have written my own sceneloader which is shown in the video. The vegetation functions are real engine functions. They are already integrated since Josh has added the new vegetation system but he never offically support them and so he never exposed them to the public. In short the vegetatio nare native inbuilt functions and no hack with temorary sbx files or the like.

Share this comment


Link to comment

Blimey. The best thing since sliced bread for scene loading.

 

What is?...

  IntPtr CreateCubemap(int width,int height)

Share this comment


Link to comment

its an inherent command in LE just not documented anywhere and I assume not exposed to anything other than bmax and lua.

Share this comment


Link to comment

to be honest, I don't have source access (apart from small snippets Josh helped me out to fix some sceneloading issues, thx Josh). Even if you don't have source acces but using Blitzmax combined with blide you have access to much lower level function of Leadwerks. And with this in mind i explored some of the "hidden" functions and added them to the dll.

Share this comment


Link to comment

Ah, I see.. I was considering buying the source and was about to ask for your opinion on memory mapped files etc. how hard would it be to implement and such.. no matter, I still appreciate the effort and looking forward to what you'll bring us ;)

Share this comment


Link to comment

// reapidly growing function list which are already added to the dll:

 

is this DLL avaivable?

Share this comment


Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...