summaryrefslogtreecommitdiff
path: root/main.c
blob: 891c9c0e4441954a4930418cc366429e4dcccf4a (plain)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#include <stdio.h>

#include "screen.h"
#include "fifo.h"
#include "object.h"

#include "nouveau_class.h"

#include "test_nops.h"
#include "context_surface_2d.h"
#include "imageblit.h"
#include "tcl_init.h"
#include "tcl_triangle.h"

/* Choose your NV3X TCL engine */
#define CLASS_3D	NV30TCL
/*#define CLASS_3D	NV34TCL
#define CLASS_3D	NV35TCL*/

int main(int argc, char **argv)
{
	if (screen_open(2960, 1050, 32)!=0) {
		return -1;
	}

	if (fifo_open()!=0) {
		screen_close();
		return -1;
	}

	if (object_list_create(CLASS_3D)!=0) {
		screen_close();
		return -1;
	}

	/*test_nops();*/

	clip_rectangle_init();
	context_surface_2d_init();
	image_pattern_init();
	raster_op_init();
	imageblit_init();

	/* FIXME: this does not work */
	imageblit_copy(viewport_x,viewport_y,
		viewport_x+(viewport_w>>2),viewport_h+(viewport_h>>2),
		viewport_w>>2, viewport_h>>2
	);

	/* mandatory, or we get PFIFO_CACHE_ERROR */
	tcl_init();
	/*tcl_clear();*/

	/* FIXME: none work atm */
	/*tcl_triangle_fixed();*/
	/*tcl_triangle_vtxattr();*/

	printf("coincoin\n");

	screen_close();
	return 0;
}