Page 14 of 18 FirstFirst ... 41213141516 ... LastLast
Results 131 to 140 of 179

Thread: nxPascal

  1. #131
    Or better, open array (array of byte) with would be set with SetLength and some formula, like Width*Height*NumOfComponents (where width and height are obvious and NumOfComponents would be 1 for grayscale/indexed bitmaps, 3 for RGB and 4 for RGBA).

  2. #132
    Yeah, mentioned it also in my last post. I made some performance testing with allocmem vs setlength, and writing 1024x1024x4 arrays full of data. I couldn't find any notable speed differences, so i went and changed texture data use setlength-type dynamic array. That kind of arrays have always felt to be much more "in the core" of pascal, and i enjoy working with them much more than C-like alloc functions.

    SVN is updated with this change, and didn't notice any errors in demos still. It does always remind me about TexSet.LoadFromFile/SaveToFile procedures though. Haven't decided on file format still, but it might go to simple textfile, instead of any XML-like tags, or INI format. For some reason i'm not sure if internal class for ini-files is very optimal. I've just had some odd experiences where it might've taken 3 seconds for 1 tool settings window to close, when it saved a tiny file on hiding it.

  3. #133
    Ok, i will gonna try again.

    By internal you mean the Borland Inifiles.pas or your own?

    EDIT: Tested, no more "Range check error". Map editor seems happy also.
    Thank You for fixing it quickly.
    Last edited by hwnd; 25-06-2013 at 08:44 PM.

  4. #134
    Not sure of Borland, i meant FPC/Lazarus either one. But it's long ago and i can't replicate it. It was random back then, and i did something "odd" to make the problem go away ^_^ Well, text files are ok. It's just a list of texture filenames, pattern sizes... Also it's been a while since i updated the .zip files, like setting stable version from most recent SVN. I still wish to finish the 3D part of renderer before i do that. Renderer itself was a success, at least for everything i've tried it with 2D, and custom 3D.
    Last edited by User137; 25-06-2013 at 09:31 PM.

  5. #135
    I translated Simplex class from: http://staffwww.itn.liu.se/~stegu/si...plexNoise.java
    This is a noise generation algorithm, possibly more efficient than original Perlin noise. I have tested this to work with 2- to 4-dimensions on Lazarus and Delphi. Uploaded to SVN version, also viewable here:
    https://code.google.com/p/nxpascal/s...rc/nxNoise.pas
    This is quick screenshot from 4D-animation, on TBitmap:
    noise.jpg
    Fill rate is roughly 1250 point calculations per 1 millisecond. So even this small 400x300 screen is slightly laggy. However if purpose is to generate a game world, this is quite alot, i guess.

    Also uploaded demo zip with sources and win32 binary:
    https://docs.google.com/file/d/0B7FI...it?usp=sharing
    All related nxPascal files are included there, so it will compile even without rest of the library.
    Last edited by User137; 02-07-2013 at 09:46 PM.

  6. #136
    Found a problem (actually a while ago) with nx.rs.AddBlend command.
    On some machines it gives access violations when running examples.
    Read of address 00000000.

    I use my old laptop atm ( i have to) and it has: MOBILITY RADEON, AGP 16MB.

    I also used addblend in my editor but i had to disable it for this to run on my laptop here.
    The picking demo in nxPascal also has addblend and when i comment out nx.rs.AddBlend it works fine and no access violations.

    So i guess the host machine must be checked if video card supports that and only then enable it.
    Dunno, you decide. You can leave it as is also, if its possible for me to replace it with something then tell me also.

    To be honest i dont even know exactly what it does.
    Last edited by hwnd; 31-07-2013 at 09:41 PM.

  7. #137
    There is possibility that the old card doesn't support GL_FUNC_ADD_EXT. I have currently no checks for card capabilities, but it is possible to use this:
    Code:
    if nx.GLInfo('GL_FUNC_ADD_EXT') then // Card supports it...
    or nx.GetEXT to get list of all extensions in 1 string, for parsing many extension at the time.

    But i made a little code reordering because it was quick. That extension is only used for SubBlend, but blending was general purpose function for both. Now this extension will not be used with just addblend at all, because it is not needed. (It is needed if addblend is going to be used after subblend.) Try new SVN version. I did quick test on existing blending demos, and everything seemed to be in order still.
    (This doesn't make sub-blending work on those old, or should i say ancient, cards though. They are doomed to live without it Unless custom fragment shader can be used...)

  8. #138
    I have a new video to show you, of a new demo i'm adding to nxPascal:


    It comes with 2 versions; 1 with normal drawing commands, and 1 with custom shaders. Normal demos are fully done for Lazarus and Delphi, and i'm only fighting with bugs on shader demo. Once they're dealt with and i finalize shader effects, i'll upload them all to SVN. In the meantime you can test the compiled win32 version of the demo
    https://www.dropbox.com/s/wm275cn89k...lkers_demo.zip
    (Controls: hold left mousebutton and drag. F1 resets walkers.)

  9. #139
    Runs fine but all i see is this:
    I guess its the NPOT textures?
    Because sparks are 32x32


    My laptop again.

    I think that nxPascal drawing functions should check if gfx car supports NPOT textures and if not, scale them to nearest POT with some default mode. Maybe with the best mode or smthng.
    Last edited by hwnd; 11-08-2013 at 07:40 PM.

  10. #140
    Nice demo but i have this issue:

    >600 wolkers and move with app window = permanent framerate lost (from 62-63 to 6-8 FPS)

Page 14 of 18 FirstFirst ... 41213141516 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •