| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1540 人关注过本帖
标题:问题收回,留下效果,有兴趣的看看。
只看楼主 加入收藏
观弈寒儒
Rank: 7Rank: 7Rank: 7
来 自:自 来
等 级:黑侠
帖 子:359
专家分:545
注 册:2011-1-9
收藏
得分:0 
以下是引用flyue在2011-4-9 13:12:37的发言:

aux的读BMP的函数有很大的BUG
建议你自己写BMP读取,最好是用开源图像文件库

nehe那本书上是这样用的,叫我这新手自己写有点为难啊。。。

事件记录,值得关注! http://bbs.bccn.net/z_court.php?fid=5
2011-04-09 13:16
flyue
Rank: 10Rank: 10Rank: 10
来 自:江南西道
等 级:贵宾
威 望:19
帖 子:3465
专家分:1563
注 册:2006-6-20
收藏
得分:0 
不要用这个函数读BMP

在WIN下开发程序,尽量使用VISUAL C++。这样编译错误信息也更加规范。

天之道,损有余而补不足.人之道则不然,损不足以奉有余.孰能有余以奉天下,唯有道者.
2011-04-09 13:17
观弈寒儒
Rank: 7Rank: 7Rank: 7
来 自:自 来
等 级:黑侠
帖 子:359
专家分:545
注 册:2011-1-9
收藏
得分:0 
以下是引用qq1023569223在2011-4-9 12:27:02的发言:

也许是因为像你那么懂图形编程的比较少吧,况且你那程序实在是太深奥了!

谢谢回帖,其实这不深奥,只是可能懂OpenGL的人比较少吧,还有你说的那个不是这个程序的问题。

事件记录,值得关注! http://bbs.bccn.net/z_court.php?fid=5
2011-04-09 13:18
观弈寒儒
Rank: 7Rank: 7Rank: 7
来 自:自 来
等 级:黑侠
帖 子:359
专家分:545
注 册:2011-1-9
收藏
得分:0 
以下是引用flyue在2011-4-9 13:17:41的发言:

不要用这个函数读BMP

在WIN下开发程序,尽量使用VISUAL C++。这样编译错误信息也更加规范。

这一刻我晕了,一个说用dev c++,一个又。。。。
算了,听你的,理论上你比那位仁兄强。。。

事件记录,值得关注! http://bbs.bccn.net/z_court.php?fid=5
2011-04-09 13:19
flyue
Rank: 10Rank: 10Rank: 10
来 自:江南西道
等 级:贵宾
威 望:19
帖 子:3465
专家分:1563
注 册:2006-6-20
收藏
得分:0 
网上有很多BMP读取代码,你应该合理GOOGLE,而不是为难。

这不是什么尖端技术,网上大把的有

天之道,损有余而补不足.人之道则不然,损不足以奉有余.孰能有余以奉天下,唯有道者.
2011-04-09 13:20
flyue
Rank: 10Rank: 10Rank: 10
来 自:江南西道
等 级:贵宾
威 望:19
帖 子:3465
专家分:1563
注 册:2006-6-20
收藏
得分:0 
如果实在为难,你可以考虑暂时不使用贴图。先用颜色填充一下,看看效果。

天之道,损有余而补不足.人之道则不然,损不足以奉有余.孰能有余以奉天下,唯有道者.
2011-04-09 13:22
观弈寒儒
Rank: 7Rank: 7Rank: 7
来 自:自 来
等 级:黑侠
帖 子:359
专家分:545
注 册:2011-1-9
收藏
得分:0 
哎。。。
最近虚拟机都不给力了,老是停止工作。。。不知道为什么

事件记录,值得关注! http://bbs.bccn.net/z_court.php?fid=5
2011-04-09 13:24
flyue
Rank: 10Rank: 10Rank: 10
来 自:江南西道
等 级:贵宾
威 望:19
帖 子:3465
专家分:1563
注 册:2006-6-20
收藏
得分:0 
其实你现在的问题是卡在glaux.lib上了,但是因为你使用的不是VC++,我也不清楚DEV C如何使用lib文件。

#pragma comment(lib, "glaux.lib")

天之道,损有余而补不足.人之道则不然,损不足以奉有余.孰能有余以奉天下,唯有道者.
2011-04-09 13:27
flyue
Rank: 10Rank: 10Rank: 10
来 自:江南西道
等 级:贵宾
威 望:19
帖 子:3465
专家分:1563
注 册:2006-6-20
收藏
得分:0 
虚拟机对3D的支持不是很好。建议不要在虚拟机里跑3D程序

天之道,损有余而补不足.人之道则不然,损不足以奉有余.孰能有余以奉天下,唯有道者.
2011-04-09 13:28
qq1023569223
Rank: 19Rank: 19Rank: 19Rank: 19Rank: 19Rank: 19
来 自:湖南科技大学
等 级:贵宾
威 望:26
帖 子:2753
专家分:13404
注 册:2010-12-22
收藏
得分:5 
With thanks to Kamil Saykali of the EdCenter:

This part will show how to install the glut libraries and dll's (to download it go to http://reality. )

1. After you have downloaded the glut.zip file (you should get the latest ver 3.7) unzip it into a folder

2. Inside the folder you should have:

glut.dll

glut32.dll

glut.h

glut.lib

glut32.lib

3. Copy both glut.dll and glut32.dll into your windows directory (windows or winnt, depends on if you are using Windows95/98 or Windows NT)

4. Copy your glut.h to:

<drive>:\<VC++ path>\include\GL\glut.h

*** put the drive where you installed VC++ instead of the <drive> ***

*** put the directory where you installed VC++ instead of the <VC++ path>

5. Copy your glut.lib and glut32.lib to:

<drive>:\<VC++ path>\lib\glut.lib

<drive>:\<VC++ path>\lib\glut32.lib

*** put the drive where you installed VC++ instead of the <drive> ***

*** put the directory where you installed VC++ instead of the <VC++ path>

6. That should be it for installed the glut libraries. The rest of this letter shows you how to setup VC++ so that you can use the glut libraries.

This will show you how to start up an opengl project and setup the setting so that you will be able to compile and run the program. This is assuming that you have already downloaded the appropriate files and installed them in the directories that there documentation tell you to. If you have not done that you need to do it before you can run or write an opengl program.

1. Start VC++ and create a new project.

2. The project has to be a "Win32 Console Application"

3. Type in the name of the project and where it will be on your hard drive.

4. Chose an empty project and click next or finish

5. First thing you need to do when the project opens up is to click on the "Project" menu item from the top.

6. Chose "Settings" (a window will come up)

7. On the left side of the window there are tabs, chose the "Link" tab

8. The string field labeled "Object/library modules" has a few lib files already set in it

9. Go to the end of this string field and enter:

opengl32.lib glut32.lib glu32.lib

10. Chose "OK" and that will include all the opengl libraries that you need

11. Now all you need to do is include <gl\glut.h> and you are ready to go
收到的鲜花
  • 观弈寒儒2011-04-09 13:43 送鲜花  10朵   附言:复制辛苦,加点分

   唯实惟新 至诚致志
2011-04-09 13:36
快速回复:问题收回,留下效果,有兴趣的看看。
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.017106 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved