Jump to content

klepto2

Developers
  • Posts

    854
  • Joined

  • Last visited

Posts posted by klepto2

  1. The idea is very nice.

     

    Some hints from my point of view:

    - when using blitzmax, you don't need to provide the engine.dll

    - protect and pak your assets

    - write your own ingame gui, even if you want to integrate wikipedia, you may do this by manual parsing the page or

    by using something like Awesomium or Berkelium

    - i know the models are wip or placeholdes, but try to fix the materials of the palms.

     

    texture0="abstract::palm_fronds.dds"
    texture1="abstract::palm_frondsDOT3.dds"
    
    alphatest=1
    cullface=0
    
    shader="abstract::mesh_diffuse_bumpmap_sway.vert","abstract::mesh_diffuse_bumpmap_alphatest.frag"
    shadowshader="abstract::mesh_shadow_sway.vert","abstract::mesh_shadow.frag"
    

     

    - take a look on "Steering Behaviors For Autonomous Characters" at http://www.red3d.com/cwr/steer/

  2. It's done like this in Lua:

    test
    --[[
    test
    test
    test
    ]]--
    test

     

    I doubt he means this :rolleyes:

     

    I more believe he means a 2 menu items (toolbox and contextmenu) where you can comment/uncomment a bunch of code with just one click. Take a look at Visual Studio where this feature is embedded. (Blide has it as well, also most other IDEs).

  3. Ok, I think i have the reason. if you call renderworld the engine sends the opengl commands to the gfx card. This process is async and glSwapBuffers waits till the gfx card processed all commands. So the real rendering time is total + flip time.

  4. 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.

  5. 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 :rolleyes: .

     

    Click here to download this file

  6. 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.

  7. 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.

  8. 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

  9. 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.

  10. 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.

  11. 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.

  12. 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).

  13. 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());
    

  14. To be honest, i have the same problem with directx :huh:

     

    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...