mailao
日历
网志分类
· 所有网志 (183)
· 我乱写的 (3)
· Graphics & Engine (4)
· Learn DFA (112)
· 抄的 (60)
· 未分类 (4)
站内搜索
友情链接
· 我的歪酷 非非共享界

订阅 RSS

0071870

歪酷博客

不超越惰性的防线,信念将在彷徨中夭折。
« 上一篇: 显卡的结构和工作原理 下一篇: 渲染到纹理 »
mailao @ 2007-07-26 10:34

In Direct3D, all two-dimensional (2D) images are represented by a linear range of memory called a surface. A surface can be thought of as a 2D array where each element holds a color value representing a small section of the image, called a pixel. An image's detail level is defined by both the number of pixels needed to represent the image, and the number of bits needed for the image's color spectrum. For example, an image that is 800 pixels wide by 600 pixels high with 32 bits of color for each pixel (written as 800x600x32) will be more detailed than an image that is 640 pixels wide by 480 pixels tall with 16 bits of color for each pixel (written as 640x480x16). Likewise, the more detailed image will require a larger surface to store the data. For an 800x600x32 image, the surface's array dimensions will be 800x600, and each element will hold a 32-bit value to represent its color.

All surfaces have a size and store a specific number of bits that represent color. The bits that represent color are separated into individual color elements: red, green, and blue. In Direct3D all color elements are defined by the D3DFORMAT enumerated type. A Direct3D color format is broken down into the number of byes reserved for each color. For example, a 16-bit color format in Direct3D is defined as D3DFMT_R5G6B5, where 5 bits are reserved for red (R), 6 bits for green (G), and 5 bits for blue (B).





评论 / 个人网页 / 扔小纸条
* 昵称

已经注册过? 请登录

新用户请先注册 以便能显示头像及追踪评论回复

Email
网址
* 评论
表情
 


 

分类小组论坛
杂谈 , 娱乐、八卦 , 文学、艺术 , 体育 , 旅游、同城 , 象牙塔 , 情感 , 时尚、生活 , 星座 , 科技

请注意遵守中华人民共和国法律法规, 如威胁到本站生存, 将依法向有关部门报告, 同时本站的相关记录可能成为对您不利的证据.

相关法律法规
全国人大常委会关于维护互联网安全的决定
中华人民共和国计算机信息系统安全保护条例
中华人民共和国计算机信息网络国际联网管理暂行规定
计算机信息网络国际联网安全保护管理办法
计算机信息系统国际联网保密管理规定