ÓÃCдµÄ3DÃÔ¹¬
Boss˵£¬Òª¿´OpenGL£¬¿´ÁË¿ìÒ»¸öÔ£¬×ÜËã³öÁ˸öÏñÑùµÄ¶«Î÷£¬ÓÃCдÁ˸ö3DÃÔ¹¬£¬
ËäȻֻÓÐ350ÐÐ
´úÂ룬²»¹ý±ßѧ±ßд£¬×ã×ãдÁËÒ»ÖÜʱ¼ä£¬»¹ÊÇСÓгɾ͸еģ¬»î»î»î£¡
Tips£ºÉÏÏÂ×óÓÒ¼ü¿ØÖÆÇ°½øºóÍËתÏò£¬¿Õ¸ñ¼üÇл»¸©ÊÓͼ£¬Êó±êÓÒ¼ü¸ü»»µØͼ£¨ËäȻֻдÁËÁ½
¸ö……£© ¼ÓÁ˵ãÒôÀÖ£¬ÃâµÃÌ«¹ýµ¥µ÷¡£
Ч¹ûͼ£º
#include<stdlib.h>
#include<stdio.h>
#include<GL/glut.h>
#include<GL/glaux.h>
#include<math.h>
#include<windows.h>
#pragma comment(lib, "glaux.lib")
#define PX_START 1.5
#define PY_START 1.5
#define UNITSTEP 0.2
#define ANGLE_START -45
GLuint Texture = 0 ;
float px = PX_START ;
float py = PY_START ;
int angle = ANGLE_START ; //ÐÐ×ß·½Ïò
int dir_x ; //ÐÐ×ß·½ÏòÏòÁ¿
int dir_y ;
int MAP_SIZE = 16 ;
char **map ;
int globalView = 0 ; //ÊÇ·ñ²é¿´¸©ÊÓͼ
char *map1[16] =
{
"HHHHHHHHHHHHHHHH",
"H H H",
Ïà¹ØÎĵµ£º
typedef ÉùÃ÷£¬¼ò³Æ typedef£¬ÎªÏÖÓÐÀàÐÍ´´½¨Ò»¸öеÄÃû×Ö¡£±ÈÈçÈËÃdz£³£Ê¹Óà typedef À´±àд¸üÃÀ¹ÛºÍ¿É¶ÁµÄ´úÂë¡£ËùνÃÀ¹Û£¬ÒâÖ¸ typedef ÄÜÒþ²Ø±¿×¾µÄÓï·¨¹¹ÔìÒÔ¼°Æ½Ì¨Ïà¹ØµÄÊý¾ÝÀàÐÍ£¬´Ó¶øÔöÇ¿¿ÉÒÆÖ²ÐÔºÍÒÔ¼°Î´À´µÄ¿Éά»¤ÐÔ¡£
µÚÒ»¡¢ËĸöÓÃ;
ÓÃ;һ£º
¶¨ÒåÒ»ÖÖÀàÐ͵ıðÃû£¬¶ø²»Ö»ÊǼòµ¥µÄºêÌæ»»¡£¿ÉÒÔÓÃ×÷ͬʱÉùÃ÷Ö¸ ......
Ç°¼¸Ìì¸ãÒ»¸öÏîÄ¿Éæ¼°µ½C/C++»ìºÏ±à³Ì£¬ÔÚKeilϱàÒëʱÌáʾ£º
error: #800:this declaration may not have extern "C" linkage
error: At end of source : #67:expected a "}"
µ±Ê±Á¢ÂíÏëµ½ÊÇCºÍC++±à³ÌʱÐèÒªextern "C"£¬ÂíÉÏÊÔÁËÊÔ£¬È»ºóÐû¸æʧ°Ü¡£
ÒòΪ˫»÷ºóÌáʾ³ö´íµÄµØ·½ÊÇtemplate<clase T>,ÒÔΪÊÇkeil²»Ö ......
ÎÒÖ»ÓÃÁËÆäÖеÄ15Ìõ£¬¾Í½ÚÊ¡ÁË40%µÄ¿Õ¼äÄØ£¬Ç¿ÁÒÍƼö
Ö÷Òª½²½²windows²Ù×÷ϵͳÔÚCÅ̿ռ䲻×ãµÄÇé¿öÏ£¬ÎÒÃÇ¿ÉÒÔͨ¹ýÄÇЩ¾ßÌåÊÖ¶ÎÀ´Ôö¼ÓCÅ̿ռ䡣
1.´ò¿ª“ÎҵĵçÄÔ”-“¹¤¾ß”-“Îļþ¼ÐÑ¡Ïî”-“²é¿´”-ÔÚ“ÏÔʾËùÓÐÎļþºÍÎļþ¼Ð”Ñ¡ÏîÇ°´ò¹´-“È ......
ÉùÃ÷£º±¾ÎÄתÔØ×Ô»¥ÁªÍø
Ò»¡¢Ö¸ÕëµÄÀàÐÍ
¶þ¡¢Ö¸ÕëËùÖ¸ÏòµÄÀàÐÍ
Èý¡¢Ö¸ÕëµÄÖµ»òÖ¸ÕëËùÖ¸ÏòµÄÄÚÔÚÇø
ËÄ¡¢Ö¸Õë±¾ÉíËùÕ¼¾ÝµÄÄÚÔÚÇø
1.Ö¸ÕëµÄÀàÐÍ£º
´ÓÓï·¨µÄ½Ç¶È¿´£¬ÄãÖ»Òª°ÑÖ¸ÕëÉùÃ÷Óï¾äÀïµÄÖ¸ÕëÃû×ÖÈ¥µô£¬Ê£ÏµIJ¿·Ö¾Í
ÊÇÕâ¸öÖ¸ÕëµÄÀàÐÍ¡£ÕâÊÇÖ¸Õë±¾ÉíËù¾ßÓеÄÀàÐÍ¡£ÈÃÎÒÃÇ¿´¿´ÒÔϸ÷¸öÖ¸ÕëµÄ
ÀàÐÍ£º
(1)int *ptr ......