Basic OpenGL Operation

The following diagram illustrates how OpenGL processes data. As shown, commands enter from the left and proceed through a processing pipeline. Some commands specify geometric objects to be drawn, and others control how the objects are handled during various processing stages.

下圖說(shuō)明OpenGL如何處理數(shù)據(jù)。如圖所示,命令從左側(cè)輸入并通過(guò)處理管道繼續(xù)執(zhí)行。一些命令指定要繪制的幾何對(duì)象,另一些命令控制在不同的處理階段如何處理對(duì)象。


The processing stages in basic OpenGL operation are as follows:

OpenGL基本操作的處理階段如下:

1. Display listRather than having all commands proceed immediately through the pipeline, you can choose to accumulate some of them in a display list for processing later.

顯示列表,而不是讓所有命令都通過(guò)管道立即執(zhí)行,您可以選擇將其中一些命令累積到顯示列表中,以便稍后處理。

2. EvaluatorThe evaluator stage of processing provides an efficient way to approximate curve and surface geometry by evaluating polynomial commands of input values.

求值器處理求值器階段通過(guò)求輸入值的多項(xiàng)式命令,提供了一種近似曲線和曲面幾何的有效方法。

3. Per-vertex operations and primitive assemblyOpenGL processes geometric primitivespoints, line segments, and polygonsall of which are described by vertices. Vertices are transformed and lit, and primitives are clipped to the viewport in preparation for rasterization.

OpenGL處理幾何原語(yǔ)點(diǎn)、線段和多邊形,所有這些都是由頂點(diǎn)描述的。頂點(diǎn)被轉(zhuǎn)換和點(diǎn)亮,原語(yǔ)被裁剪到視圖端口,為柵格化做準(zhǔn)備。

4. RasterizationThe rasterization stage produces a series of frame-buffer addresses and associated values using a two-dimensional description of a point, line segment, or polygon. Each fragment so produced is fed into the last stage, per-fragment operations.

光柵化階段使用點(diǎn)、線段或多邊形的二維描述生成一系列幀緩沖區(qū)地址和相關(guān)值。這樣生成的每個(gè)片段都被送入最后一個(gè)階段,即每個(gè)片段操作。

5. Per-fragment operationsThese are the final operations performed on the data before it is stored as pixels in the framebuffer.

每個(gè)片段操作這些是在數(shù)據(jù)作為像素存儲(chǔ)在framebuffer之前對(duì)數(shù)據(jù)執(zhí)行的最后操作。

Per-fragment operations include conditional updates to the framebuffer based on incoming and previously stored z values (for z buffering) and blending of incoming pixel colors with stored colors, as well as masking and other logical operations on pixel values.

每個(gè)片段操作包括根據(jù)傳入的和先前存儲(chǔ)的z值(用于z緩沖)對(duì)framebuffer進(jìn)行條件更新,并將傳入的像素顏色與存儲(chǔ)的顏色混合,以及對(duì)像素值進(jìn)行屏蔽和其他邏輯操作。

Data can be input in the form of pixels rather than vertices. Data in the form of pixels, such as might describe an image for use in texture mapping, skips the first stage of processing described above and instead is processed as pixels, in the pixel operations stage. Following pixel operations, the pixel data is either:

數(shù)據(jù)可以以像素而不是頂點(diǎn)的形式輸入。像素形式的數(shù)據(jù)(例如可能描述用于紋理映射的圖像)跳過(guò)了上述處理的第一階段,而是在像素操作階段作為像素處理。以下像素操作,像素?cái)?shù)據(jù)為:

1. Stored as texture memory, for use in the rasterization stage.

存儲(chǔ)為紋理內(nèi)存,用于柵格化階段。

2. Rasterized, with the resulting fragments merged into the framebuffer just as if they were generated from geometric data.

柵格化,結(jié)果片段合并到framebuffer中,就像它們是從幾何數(shù)據(jù)生成的一樣。

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi閱讀 7,844評(píng)論 0 10
  • mean to add the formatted="false" attribute?.[ 46% 47325/...
    ProZoom閱讀 3,169評(píng)論 0 3
  • **2014真題Directions:Read the following text. Choose the be...
    又是夜半驚坐起閱讀 11,047評(píng)論 0 23
  • 那些20歲不信,30歲卻深信不疑的道理—— 一、相信命。 我反而認(rèn)為信命并不是極致的悲觀、灰暗和迷信,而是理性又成...
    仰望天空的貓閱讀 556評(píng)論 0 1
  • 【來(lái)源網(wǎng)絡(luò)侵權(quán)刪除】 新鴛鴦蝴蝶夢(mèng)歌詞 昨日像那東流水離我遠(yuǎn)去不可留 今日亂我心多煩憂(yōu) 抽刀斷水水更流舉杯消愁愁更...
    天醫(yī)延年閱讀 292評(píng)論 0 1

友情鏈接更多精彩內(nèi)容