首先,你要到www.mesa3d.org下载源程序包,一般要用到两个包mesaLib.zip和mesaGLUT.zip。值得一题的是,和许多开源项目一样,Mesa3D也只是提供了源代码,并没有提供直接可用的二进制文件,使用者需要重新编译源代码来的到可以使用的二进制文件。下载完成之后,把两个包放在同一个目录下面,直接选择“解压到当前目录...”来解压两个包,默认情况下,两个包被解压到了同一个文件夹下面(比如,Mesa-7.0.3)。然后,按照“/Mesa-7.0.3/windows/VC8”路径找到Visual Studio 2005的解决方案文件(mesa.sln)。打开它,发现这个解决方案中有好多工程(一般是4个,gdi、glu、mesa、osmesa),什么设置也不用修改(默认是Debug目标,而不是Release,千万不要修改),直接分别在右边的“解决方案资源管理器”中右键单击各个工程项,选择“生成”。等待所有的工程都生成成功之后你可以从“/Mesa-7.0.3/lib”这个路径下面得到3个DLL文件(opengl32.dll、glu32.dll、osmesa32.dll)和对应的库文件(*.lib)。同样在“/Mesa-7.0.3/windows/VC8/progs/glut”路径下面,你可找到GLUT的工程文件(glut.vcproj),依照同样的方法,生成GLUT工程。之后可以在“/Mesa-7.0.3/lib”这个路径下找到glut32.dll以及相应的库文件。
这位兄台听谁说的?? 《OpenGL Super Bible 4th Edition》的“Wiggle: OpenGL on Windows”一节中提到Mesa3D属于Mini-Driver的一种,而对于Mini-Driver,该书做出了下面的阐述: Mini-Driver
A mini-driver is not a real display driver. Instead, it is a drop-in replacement for opengl32.dll that makes calls to a hardware vendor’s proprietary 3D hardware driver.Typically, these mini-drivers convert OpenGL calls to roughly equivalent calls in a vendor’s proprietary 3D API. The first mini-driver was written by 3dfx for its Voodoo graphics card. This DLL drop-in converted OpenGL calls into the Voodoo’s native Glide (the 3dfx 3D API) programming interface.Although mini-drivers popularized OpenGL for games, they often had missing OpenGL functions or features. Any application that used OpenGL did not necessarily work with a mini-driver. Typically, these drivers provided only the barest functionality needed to run a popular game. Though not widely documented, Microsoft even made an OpenGL to D3D translation layer that was used on Windows XP to accelerate some games when an ICD was not present. Fortunately, the widespread popularity of OpenGL has made the minidriver obsolete on newer commodity PCs.
刚好看到一本书《OpenGL Game Development》(2005)里面提到了OpenGL和Mesa的关系,随便看看:
Mesa is an opensource implementation of the OpenGL API created by Brian Paul. Although not officially endorsed by SGI, Mesa provides an OpenGL-like API to platforms that do not have a true OpenGL library from SGI.
When Mesa development began, Brian Paul had been granted permission by SGI to use the command structure and syntax of OpenGL. Because Mesa is not officially affiliated with SGI, there is no guarantee that source code written for Mesa will compile and run properly. Also, the name of the API could not use “Open” or “GL.” If you are wondering where the name Mesa came from, Brian has indicated on the official Mesa site that “the name Mesa just popped into my head one day.”
Although the Mesa documentation states that Mesa does not guarantee compatibility with OpenGL, it has passed conformance tests. From my experience, I’ve found that regular OpenGL runs properly under Mesa. The latest version of Mesa, version 5.0, is compatible with the latest release of OpenGL, version 1.4. Each major release of Mesa follows a minor release for OpenGL. The following timeline displays OpenGL and Mesa release dates for their respective versions. This timeline can come in handy for tracking the progress of both APIs.