Possible bug with GrassLoader???


01-02-2008 17:23:19

I think I may have found some sort of bug with the paging in GrassLoader. Everything I'm doing is minimal, just what's needed to get the grass on the world, so I don't have any idea what would cause it, but here's an image that shows what happens.

Once I move so close to the missing page, it just pops up.

Hope that's enough info to debug this, because I don't know what else to describe to you.


01-02-2008 17:59:33

Why not include the code you wrote that reproduces the issue? :wink:


01-02-2008 18:08:59

I suppose I should. Unless the library has changed since I worte this code. It's basically just the minimum that is needed to display grass as shown in the PagedGeometry tutorials.

void BillboardSeeder::init(YEI3D* app, float pageSize, float cullDist){
seeder = new PagedGeometry(app->getCamera(), pageSize);
loader = new GrassLoader(seeder);

GrassLayer* BillboardSeeder::addLayer(string name, string mname){
if(layers.find(name) != layers.end())
return NULL;

GrassLayer* layer = loader->addLayer(mname);
layers[name] = layer;
return layer;

void BillboardSeeder::configureLayer(GrassLayer* layer, float minw, float minh, float maxw, float maxh, float density, FadeTechnique fadeTech, bool animated, float swaydist, float swaylen, float swayspd){
layer->setMinimumSize(minw, minh);
layer->setMaximumSize(maxw, maxh);

grass = new BillboardSeeder(this, 100, 100);
GrassLayer* l = grass->addLayer("grass", "grass");
grass->configureLayer("grass", 1, 1, 2, 2, 2, FADETECH_GROW);


03-02-2008 00:23:31

I tried the code you posted, and it seems to work fine. Can you reproduce the problem by modifying one of the examples and post the code for that? If not I can keep trying to find the problem myself.


04-02-2008 23:21:02

Due to school and work, I probably won't be able to find the time to do what you ask. But I feel like I should point out that I'm using your excellent library with the Editable Terrain Manager.

Perhaps it's a combination of the two that is causing the problem.