Home | Forums | What's new | Resources | |
please help |
Daniel Eriksson - Apr 26, 2003 |
vreuzon | Apr 27, 2003 | |||||||
1. You should put your "slPutPolygon" in the while(1){} loop, for your cube to be displayed at each synch/refresh, not only at the first time. The slprint is not concerned: its plane is not blanked by a slsynch. 2. I think your "sleepuntilbutton" function is never called. 3. if you want your
Code:
to test if X button of the first pad is pressed, you should try :
Code:
Does it work, then ? |
Daniel Eriksson | Apr 27, 2003 | |||
Thanks! That helped, but its still seems to be some data missing from the polygon? It lists some things missing when i try to compile. |
vreuzon | Apr 27, 2003 | |||
what is missing ? |
Daniel Eriksson | Apr 27, 2003 | ||||
Code:
This is how the code looks right now. When i try to compile it i get these errors : main.c:33: `point_model00´ undeclared here (not in function) main.c:33: initializer element for `xpdata_poly1[0]´is not a constant And the same goes for some other lines in the program. |
vreuzon | Apr 28, 2003 | |||||||
1. In the XPDATA (or PDATA) structure, you have to put references to *your* POINTS, POLYGONS and ATTRIBUTES, like that :
Code:
2. The poly1 you use in
Code:
is never defined. You named what you want to display xpdata_poly1. You have to use it. 3. Be sure to understand the differencies between the XPDATA and PDATA structure types. If you want to use XPDATA, you should use slPutPolygonX; PDATA is to be used with slPutPolygon. I believe slPutPolygonX is only provided with the most recent versions of the SGL, in order to make realtime gouraud shading easier. Try one of the TORUS example (can't remeber which one). |
Djidjo | Apr 28, 2003 | |||
Polygons suck. Sprites rock. |
Djidjo | Apr 29, 2003 | |||
Pardon me, I made a mistake : polygons are great, *I* suck. I apologize, I crawl and kiss the feets of the great vreuzon, I owe him everything. |