1.4. 桢缓存 The Frame Buffer

简介: 1.4. 桢缓存 The Frame Buffer OpenGL is an API for drawing graphics, and so the fundamental purpose for OpenGL is to transform data provided by an...

1.4. 桢缓存 The Frame Buffer


OpenGL is an API for drawing graphics, and so the fundamental purpose for OpenGL is to

transform data provided by an application into something that is visible on the display screen.

This processing is often referred to as RENDERING. Typically, this processing is accelerated by

specially designed hardware, but some or all operations of the OpenGL pipeline can be

performed by a software implementation running on the CPU. It is transparent to the user of

the OpenGL implementation how this division among the software and hardware is handled. The

important thing is that the results of rendering conform to the results defined by the OpenGL

specification.

The hardware that is dedicated to drawing graphics and maintaining the contents of the display

screen is often called the GRAPHICS ACCELERATOR. Graphics accelerators typically have a region of

memory that is dedicated to maintaining the contents of the display. Every visible picture

element (pixel) of the display is represented by one or more bytes of memory on the graphics

accelerator. A grayscale display might have a byte of memory to represent the gray level at

each pixel. A color display might have a byte of memory for each of red, green, and blue in

order to represent the color value for each pixel. This so-called DISPLAY MEMORY is scanned

(refreshed) a certain number of times per second in order to maintain a flicker-free

representation on the display. Graphics accelerators also typically have a region of memory

called OFFSCREEN MEMORY that is not displayable and is used to store things that aren't visible.

OpenGL assumes that allocation of display memory and offscreen memory is handled by the

window system. The window system decides which portions of memory may be accessed by

OpenGL and how these portions are structured. In each environment in which OpenGL is

supported, a small set of function calls tie OpenGL into that particular environment. In the

Microsoft Windows environment, this set of routines is called WGL (pronounced "wiggle"). In the

X Window System environment, this set of routines is called GLX. In the Macintosh

environment, this set of routines is called AGL. In each environment, this set of calls supports

such things as allocating and deallocating regions of graphics memory, allocating and

deallocating data structures called GRAPHICS CONTEXTS that maintain OpenGL state, selecting the

current graphics context, selecting the region of graphics memory in which to draw, and

synchronizing commands between OpenGL and the window system.

The region of graphics memory that is modified as a result of OpenGL rendering is called the

FRAME BUFFER. In a windowing system, the OpenGL notion of a frame buffer corresponds to a

window. Facilities in window-system-specific OpenGL routines let users select the frame buffer

characteristics for the window. The windowing system typically also clarifies how the OpenGL

frame buffer behaves when windows overlap. In a nonwindowed system, the OpenGL frame

buffer corresponds to the entire display.

A window that supports OpenGL rendering (i.e., a frame buffer) may consist of some

combination of the following:

目录
相关文章
|
缓存 关系型数据库 MySQL
Buffer Pool缓存页不够时,如何淘汰缓存?
执行CRUD都会将磁盘数据页加载到缓存页,那在加载数据到缓存页时,必然是要加载到空闲缓存页,所以必须要从free中找个空闲缓存页,然后把磁盘数据页加载到该空闲缓存页
83 0
|
5天前
|
消息中间件 缓存 NoSQL
Redis经典问题:缓存雪崩
本文介绍了Redis缓存雪崩问题及其解决方案。缓存雪崩是指大量缓存同一时间失效,导致请求涌入数据库,可能造成系统崩溃。解决方法包括:1) 使用Redis主从复制和哨兵机制提高高可用性;2) 结合本地ehcache缓存和Hystrix限流降级策略;3) 设置随机过期时间避免同一时刻大量缓存失效;4) 使用缓存标记策略,在标记失效时更新数据缓存;5) 实施多级缓存策略,如一级缓存失效时由二级缓存更新;6) 通过第三方插件如RocketMQ自动更新缓存。这些策略有助于保障系统的稳定运行。
136 1
|
8天前
|
存储 消息中间件 缓存
Redis缓存技术详解
【5月更文挑战第6天】Redis是一款高性能内存数据结构存储系统,常用于缓存、消息队列、分布式锁等场景。其特点包括速度快(全内存存储)、丰富数据类型、持久化、发布/订阅、主从复制和分布式锁。优化策略包括选择合适数据类型、设置过期时间、使用Pipeline、开启持久化、监控调优及使用集群。通过这些手段,Redis能为系统提供高效稳定的服务。
|
14天前
|
存储 缓存 NoSQL
【Go语言专栏】Go语言中的Redis操作与缓存应用
【4月更文挑战第30天】本文探讨了在Go语言中使用Redis进行操作和缓存应用的方法。文章介绍了Redis作为高性能键值存储系统,用于提升应用性能。推荐使用`go-redis/redis`库,示例代码展示了连接、设置、获取和删除键值对的基本操作。文章还详细阐述了缓存应用的步骤及常见缓存策略,包括缓存穿透、缓存击穿和缓存雪崩的解决方案。利用Redis和合适策略可有效优化应用性能。
|
17天前
|
存储 缓存 NoSQL
Redis多级缓存指南:从前端到后端全方位优化!
本文探讨了现代互联网应用中,多级缓存的重要性,特别是Redis在缓存中间件的角色。多级缓存能提升数据访问速度、系统稳定性和可扩展性,减少数据库压力,并允许灵活的缓存策略。浏览器本地内存缓存和磁盘缓存分别优化了短期数据和静态资源的存储,而服务端本地内存缓存和网络内存缓存(如Redis)则提供了高速访问和分布式系统的解决方案。服务器本地磁盘缓存因I/O性能瓶颈和复杂管理而不推荐用于缓存,强调了内存和网络缓存的优越性。
132 47
|
3天前
|
缓存 NoSQL 安全
Redis经典问题:缓存击穿
本文探讨了高并发系统中Redis缓存击穿的问题及其解决方案。缓存击穿指大量请求同一未缓存数据,导致数据库压力过大。为解决此问题,可以采取以下策略:1) 热点数据永不过期,启动时加载并定期异步刷新;2) 写操作加互斥锁,保证并发安全并设置查询失败返回默认值;3) 预期热点数据直接加缓存,系统启动时加载并设定合理过期时间;4) 手动操作热点数据上下线,通过界面控制缓存刷新。这些方法能有效增强系统稳定性和响应速度。
59 0
|
4天前
|
缓存 NoSQL 应用服务中间件
Redis多级缓存
Redis多级缓存
8 0
|
4天前
|
缓存 NoSQL 关系型数据库
Redis 缓存 一致性
Redis 缓存 一致性
7 0