Jump to content

klepto2

Developers
  • Posts

    929
  • Joined

  • Last visited

Everything posted by klepto2

  1. It looks like you're using Fraps. Try to close Fraps and look if the result changes. Fraps inject the OpenGL dll and uses a custom Flip (glSwapBuffer) which may cause some slowdown.
  2. you can still use the extented dll which provides the Vegetation functions. Well, i need to add one which removes a single instance but anything else should work. http://www.leadwerks.com/werkspace/files/file/235-custom-engine-dll-2011-07-17/
  3. Hi, this is the result if you didn't copy the "JointLibrary.dll" into your application folder.
  4. [Edit] Forget it. My Fault. Long time not programmed with Maxgui.
  5. I have messed up the output path for this extensions. But it is included in the Bin/Release/Samples Path. You can use that one. But you also need to include TKOpenGL and the TKOpenGL.GLControl. I will work on documentation next week and have then 3 weeks of freetime to advance with the extensions.
  6. File Name: Extensions for LE.Net (including Samples) File Submitter: klepto2 File Submitted: 23 Jul 2011 File Category: Tools This is an early stage of my Extensions for LE.NET. These Extensions are fully independent of LE.Net but integrate flawlessly. The first release contains 4 Samples and the library binaries. The OOP extension shows how i wll add a pseudo oop layer to LE.NET (Extension methods) More will come soon ( I have holyday for a few weeks and so i have a bit more time to maintain them). All required assemblies should be included, if you find something missing or an error please let me know. I hope this will together with the now official supported .Net headers will push the Leadwerks .Net community into a new era . Click here to download this file
  7. this is a shader bug i postet a short time before in the bugtracker. Open the shader.pak and edit the 'Mesh/mesh_diffuse_fullbright.frag' and remove the line which defines texture 2 so that the file looks like this: #define LW_DIFFUSE texture0 #define LW_FULLBRIGHT include "mesh.frag" Also you need to copy the dlls and AwesomiumProcess.exe from Awsomium SDK into your output folder. Once the official .NET part is finished i will release a full Package with working Samples.
  8. This is mainly reverse engineered, but i have access to the original dll code and the sceneloader code (thx Josh). The scenloading is completely based on the original LoadScene command. The Vegetation functions are mainly exported directly as they are already accesable in Blitzmax, but 2 functions are done by looking into the Terrain Editing code snippet Josh posted in this forum.
  9. File Name: Custom Engine Dll (2011-11-14) File Submitter: klepto2 File Submitted: 17 Jul 2011 File Updated: 14 Nov 2011 File Category: Tools A custom engine dll, with extra funtionality added to the standard engine.dll. A lot of new functions (currently 67) were added and more will come. Currently it just comes with the dll and the wrapper sources for Leadwerks.Net and LE.Net and a list of new functions. Blitzmax will follow as soon as i have cleared some things with Josh ( the sceneloader uses original source code and i have to clarify if i'm allowed to publish this part or if i provide it as an extra module without source) Demos and samples will follow. [update 2011-08-08] Updated the dll to match Leadwerks Engine 2.5 Add 4 new functions void SceneLoaderDoProgress(Sceneloader sceneloader) // Alters Progress manually (needed when you not use the Leadwerks Flip command (eg forms controls) void InitSingleInstanceSystem(string path) // initialises A temporay path for the single instance system string LoadSingleInstanceMesh(string cs,Entity parent) // Loads a mesh as a single instance (same mesh, but different materials are possible) void ClearSingleInstanceSystem(int cf= 1) // Deletes the tempory folder or cleans the folder The single instance system is very simple but effective. Keep in mind to use this only if you really need it as it can break up performance when used to much. [update 2011-09-02] Added 3 new Functions one for removing Vegetation from the terrain and one to get all World Stats (BatchesDrawn etc.) float GetWorldStat(TWorld world,int stat) values for stat = 0 to 12 { 0 : batchdrawtime 1 : batchesdrawn 2 : entitiesdrawn 3 : entityculltime 4 : entitydrawtime 5 : lightsdrawn 6 : meshdrawtime 7 : octreeupdatetime 8 : rendertime 9 : terraindrawtime 10: vegetationdrawtime 11: TerrainSectorsDrawn 12: ShadowsDrawn } RemoveVegetation(TTerrain terrain, int layer, float x, float z, float radius) TModel LoadSingleInstanceModel(string cs,Entity parent) Version 2.5.0.2: -Fixed Cubemapping -Changed Framework to recycle already used buffers, which speeds up mutisized Viewport rendering - Added a C# sample for cubemapping Version 2.5.1: Based On latest LE Update (fixed TPick, etc) Click here to download this file
  10. After a second thought I agree with the internal approach which seems to be proven standard for Wrappers. Ok, the different imports in LE.Net and Leadwerks.Net i understand, but i never said that we should split the pInvoke into seperate classes, you can just split them into seperate files, this way it may be easier to find the correct place where to find the place to add new functions or change existing ones. I will post a sample soon.
  11. Very nice ! Works like a charm here on my work PC with a GTS 240. A little information: if you're using Blitzmax, you don't need to distribute the engine.dll.
  12. I have voted for other. i mainly use Leadwerks.Net but what drives me nuts is that the actual dll commands are internal and you can't access them outside. (Which is disturbing if you need to add a yet not implemented feature). I believe Leadwerks.Net should use LE.Net so you can seperate the engine and Leadwerks.Net commands and we only have to maintain one project which is handlicng directly with the engine.dll. Also it might be easier to extend current functionality. Also maybe seperating the whole DllImport stuff into different files (based on there use, eg: Terrain, Entity, etc) may help to organise the whole project better. Maybe we can start a new trunk with a class and file layout prototype.
  13. 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.
  14. 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.
  15. that is exactly the intention of implementing the funtionality into bmx and exporting it together with rest of LE in the engine.dll.
  16. 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
  17. Of course i can add this as well. I have already added the veg functions to the dll as I'm using this in C#, but before release i wanted to add some more functions which are maybe needed. The idea about the different dll names sounds practical and we should do this.
  18. I will write a short summary on how to use the vegetaion functions in blitzmax and also provide a new engine.dll extended with these functions soon. Note these functions are and will not be officially supported by Josh (as far as i know).
  19. The project can directly be included into your solution.
  20. https://awesomium.com/buy/
  21. Le.Net is located in the Asset Store: http://www.leadwerks.com/werkspace/files/file/185-lenet/ and Leadwerks.Net is located at assembla, details in this post: http://www.leadwerks.com/werkspace/topic/3300-leadwerksnet-wrapper/
  22. Hi, this is just a short blog to keep you informed. I have promised to upload a first version last weekend, but unfortunatly I wasn't able to do so. I'm currently working on a solution to provide the extended functionality to both .Net Wrappers (LE.Net and Leadwerks.Net) which is more difficult than i thought. I have already extended the engine.dll with some new functions which already work in both .Net Wrappers and i will hopefully be ready with a small package next week. So no worry about it, I'm still working on it. As a small cookie i have this: Nothing special you think, well maybe you're right, but the shown scene is not loaded via LoadScene not the vegetation is done via the Editor. The whole vegetation is done via code (new engine.dll functions, unoffically) At least I have a small poll to set my priority to the correct Wrapper (both will have the same functionality at the end, but i have to start with one) thx for reading.
  23. Here is the promised Sample (just a .cs file) and a first (Alpha stage) of 3 of my Leadwerks.Extensions Library. The input system maps the original Leadwerks functions into an eventbased system including missing up-commands. Leadwerks.Extensions.Alpha1.zip
  24. the webTexture needs to be the same size as the WebView and this part: if (m_webView.IsDirty() && !m_loading) { Rect r = m_webView.GetDirtyBounds(); RenderBuffer buffer = m_webView.Render(); UploadToTexture(buffer,r); } is important, otherwise the rect maybe undefined if the view isn't dirty, alternatively you can leave the rect out of the code and upload the whole renderbuffer to the texture. Gl.glTexSubImage2D(Gl.GL_TEXTURE_2D, 0, 0, 0, webTexture.Width, webTexture.Height, Gl.GL_BGRA, Gl.GL_UNSIGNED_BYTE, Buffer.GetBuffer());
  25. To be honest, i have the same problem with directx It just was a matter of 2 minutes to get awesomium working with LE. Of course you need some knowledge about handling Leadwerks textures with raw opengl, but than it is really simple. public void Render() { if (m_webView.IsDirty() && !m_loading) { Rect r = m_webView.GetDirtyBounds(); RenderBuffer buffer = m_webView.Render(); UploadToTexture(buffer,r); } } private void UploadToTexture(RenderBuffer buffer, Rect rect) { LE.BindTexture(m_rendertarget); int size =buffer.GetRowspan() / LE.TextureWidth(m_rendertarget); int ptr = (int)buffer.GetBuffer() + (rect.x) * size + (rect.y) * buffer.GetRowspan(); Gl.glTexSubImage2D(Gl.GL_TEXTURE_2D, 0, rect.x, rect.y,rect.width ,rect.height, Gl.GL_BGRA, Gl.GL_UNSIGNED_BYTE, (IntPtr)ptr); } As you see there is no real magic behind it
×
×
  • Create New...