video_mode = 0 ?

Posted By: Vorick

video_mode = 0 ? - 02/24/09 20:04

Hi there,

i recently discovered that it is possible to set

video_mode = 0;

As it appears, this is kind of a "non-DX"-mode and more like a console. Is it possible to use this mode for simple text output? And how would one achieve that?
Posted By: Xarthor

Re: video_mode = 0 ? - 02/24/09 20:31

I'm not sure but I think it was implemented on request of one or several users to be able to have a 3dgs server application which does not need any 3D hardware resource and yet can make some output (text). But I'm not sure how.
Maybe its possible about some use of "printf" or "draw_text", but I'm absolutely not sure about this.
Posted By: Vorick

Re: video_mode = 0 ? - 02/24/09 20:52

That's what i figured out too.

It seems that ANet is suggesting use of this mode, but even in their documentation they only refer to the 3dgs-docs in which I can't find anything about this specific mode.
Posted By: Quad

Re: video_mode = 0 ? - 02/24/09 21:27

use printf it will print to that white window thingy.
Posted By: Vorick

Re: video_mode = 0 ? - 02/24/09 21:46

Well okay, printf will open a message box popup, but thats quite inconvenient for live logging purposes, especially during development. I was hoping that mode 0 was working kinda like a real console window for text output.
Posted By: Quad

Re: video_mode = 0 ? - 02/24/09 22:08

oops it video_screen:

after setting video window to 0 and waiting 1 frame, it will print it like a real console:

Code:
void print1sec(){
	while(1){
		printf("Print!\n");
		wait(-1);
	}
}

void main(){
	video_screen = 0;
	wait(1);
	print1sec();
}




early demo of anet in action:(server and 4 clients)

Posted By: Vorick

Re: video_mode = 0 ? - 02/24/09 22:41

Ah, it's working. Thank you very much.
© 2024 lite-C Forums