前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >OpenGL入门 (一)

OpenGL入门 (一)

作者头像
用户1148525
发布2019-05-29 16:06:17
7600
发布2019-05-29 16:06:17
举报

OpenGL编程指南 https://github.com/openglredbook/examples https://blog.csdn.net/guyuealian/article/details/85262650

7th Edition of OpenGL SuperBible https://github.com/openglsuperbible/sb7code

openGL 不错的两个教程 https://learnopengl-cn.github.io https://blog.csdn.net/cordova/column/info/13062/2

什么是 openGL? “the GL,” meaning “the graphics library,”

OpenGL is an application programming interface—‘‘API’’ for short—which is merely a software library for accessing features in graphics hardware OpenGL is an interface that your application can use to access and control the graphics subsystem of the device on which it runs

OpenGL is designed as a streamlined, hardware-independent interface that can be implemented on many different types of graphics hardware systems, or entirely in software (if no graphics hardware is present in the system) independent of a computer’s operating or windowing system

The goal of OpenGL is to provide an abstraction layer between your application and the underlying graphics subsystem

与硬件相关的东西, openGL 都不会涉及,只有这样才能做到独立于图形硬件实现系统

一些基本的概念: Rendering 渲染 : is the process by which a computer creates an image from models 由模型生成图像

Our models, or objects—we’ll use the terms interchangeably—are constructed from geometric primitives—points, lines, and triangles— that are specified by their vertices 模型或物体由 几何元素:点、线、三角形构成,它们由顶点确定。

shaders 着色器:which are special functions that the graphics hardware executes,可以把它看做专为 GPU 编译的一种小程序, little programs that are specifically compiled for GPU( graphics processing unit)

Current GPUs consist of large numbers of small programmable processors called shader cores that run mini-programs called shaders. Each core has a relatively low throughput, processing a single instruction of the shader in one or more clock cycles and normally lacking advanced features

vertex shaders: which process vertex data 顶点数据 a vertex : a bundle of data values that are processed together

fragment shaders, which operate on the fragments generated by the rasterizer A fragment in OpenGL is all the data required for OpenGL to render a single pixel.

a pixel is the smallest visible element on your display,The pixels in your system are stored in a framebuffer, which is a chunk of memory that the graphics hardware manages, and feeds to your display device

viewport : the region of the window where you’re permitted to draw

clipping 就是 vertices 超出了指定区域 viewport ,需要修改 vertices 使其位于 指定区域内,这一步是 openGL 自动完成的。

当使用OpenGL的core-profile开发时,OpenGL迫使我们使用最新的技术。每当我们尝试使用OpenGL的弃用功能时,OpenGL会提示出了一个错误并停止运行

OpenGL的客户端和服务器模式   在一台工作站上,绘图的整个过程不过是把数据从系统的内存中复制到图形卡中,然后绘制出图形。 但openGL是按照客户机-服务器模式设计的。我们认为可以将整个OpenGL系统分为两部分,一部分是客户端,它负责发送OpenGL命令。一部分是服务端,它负责接收OpenGL命令并执行相应的操作。比如我们编写的程序就是一个客户端,而我们的计算机图形硬件制造商提供的OpenGL的实现就是服务器。   对于个人计算机来说,可以将CPU、内存等硬件,以及用户编写的OpenGL程序看做客户端,而将OpenGL驱动程序、显示设备等看做服务端。

Rasterisation (or rasterization) is the task of taking an image described in a vector graphics format (shapes) and converting it into a raster image (a series of pixels, dots or lines, which, when displayed together, create the image which was represented via shapes). 光栅化(Rasterize/rasteriztion)就是把矢量图形转化成像素点儿的过程。我们屏幕上显示的画面都是由像素组成,而三维物体都是点线面构成的。要让点线面,变成能在屏幕上显示的像素,就需要Rasterize这个过程。就是从矢量的点线面的描述,变成像素的描述。

11

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2019年05月24日,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
云开发 CloudBase
云开发(Tencent CloudBase,TCB)是腾讯云提供的云原生一体化开发环境和工具平台,为200万+企业和开发者提供高可用、自动弹性扩缩的后端云服务,可用于云端一体化开发多种端应用(小程序、公众号、Web 应用等),避免了应用开发过程中繁琐的服务器搭建及运维,开发者可以专注于业务逻辑的实现,开发门槛更低,效率更高。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档