当前位置: 首页 > news >正文

西安做网站公司有哪些?襄阳建设网站首页

西安做网站公司有哪些?,襄阳建设网站首页,建筑设计单位有哪些公司,wordpress主题安装后空白Nehe的教程确实太老了#xff0c;不过我认为它也能够让我了解OpenGL3.2以前的管线渲染模式#xff0c;即使它在现在已经不常见了。因为想要了解#xff0c;所以我还是会看完Nehe的教程。 现在这是一个新的教程 - JoeyDeVries的教程#xff0c;可以说是网上最好的OpenGL教程…Nehe的教程确实太老了不过我认为它也能够让我了解OpenGL3.2以前的管线渲染模式即使它在现在已经不常见了。因为想要了解所以我还是会看完Nehe的教程。 现在这是一个新的教程 - JoeyDeVries的教程可以说是网上最好的OpenGL教程现在一步一步地来学习。我会在每个新的教程标题前面附加new旧的教程标题前面附加outdated。 glfw的函数都可以在这里找到。 在运行代码前需要先在项目属性-链接器-输入-附加依赖项中添加glew32s.lib、glfw3.lib、opengl32.lib。 代码如下 1 #include iostream2 3 // GLEW4 #define GLEW_STATIC5 #include GL/glew.h6 7 // GLFW8 #include GLFW/glfw3.h9 10 // Window dimensions 11 const GLuint WIDTH 800, HEIGHT 600; 12 13 void key_callback(GLFWwindow* window, int key, int scancode, int action, int mode) 14 { 15 std::cout key std::endl; 16 // When a user presses the escape key, we set the WindowSouldlose propert to ture 17 // closing the application 18 if (key GLFW_KEY_ESCAPE action GLFW_PRESS) 19 glfwSetWindowShouldClose(window, GLFW_TRUE); 20 } 21 22 // The MAIN function, from here we start the application and run the game loop 23 int main() 24 { 25 // Init GLFW 26 glfwInit(); 27 // Set all the required options for GLFW 28 glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); 29 glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); 30 glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); 31 glfwWindowHint(GLFW_RESIZABLE, GL_FALSE); 32 33 // Create a GLFWwindow object that we can use for GLFWs functions 34 GLFWwindow* window glfwCreateWindow(WIDTH, HEIGHT, OpenGL, nullptr, nullptr); 35 if (window nullptr) 36 { 37 std::cout Failed to create GLFW window std::endl; 38 glfwTerminate(); 39 return -1; 40 } 41 glfwMakeContextCurrent(window); 42 // Set the required callback function 43 glfwSetKeyCallback(window, key_callback); 44 // Set this to true so GLEW knows to use a modern approach to retrieving 45 // function pointers and extensions 46 glewExperimental GL_TRUE; 47 // Initialize GLEW to setup the OpenGL Function pointers 48 if (glewInit() ! GLEW_OK) 49 { 50 std::cout Failed to initialize GLEW std::endl; 51 return -1; 52 } 53 54 // Define the viewport dimensions 55 int width, height; 56 glfwGetFramebufferSize(window, width, height); 57 glViewport(0, 0, width, height); 58 59 // Game loop 60 while (!glfwWindowShouldClose(window)) 61 { 62 // Check if any events have been activiated (key pressed, mouse moved etc.) 63 // and call corresponding response functions 64 glfwPollEvents(); 65 66 glClearColor(0.2, 0.3, 0.4, 1.0f); 67 glClear(GL_COLOR_BUFFER_BIT); 68 69 // Swap the screen buffers 70 glfwSwapBuffers(window); 71 } 72 73 // Terminate GLFW, clearing any resources allocated by GLFW. 74 glfwTerminate(); 75 return 0; 76 }  转载于:https://www.cnblogs.com/clairvoyant/p/5575129.html
http://www.sadfv.cn/news/206762/

相关文章:

  • 卫计局网站建设工作总结国内重要新闻
  • 用ps如何做模板下载网站建设企业银行电脑版怎么下载
  • 东大桥网站建设tint wordpress
  • 零食电子商务网站建设策划书用邮箱地址做网站域名好吗
  • c 可以做网站嘛网上哪里有卖嗅探器
  • 钢材贸易网站建设电商物流建设网站过程
  • 简述网站建设的概念怎样弄微信公众号
  • cnzz网站建设wordpress 调用最新评论
  • 南京网站设计优化公司wordpress页面链接404
  • 重点建设学科网站ppt
  • 长沙企业如何建网站个人网页注册
  • 在哪做网站不要钱机械技术支持 东莞网站建设
  • wordpress站名在哪改企业网站ps模板
  • 做3d兼职网站公司主页图片
  • 建设厅网站上企业登录东营seo网站推广费用
  • 深圳教育网站建设清洁设备网站模版
  • 建设互联网教育网站河北省网站建设.
  • 专业网站设计公司婚庆公司网站的设计与实现
  • 建设主题网站的顺序是什么网站开发是怎么回事
  • 金华网站建设公司哪家好前端怎么做自己的博客网站
  • 网站做一个要多少钱集团网站建设
  • 网站开发资质网络产品推广方案范文
  • app定制开发价格济南网站建设yigeseo
  • 网站app在线生成器wordpress 自学
  • 织梦上网站次导航怎么做wordpress 重置
  • 做ui必要的网站视频素材库网站下载
  • 本地网站建设方案信息大全怎么做网站需求分析
  • 做阿里网站卖东西赚钱吗做一手机网站需要多少钱
  • 上海教育网站前置审批东莞营销网站建设哪个平台好
  • 凡科建站快车做网站推广赚钱吗