Access violation AndorraDX93D.dll large image

General
robert83a1
2011-07-30
2013-05-14
  • robert83a1

    robert83a1 - 2011-07-30

    Hello,

    I've created a small demo with the spriteengine, used the imgeditor.exe to create the ail file and added images to it, created a few moving images , my image sizes are :

    640x480
    620x2945 ( pattern 155x155)
    200x100
    150x100
    100x50
    50x50
    560x113 ( pattern 140x159 )
    2560x960 ( pattern 640x480 )
    1420x820 ( pattern 355x41 )
    620x6200 ( pattern 155x155 )

    Using compressor DeVIL , this demo runs fine on my computer GeForce GTX285, but I get an access violation on computers with integrated gpu's . I get this access violation even if I try to load the ail file with these sizes… if I remove all images and only the 640x480 and smaller images are present it is fine.

    My problem is that I need my animations (worked a few days on em) . What can I do ? Obviously I'm doing something wrong…

    Robert

     
  • Andreas Stöckel

    Just read the FAQ:

    Question:
    The textures I load in my program need more graphic memory than they should and my application slows down.
    Answer:
    Probably you're using non-power of two textures. Because most graphic boards don't support those, Andorra 2D scales them up to power of two textures. That means: If you have a texture with the size 520x260, it will be scaled up to 1024x512 - That's four times more memory than you actually wanted to use. It would give much more performance if you resize your image to 512x256.

    Now just calculate how much memory a 620x6200 image really needs and remember that most graphics boards only support 2048x2048 as a maximum texture size…

     
  • robert83a1

    robert83a1 - 2011-07-30

    Thank you and sorry, meanwhile I found out that 2048x2048 is max I can go, will redo these things.

    Thank you!!!

     
  • robert83a1

    robert83a1 - 2011-07-31

    So I can safely use any texture size up till 2048 power of two combo. Like this
    64..128..256..512..1024…2048 in any combination (width , height) , it does not matter if I use any other resolution in between these it will be scaled to the nearest larger power of two one.

    So that means a background image with a size of 640x480 will also be scaled up to  1024x512 ?

    Rob

     
  • robert83a1

    robert83a1 - 2011-07-31

    Damn,

    Meanwhile I think I realized something… the Pattern Size as well must be the power of two right?

    Oh…guess I'll learn this the hard way…. will have to redo my nice little moon and other stuff … buhuhu …

    Robert

     
  • robert83a1

    robert83a1 - 2011-07-31

    Sorry me , again there is something I dont understand (sorry), but have to ask before starting to redraw everything…and ending up bad again… Now I'll recreate all my 70 images of the moon , with 128x128… the problem is … if I want to put this
    on a larger image file which I load with andorra 2d imageeditor into the ail file… Widht := 1024 , Height := 1408 … my pattern is 128x128 (70 patterns) . Will this be efficient…or I will end up wasting resources again… Sorry if this is a dumb question

     
  • robert83a1

    robert83a1 - 2011-07-31

    See no option to edit…but the complete movement of the Moon sprite is 157 Patterns 128x128 … I don't know how the pros do this… maybe I need to split the Image into Patterns of 49 for example to be 1024x1024 ?

     
  • robert83a1

    robert83a1 - 2011-07-31

    I just re-checked your first tutorial with the spriteengine, the entire bmp is 384x384, the Pattern size is 96x96 , now I was googling for a while for valid texture size , and I only came up with 16,32,64,128,256,512,1024,2048 etc…  does that mean 96x96 is not valid?

     
  • robert83a1

    robert83a1 - 2011-07-31

    And playing for a while it seems I'm limited to max PNG size 2048x2048 (regarldess of pattern size…) but in this 2048x2048 png I can put 256 128x128 patterns so not a big deal…my only problem is if I load this many objects with
         AdImageList.LoadFromFile('BackGround.ail');

    The memory for my program goes up to 50-60MB … which is a bit large for a single moving sprite .

    Rob

     

Log in to post a comment.