PROC_LATE funktioniert nicht!

Posted By: Slin

PROC_LATE funktioniert nicht! - 01/05/08 22:55

proc_mode = PROC_LATE; funktioniert nicht. proc_mode = PROC_EARLY; funktioniert aber ohne Probleme.

Für mein Shadow Mapping platziere ich ein View immer an die Position von camera. Wenn ich die funktion für das Shadow Mapping nach der für die Kamera aufrufe ist die Position immer richtig, wenn ich PROC_EARLY setze, so wie es sein soll nicht mehr. Wenn ich allerdings die reihenfolge ändere, hängt die Position des Views auch wenn PROC_LATE gesetzt ist einen Frame hinterher.
Posted By: Joozey

Re: PROC_LATE funktioniert nicht! - 01/05/08 22:59

I've had problems with proc_late as well. Though I was unaware of it until now, I was already wondering why I needed both proc_late and proc_early to see results.
Posted By: jcl

Re: PROC_LATE funktioniert nicht! - 01/07/08 10:11

I can not confirm a problem with PROC_LATE.

Try the following: use a global variable and assign it different values in early, normal, and late functions. Then display the variable in a panel. It should always display the value assigned in the late function.

Otherwise please send me the project and I'll look into it.
Posted By: Slin

Re: PROC_LATE funktioniert nicht! - 01/07/08 13:53

Diese paar Zeilen geben bei mir 2 aus (es sollte 3 sein, wenn PROC_LATE funktioniert)!

Code:

var test_var;

PANEL* test_pan =
{
red = 0;
green = 0;
blue = 0;
digits(0,0,1.0,"Arial#500",1,test_var);

flags = VISIBLE,LIGHT;
}

void test_late()
{
proc_mode = PROC_LATE;
wait(1);
test_var = 3;
}

void test_early()
{
proc_mode = PROC_EARLY;
wait(1);
test_var = 1;
}

void test_normal()
{
wait(1);
test_var = 2;
}

void main()
{
test_late();
test_normal();
test_early();

vec_set(screen_color,vector(0,0,255));
}


Posted By: jcl

Re: PROC_LATE funktioniert nicht! - 01/08/08 15:06

Your test_normal function is missing

proc_mode = 0;

when you want to run it in the normal cycle.

Variables don't reset themselves, although this could be desired here. I'll probably implement autoresetting for proc_mode to prevent that other people make the same mistake.
Posted By: Slin

Re: PROC_LATE funktioniert nicht! - 01/08/08 15:13

Okay dann funktioniert alles richtig, das sollte aber unbedingt im manual erwähnt werden.

Danke
Posted By: TripleX

Re: PROC_LATE funktioniert nicht! - 01/08/08 16:33

An Autoresettings for proc_mode would be very very good. If not implemented EVERY function would need to have an proc_mode = 0; at the start to guarantee that proc_mode is working..

No nice style
Posted By: Christian__A

Re: PROC_LATE funktioniert nicht! - 01/11/08 18:05

Wie wäre es, anstelle von proc_mode die wait-Funktion zu erweitern: z.B.
wait(1,PROC_LATE) ?
© 2024 lite-C Forums