|
Irritating error message
#416720
02/03/13 19:49
02/03/13 19:49
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
OP
Expert
|
OP
Expert
Joined: Jan 2002
Posts: 4,225
Germany / Essen
|
Hello Mr. Lotter, please have look at the following code snippet:
#include <acknex.h>
void main()
{
// level_load(NULL);
MATERIAL* m = mtl_create();
effect_load(m,"whatever.fx");
}
This will result in Video functions not available before first frame If you however uncomment the level_load instruction the snippet will work as expected though it is still executed before the first frame.
Always learn from history, to be sure you make the same mistakes again...
|
|
|
Re: Irritating error message
[Re: Superku]
#416726
02/03/13 20:50
02/03/13 20:50
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
OP
Expert
|
OP
Expert
Joined: Jan 2002
Posts: 4,225
Germany / Essen
|
AFAIK level_load does not take any frame at all to complete. You can also check the following snippet:
#include <acknex.h>
void main()
{
// level_load(NULL);
MATERIAL* m = mtl_create();
effect_load(m,"whatever.fx");
printf("total_frames = %d",(int)total_frames);
}
The total_frames variable is 0, regardless of the level_load ...
Always learn from history, to be sure you make the same mistakes again...
|
|
|
Re: Irritating error message
[Re: jcl]
#416766
02/04/13 11:43
02/04/13 11:43
|
Joined: Dec 2008
Posts: 1,218 Germany
Rackscha
Serious User
|
Serious User
Joined: Dec 2008
Posts: 1,218
Germany
|
@JCL: so why not initializing the videodevice before entering first frame?(or does this collide with presetting vars, for screensize etc)
MY Website with news of my projects: (for example my current Muliplayer Bomberman, GenesisPrecompiler for LiteC and TileMaster, an easy to use Tile editor) Sparetime-Development
|
|
|
Re: Irritating error message
[Re: jcl]
#416778
02/04/13 14:28
02/04/13 14:28
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
OP
Expert
|
OP
Expert
Joined: Jan 2002
Posts: 4,225
Germany / Essen
|
I'd then suggest changing the error message to "Video device not yet initialized". The current message implies that it is not possible at all to use effect_load before the first frame which is obviously not true.
Always learn from history, to be sure you make the same mistakes again...
|
|
|
|