PrdglSqrl
14-01-2008 18:35:47
Anytime I attempt to set a layers attribute, I get an Access violation.
When the error occurs, VC++ points to me the implementation of the function I tried calling. For instance, when I call layer->setMinimumSize(...), VC++ pops up grassloader.cpp and points to the first line in the function setMinimumSize(). Same for all the other functions of GrassLayer.
I don't know what would be causing this, I'm passing in appropriate values to the functions. 2 floats into setMinimumSize() for example.
The only thing that might be out of the ordinary is that I'm storing pointers to the layers in a map. (I want each layer to have a unique name)
The map is used in most of the BillboardSeeder's functions to obtain the pointer for a particular GrassLayer object. Other than that, i don't see any difference in the way I use the library. They are created just as they should be using:
GrassLayer* layer = loader->addLayer(material_name);
When the error occurs, VC++ points to me the implementation of the function I tried calling. For instance, when I call layer->setMinimumSize(...), VC++ pops up grassloader.cpp and points to the first line in the function setMinimumSize(). Same for all the other functions of GrassLayer.
I don't know what would be causing this, I'm passing in appropriate values to the functions. 2 floats into setMinimumSize() for example.
The only thing that might be out of the ordinary is that I'm storing pointers to the layers in a map. (I want each layer to have a unique name)
class BillboardSeeder{
private:
PagedGeometry* seeder;
GrassLoader* loader;
//vector<bool> animated;
map<string, GrassLayer*> layers;
};
The map is used in most of the BillboardSeeder's functions to obtain the pointer for a particular GrassLayer object. Other than that, i don't see any difference in the way I use the library. They are created just as they should be using:
GrassLayer* layer = loader->addLayer(material_name);