File: hudtest.c

package info (click to toggle)
s3d 0.2.2.1-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,356 kB
  • sloc: ansic: 21,128; python: 488; perl: 98; makefile: 31; sh: 29
file content (31 lines) | stat: -rw-r--r-- 675 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// SPDX-License-Identifier: GPL-2.0-or-later
/* SPDX-FileCopyrightText: 2004-2015  Simon Wunderlich <sw@simonwunderlich.de>
 */



#include <s3d.h>
#include <unistd.h>  /*  sleep() */
#include <stdio.h>  /*  printf() */
static void mainloop(void)
{
	sleep(1);
}
int main(int argc, char **argv)
{
	int o, m;
	if (!s3d_init(&argc, &argv, "hud-test")) {
		if (s3d_select_font("vera"))
			printf("font not found\n");
		o = s3d_draw_string("hud-test", NULL);
		m = s3d_import_model_file("objs/star.3ds");
		s3d_translate(o, 0, 0, -5);
		s3d_link(o, 0);
		s3d_flags_on(o, S3D_OF_VISIBLE);
		s3d_flags_on(m, S3D_OF_VISIBLE);
		s3d_mainloop(mainloop);
		s3d_quit();
	}
	return 0;

}