问候you你们中的大多数人可能不认识我,那太好了,我找到了一个人,他现在至少可以通读我的名字,今天就可以认识我。 再次,大家好,我是@murshidhassen,我以一名学生的身份生活在网络上,他想向同伴学习,并向我的同伴传授任何对我有益的知识。 这些年来,我一直在尝试这样做。 这是我在网上想象的一个个人想法。
我一直认为,整个网络就像一本无限制作者的巨著。 我们都是具有不同颜色和图形的不同页面。 我们被安排在一个流程中。
有了这个,我看到了媒介的到来,并想到了向世界传授图形知识的想法。 图形在从可见到感觉的所有事物中都起着重要作用,如果我们对图形的理解不正确,图形就至关重要。 据我所知,我正在分享这篇文章。 本指南将让您知道从矢量坐标运行第一个基本图形应用程序(我将在接下来的系列中解释矢量坐标)。 我会将其作为链条链接给那些想了解3D图形更多信息的人。
为Open-GL设置工作环境的简单指南。

我在这里使用的是一个称为FreeGLUT的免费图形工具包。 您可以使用任何其他第三方OpenGL库。 只要库中存在这些功能,代码就可以正常工作。 我们的发展仍然是我最喜欢的环境之一。 我们将使用功能强大的Visual Studio。
从我的github上获取该库,或将其克隆到您的本地平台。 (请注意,这是一个完全完成的项目。正如我之前提到的,我们将首先坚持环境)
git clone https://github.com/MurshidMac/3D-OpenGLFootball-App.git
一旦提取并准备好文件。 我们需要的是OpenGL Pack。


那里有Freeglut库。 我们现在准备出发。 启动Visual Studio并启动一个新的Visual C ++项目。

可能会提示您进行一些配置。 继续按下一步。


按完成。 你完成了。 开发应用已准备就绪。

现在我们需要做的是让项目识别工具箱。
在此之前,让我们将此基本代码添加到$ APP_NAME.cpp中 (在我的情况下是Test App.cpp)。 我们将在接下来的会议中进一步讨论。
https://gist.github.com/MurshidMac/2c1bd8b684c85a7fb1ab54a243d482a3

来自项目浏览器。 右键单击3D Real Time App并转到属性。

C / C ++>常规>其他包含依赖项。 按编辑。



转到并找到目录Freeglut> Include> GL 。 选择文件夹。 下一集转到链接器>常规>其他库目录

编辑目录。


选择Freeglut> lib文件夹。 下一步链接器>输入>其他依赖关系


opengl32.lib freeglut.lib
添加这两行。
我们的最后一步是将OpenGL Pack中的freeglut.dll
包含到我们的项目中。

复制文件。 转到项目结构中的Debug文件夹

粘贴在那里freeglut.dll
让我们运行应用程序。

欢呼! 😄我们在这里。 您应该在控制台中看到“ Hello world”。 将会弹出一个窗口。
而已。 一切都准备就绪。 让我们在下一个会话中为游戏建模,并用代码弄脏我们的手。 快乐编码😊