Facebook Sharer
选择您要替换的背景颜色:
【农历新年】背景图片:
个性化设定
 注册  找回密码
查看: 1462|回复: 3
打印 上一主题 下一主题

Microsoft Visual C++

[复制链接]

18

主题

0

好友

255

积分

支柱会员

Rank: 4Rank: 4Rank: 4Rank: 4

跳转到指定楼层
1#
发表于 2010-8-16 12:44 PM |只看该作者 |倒序浏览
为什么不能 run 以下的 coding??
我用 Microsoft Visual C++ 2008。。
谁能帮我。。。


/* ex4.c */
#include <GL/glut.h>
void display (void)  {
/* Called when OpenGL needs to update the display */
     glClear (GL_COLOR_BUFFER_BIT); /* Clear the window */
     glLoadIdentity ();
     gluLookAt (0.0, 0.0, 0.5, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0);

     glBegin (GL_LINE_LOOP); /* Draw a triangle */
     glVertex3f(-0.3, -0.3, 0.0);
     glVertex3f(0.0, 0.3, 0.0);
     glVertex3f(0.3, -0.3, 0.0);
     glEnd ();
     glFlush (); /* Force update of screen */
}

void keyboard  (unsigned char key, int x, int y)  {
/* Called when a key is pressed */
     if (key == 27) exit (0); /* 27 is the Escape key */
}

void reshape  (int width, int height)
{ /* Called when the window is created,  moved or resized */
          glViewport  (0, 0, (GLsizei) width, (GLsizei) height);
          glMatrixMode (GL_PROJECTION); /* Select the projection matrix */
          glLoadIdentity (); /*Initialise it */
          glOrtho(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0); /* The unit cube */
          glMatrixMode (GL_MODELVIEW); / Select the modelview matrix */
}

int main (int argc, char **argv)  {
     glutInit (&argc, argv); /* Initialise OpenGL */
     glutInitWindowSize (500, 500); /* Set the window size */
     glutInitWindowPosition (100, 100); /* Set the window position */
     glutCreateWindow (“ex4”); /* Create the window */
     glutDisplayFunc (display); /* Register the “display” function */
     glutReshapeFunc (reshape); /* Register the “reshape” function */
     glutKeyboardFunc (keyboard); /* Register the “keyboard” function */
     glutMainLoop (); /*  Enter the OpenGL main loop */
     return 0;         
}
/*end of ex4.c */




收藏收藏0

18

主题

0

好友

255

积分

支柱会员

Rank: 4Rank: 4Rank: 4Rank: 4

2#
发表于 2010-8-16 12:50 PM |只看该作者
\Debug\code.exe.intermediate.manifest : general error c1010070: Failed to load and parse the manifest. The system cannot find the file specified.

出现以上的 ERROR。。


回复

使用道具 举报

2

主题

0

好友

251

积分

支柱会员

Rank: 4Rank: 4Rank: 4Rank: 4

3#
发表于 2010-8-17 10:38 PM |只看该作者
没用过openGL...
不过如果是manifest problem 的话通常先做以下步骤:

clean 然后rebuild
solution name 改短。。
project->properties,link->manifest turn off
最后在不行的话,recreate new project,然后把code copy过来build.


回复

使用道具 举报

0

主题

0

好友

15

积分

初级会员

Rank: 1

4#
发表于 2010-9-12 10:47 PM |只看该作者
很复杂,看不明


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

JBTALKS.CC |联系我们 |隐私政策 |Share

GMT+8, 2024-6-7 01:17 AM , Processed in 0.104889 second(s), 26 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

Ultra High-performance Dedicated Server powered by iCore Technology Sdn. Bhd.
Domain Registration | Web Hosting | Email Hosting | Forum Hosting | ECShop Hosting | Dedicated Server | Colocation Services
本论坛言论纯属发表者个人意见,与本论坛立场无关
Copyright © 2003-2012 JBTALKS.CC All Rights Reserved
合作联盟网站:
JBTALKS 马来西亚中文论坛 | JBTALKS我的空间 | ICORE TECHNOLOGY SDN. BHD.
回顶部