0

I am making a flash game using Flare3D and when i load a new scene it give me this error:

Error: Error #3691: Resource limit for this resource type exceeded.
    at flash.display3D::Context3D/createIndexBuffer()
    at flare.core::Surface3D/upload()[Z:\projects\flare3d 2\src\flare\core\Surface3D.as:237]
    at flare.core::Mesh3D/upload()[Z:\projects\flare3d 2\src\flare\core\Mesh3D.as:130]
    at flare.core::Mesh3D/draw()[Z:\projects\flare3d 2\src\flare\core\Mesh3D.as:335]
    at flare.basic::Scene3D/render()[Z:\projects\flare3d 2\src\flare\basic\Scene3D.as:593]
    at flare.basic::Scene3D/enterFrameEvent()[Z:\projects\flare3d 2\src\flare\basic\Scene3D.as:461]

I am guessing from the error that it is running of something, but I don't know what the Context3D.createIndexBuffer() does. Since flare3D is not open source I can't dig in for any clues there.

So i want to know: what is teh Context3D IndexBuffer, and what might make me run out of that resource type?

And please don't just link to the ASDocs for those classes, I have looked and they do not answer this question.

Plastic Sturgeon
  • 12,527
  • 4
  • 33
  • 47

1 Answers1

1

I could be wrong, but I'm guessing they are talking about the same Index Buffers that are used in OpenGL and DirectX. They are arrays of integers that are indices into a vertex array so that when drawing multiple polygons that share vertices, you don't have to specify the entire vertex every time.

This is a relatively good explanation: http://openglbook.com/the-book/chapter-3-index-buffer-objects-and-primitive-types/#toc-enter-index-buffers

I don't know anything about Flare3D, but is it possible that your scene has too many complex meshes and is running out of memory for index buffers?

NeoSkye
  • 495
  • 1
  • 5
  • 10
  • Skye - this sounds like the right path. I'm not averse to accepting this answer if noone else has better information on the limits of the IndexBuffer in flash Stage3D. – Plastic Sturgeon Apr 25 '12 at 23:55
  • That's exactly what they are. They are arrays on the video card. If you're running out of them, then you're most likely doing something pretty wrong. You shouldn't need to fill up so many of these that you run out. That said, you are not technically working with them yourself, the flash VM is doing it for you so, it could just be a crappy implementation on the flash side who knows. –  Apr 26 '12 at 01:37
  • Or you are requesting a new vertex buffer each frame or something... I think there is a cap on the number of vertex buffers at 4096/256mb – J. Holmes Apr 26 '12 at 11:12
  • This answer seems to be correct. The engine is not unloading geometry, causing it to crash eventually. I'll have to see if i can get it to unload everything correctly. – Plastic Sturgeon Apr 26 '12 at 16:27