Need some help to finalize AmigaOS4 port of AssaultCube
#14
Trying to spend few hours on that latest render() stuff from "struct mesh" of vermodel.h file, and if i comment out all that part of code (whic i show above, these lines from redner() ) - no crashes, but no meshes. If i start to comment line by line, its sometime crashes on loading, sometime loads fine some level, but then crashes when i press "fire" first time.

Trying to put printfs after every lines, and it crashes in strange places. Have that:
Quote:conoutf("before if skin->bppt");
if(skin->bpp == 32 && owner->model->alphatest > 0)
{
conoutf("before if enablealphatest");
if(!enablealphatest) { glEnable(GL_ALPHA_TEST); enablealphatest = true; }
conoutf("before is lastalphatest");
if(lastalphatest != owner->model->alphatest)
{
conoutf("before glalphafunc");
glAlphaFunc(GL_GREATER, owner->model->alphatest);
conoutf("before owner->model->alphatest");
lastalphatest = owner->model->alphatest;
}
}
else if(enablealphatest) {
conoutf("after skin, before enablealphatest=false");
glDisable(GL_ALPHA_TEST); enablealphatest = false;
}
conoutf("before if enabledepthmask");
if(!enabledepthmask) { glDepthMask(GL_TRUE); enabledepthmask = true; }
conoutf("after if enabledepthmask");
}

And have in shell, that crash happens after many workins loops, and then last what i see:

conoutf("before if skin->bppt");

I trying to comment the whole part of that "if" loop, but still the same crashes..

Maybe meshes have different format in compare with other textures ? Maybe all that alpha-stuff can be buggy a bit ? Maybe someone can create a replacement withou all that ifs/etc, just somethink stoopid/static/hardcore, by which we can detect what is works, and what is not and why ? Or maybe some printfs with some details which will show some values which we can compare/check/etc ?

Its all of course in hope, that this render() from struct mesh are the main one.
Thanks given by:


Messages In This Thread
RE: Need some help to finalize AmigaOS4 port of AssaultCube - by kas1e - 13 Nov 10, 03:51PM