OpenGL Programming Guide 9th Edition以及随书源代码

OpenGL Programming Guide 9th Edition以及随书源代码

阅读OpenGL程序指导的书,没得代码很头疼,于是在网上找了一个。
下面是编译过程
下载opengl的环境:

sudo apt-get install build-essential libgl1-mesa-dev
sudo apt install libglu1-mesa-dev 
sudo apt install libopengl0 
sudo apt install mesa-common-dev 
sudo apt install libgl1-mesa-dev 
sudo apt install libglu1-mesa-dev 
sudo apt install freeglut3-dev  # 没有找到 gl/glut.h 头文件

代码在编译的时候出现的错误

undefined reference to symbol ‘XConvertSelection’ to solve
参考:
undefined reference to symbol ‘XConvertSelection’ to solve
在cmake里面添加这个博客的内容解决

find_package( X11 REQUIRED )
list( APPEND GLSLCOOKBOOK_LIBS ${X11_Xrandr_LIB} ${X11_Xi_LIB} ${X11_Xrender_LIB} ${X11_Xdamage_LIB} ${X11_Xxf86vm_LIB} ${X11_Xext_LIB}  ${X11_X11_LIB} ${X11_Xinerama_LIB}  ${X11_Xcursor_LIB})

各种memcpy未定义:
在相应的文件中添加 #include <string.h> 即可。

 #include <string.h>
 //或者
  #include <cstring>
  //上面两个在c++中是一个意思。

vdds.cpp 中报一个goto错误:
说的是goto后面不能定义变量,讲那些定义变量的语句copy到前面去就好了。

至于修改后的报,我上传到百度云盘,供大家参考。
链接: https://pan.baidu.com/s/15n0t0pMNPzz8bF5BBPkRbg 提取码: w23m 复制这段内容后打开百度网盘手机App,操作更方便哦

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
OpenGL开发指南英文第九版 What This Guide Contains This guide contains the following chapters: • Chapter 1 , “Introduction to OpenGL ,” provides a glimpse into what OpenGL can do. It also presents a simple OpenGL programand explains the essential programming details you need to know for the subsequent chapters. • Chapter 2 , “Shader Fundamentals ,” discusses the major features of the OpenGL Shading Language and SPIR-V, demonstrating how to initialize and use themwithin an application. • Chapter 3 , “Drawing with OpenGL ,” describes the various methods for rendering geometry using OpenGL, as well as some optimization techniques for making rendering more efficient. • Chapter 4 , “Color, Pixels, and Fragments ,” explains OpenGL’s processing of color, including how pixels are processed, how buffers are managed, and rendering techniques focused on pixel processing. • Chapter 5 , “Viewing Transformations, Culling, Clipping, and Feedback ,” details the operations for presenting a three-dimensional scene on a two-dimensional computer screen, including the mathematics and shader operations for the various types of geometric projection. • Chapter 6 , “Textures and Framebuffers ,” discusses combining geometric model s and imagery for creating realistic, highly detailed three-dimensional models. • Chapter 7 , “Light and Shadow ,” describes simulating illumination effects for computer graphics, focusing on implementing those techniques in programmable shaders. • Chapter 8 , “Procedural Texturing ,” details the generation of textures and other surface effects using programmable shaders for inc reased realismand other rendering effects. • Chapter 9 , “Tessellation Shaders ,” explains OpenGL’s shader facility for managing and tessellating geometric surfaces. • Chapter 10 , “Geometry Shaders ,” describe an additional technique for modifying geometric primitives within the OpenGL rendering pipeline using shaders. • Chapter 11 , “Memory ,” demonstrates techniques using OpenGL’s framebuffer and buffer memories for advanced rendering techniques and nongraphical uses. • Chapter 12 , “Compute Shaders ,” introduces the newest shader stage, which integrates general computation into the OpenGL rendering pipeline.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值