青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

concentrate on c/c++ related technology

plan,refactor,daily-build, self-discipline,

  C++博客 :: 首頁 :: 聯系 :: 聚合  :: 管理
  37 Posts :: 1 Stories :: 12 Comments :: 0 Trackbacks

常用鏈接

留言簿(9)

我參與的團隊

搜索

  •  

最新評論

閱讀排行榜

評論排行榜

computer display = a single graphics adapter + a display monitor.
graphics adapter contains the hardware needed store and display images on a monitor or other display device.
all of these adapters stored a representation of the displayed image in a bank of dual-ported memeory called a frame buffer.
the system uses one of the ports to read and write images into the frame buffer.the second port is used by the video scan out circuitry of the adapter to create a signal for the monitor.Direct3D only supports VGA compatible adapters.

Frame                               Color Lookup
Buffer                               Table


2D Pixel                           D/A
Engine                              Converter

Host CPU                        CRT Monitor

Direct3D abstractions include :device, swap chains, surfaces, and resource .

an application enumerates the devices available on each adapter, examining their capablities and supported display modes to find an acceptable device.
device is the object that expose the rendering operations of the hardware. its properties control the rendering behavior or provide information about rendering, while the device's methods are used to perform the rendering itself.

devices always contain at least one swap chain and a collection of resources used for rendering.
resources are application specific data stored in or near the device hardware for use during rendering Direct3D provides resources for scene geometry(vertices and indices) and appearance(images, textures, and volumes).

a surface is a resource containing a rectangular collection of pixel data such as color, alpha, depth/stencil or texture information.
a swap chain contains one or more back buffer surfaces where scenes are rendered and presented for display on the monitor, is a collection of back buffers.

a device's render target is the back buffer surface, with an optional depth/stencil surface, in which rendering will occur.

while all back buffers are valid render targets, not all render targets are back buffers.
it is also possible to have a texture as a render target allowing dynamic rendering effects.

to obtain a device object, Direct3D provides an object for device enumeration and creation. all other objects are created through the device. an application first obtains the runtime interface, then selects and creates a device from those available, and using the device creates the necessary resources for rendering.

most COM methods return HRESULT to indicate success or failure.
in windowed mode: the results of graphic rendering are presented for display insidei the client area of a window on the desktop.
Direct3D cooperates with GDI to make the results of rendering visible, using a ::StretchBlt operation to present a back buffer in the window's client region
in exclusive mode: Direct3D communicates directly with the display driver avoiding GDI. when an exclusive mode application is running, no other applications have access to display hardware and no GDI is visible on the screen.

HAL(hardware abstraction layer): has hardware acceleration of graphics rendering, making it fastest device type.

reference device: useful for debugging, when developing software applications that target new features not yet common in hardware, the reference device maybe your obly choice for generating an image with those Direct3D features.

the null reference device: does nothing and all rendering will result in a black screen.useful for manipulating resources on a machine that provides no hardware or software  implementation of the runtime.

the pluggable software device: RegisterSoftwareDevice method,

each resource has Type, Pool, Format, and Usage attributes, each of these attributes of a resource are specified at the time the resource is created and remain constant for the lifetime of the resource object.
type attributes describes the kind of resource and is defined by D3DRESOURCETYPE.
pool attribute of a resource describes how it is managed by the Direct3D runtime and is defined by the D3DPOOL enumeration.
resources in the default pool exist only in device memory.
resources in the managed pool exist in system memory and will be copied into the device's memory by the runtime when needed.
resource in the system memory pool exist only in system memory
resource in the scratch pool reside only in system memory and are not bound  by format constraints of the device
when a device is lost, all resources in the default pool are lost and should be released and recreated by the application when the device is regained.
Format attribute of a resource describes the layout of the resources's data in memory and is defined by the D3DFORMAT enumeration.

all resources have a format, but most of the format enumerants define the memory layout for pixel data.
D3DFMT_D24S8: D:depth buffer, S:stencil buffer.

Usage attribute describes how the application will be use the resource and is defined by a collection of flag bits. static reources are typically loaded with data once and used repeatedly without change, while dynamic resources are repeatedly modified bu the application.
a direct3D application starts by obtaining the IDirect3D9 COM interface pointer by calling Direct3DCreate9.
GetAdapterCount is to determine the number of adapters in the system. each adapter provides a number of video display modes. each display mode contains a screen dimention, refresh rate and pixel format and is described by D3DDISPLAYMODE structure.
the back buffer surface format of a device must be compatible with the display mode's format. CheckDeviceFormat method can be used to discover compatible formats.
GetAdapterModeCount: the number of display modes.
EnumAdapterModes: the display mode information.
GetAdapterDisplayMode: the display mode currently in use by the adapter.
two display modes can have the same width, height and format values but different values for the RefreshRates.
the CheckDeviceType method tells us if a particular combination of display format and back buffer format are valid for a device of a given type operating in windowed or exclusive mode.
with a valid device type, we can check the device's capabilities for rendering required by our application with GetDeviceCaps.

we can validate all the resources required by our application with the CheckDeviceFormat, checkDeviceFormat should be used to validate all the format of all resources used by the application: back buffer surfaces, depth/stencil surfaces, texture surfaces, and volume texture formats. if the application requires a depth buffer for viaiblitiy determination, it should use CheckDepthStencilMatch to find a depth buffer that can be used with its render target formats in a given display mode.
CheckDeviceMultiSampleType: check multisampling needs.
GetAdapterIdentifier: allows an application to identify a specific brand of adapter from a specific vendor.
D3DCREATE_ADAPTERGROUP_DEVICE: allows an application to drive both video outputs through a single device interface, allowing resources to be shaed for both outputs.
Direct3D uses single precision floating point computations. if an application requires higher precision from FPU.there are two choices, either the application can ensure that the FPU is in single precision mode when calling into Direct3D, or ir can request that the device preserve the application's FPU precision before Direct3D performs any floating -point operations and restore the precision before returning to the application.
D3DCREATE_SOFTWARE_VERTEXPROCESSING: select software vertex processing, which is always available from the runtime.the runtime used an efficient implementation of software vertex processing that is optimized for the CPU.
D3DCREATE_MIXED_VEVERTEXPROCESSING: select a combination of software and hardware vertex processing selected by SetSoftwareVertexProcessing mixed vertex processing is incompatible with a pure device and will fail if both are requested together.

D3DPRESENTFLAG_DEVICECLIP: restricts the results of a present operation to the client area of the device window in windowed mode.
D3DPRESENTFLAG_DISCARDDEPTHSTENCIL: instructs the runtime to discard the contents of the depth stencil surface after a call to Present, or when a new depth stencil surface is set on the device.
D3DPRESENTFLAG_LOCKABLEBACKBUFFER: requests a default swap chain with back buffer surfaces that can be directly accessed by the application.
in windowed mode: hDeviceWindow specifies the window whose client area will be used for presentation in windowed operation  if hDeviceWindow is zero, then the focus window willbe used for presentation.
in exclusive mode, hDeviceWindow specifies the top-level window used by the application

D3DPRESENT_RATE_DEFAULT: instructs the runtime to choose a suitable refresh rate in exclusive mode, and uses the current refresh rate in windowed mode.
an application may wish to create a full-screen display on a specific monitor.
GetAdapterMonitor: return an HMONITOR handle for an adapter, once you have the handle to the device 's montior, u can determine what part of the virtual desktop is covered by the monitor.

a scene is a collection of three dimensional objects that are projected onto the render target surface from the viewpoint of a syntheitic camera
each object in a scene is described by a collection of geometric primitives, such as points, lines, and triangles, with the device's action methods. 
the pipeline converts geometric descriptions into pixels on the render target surface through the process of rasterization. graphic primitives are rendered in the order in which they are described to the devices similar to the way a CPU executes binary instructions sequentially through memory.
the entire graphics pipeline is controlled through the properties of the device.
the properites are manipulated through the Get/Set methods of the device.
every device has a distinct set of capabilities. Direct3D specifies an abstract machine interface, but does not provide a software emulation for a feature not provided directly by the hardware's driver.
 a device provides specific information on its capabilities to allow an application to adapt to the capabilities of the device.
much of the behavior of the graphics pipeline is controlled by render states.
groups of device properties, including render states, can be cached and set as a group with state blocks.
the device object represents the rendering pipeline, we get images from the pipeline by supplying it with scene data and instructing it to render scenes into images.
scene data consists of geometric data defining shapes in space and data defining the appearance of the shapes.
we can break the pipeline up into large sections consisting of vertex data assembly, vertex processing, promitive assembly and rasterization, pixel processing, the frame buffer,a dn video scan out.

vertex data assembly section gathers together vertex components from a collection of data streams to assemble a compute vertex and its associated data.
vertex processing performs computations on each vertex such as the transformation and lighting of vertices.the processed vertex data is then assembled into graphic primitives and rasterized into a stream of pixels.
pixel processing performs a computations on each rasterized pixel to determine the final color of the pixel that will be written into the frame buffer.
frame buffer performs a read/modify/write operations combining processed pixels from the rasterizer with the existing pixels in the render ttarget.
video scan out reads the pixels out of the frame buffer for conversion into video signals displayed by the monitor.

scenes are rendered to the render target selected on the device. if the render target is part of a swap chain, the render target can be made viaible on the device through presentation.
the render target may not be part of a swap chain if the render target is a texture resource.
you present renderings for display through a swap chain as the last thing you do when rendering a scene.
a swap chain consists of one or more back color buffers into which images are rendered. a device is always associated with at least one swap chain and in windowed mode additional swap chains can be created to obtain multiple presentable surfaces.
the philosophy of the Direct3D object is to expose the capabilities of the hardware to the application programmer and let the application adapt to the hardware.
GetDeviceCaps: return the capabilities of an actual device, while GetDeviceCaps method on the Direct3D object returns the generic capabilities of a device.
IUnknown 
      IDirect3DVolume9
      IDirect3DResource9
           IDirect3DIndexBuffer9
           IDirect3DVertexBuffer9
           IDirect3DSurface9
           IDirect3DBaseTexture9
               IDirect3DTexture9
               IDirect3DCubeTexture9
               IDirect3DVolumeTexture9
resource objects are used as containers for the scene data rendered by the device such as primitive vertices, indices intto vertex arrays, surface textures and volumes. 
two and three dimensional textures expose their contents as collections of sutfaces and volumes, respectively. the back buffer, depth/stencil buffer and render target properties of the device are also exposed as surfaces.
volume objects do not inherit from IDirect3DResoutce9 and therefore do not participate in the resource management exposed by this interface.
managed resources are assigned an unsigned integer priority, with higher priority taking precedence so that resources with a lower priority are discarded from device memory first.
non-managed resources always return a priority of zero. within the same priority, Direct3D uses a least-recently used strategy to discard old resoucrs in preference to newly created resources.
when the application attempts to use more resources than the card can hold while rendering a scene, Direct3D switches to a most-recently used first strategy for discarding memory.
resources in D3DPOOL_DEFAULT are not managed and are never discarded from device memory by the resource manager.
if u need to allocate new resources in the default pool after managed resources have been loaded, you should evict all managed resources before allocating new resources in the default pool.
resources in pool D3DPOOL_SYSTEMMEM are never located in device memory, so that they do not participate in resource management.
GetAvailableTextureMem: obtain an estimate of the available texture memory.
the GetDevice method returns the device with which this resource is associated. resources cannot be shared across devices.
GetPrivateData/SetPrivateData: allow an application to associate its own arbitrary chunks of data with any Direct3D erouces.
each distinct item of private data is identified by a GUID. all private data associated with a resource is freed when the associated resource itself is freed.
methods and functions in Direct3D that create COM objects, such as CreateDevice, add a reference to the object for the caller before they return the interface pointer, the application must release these objects when they are no longer needed to avoid a memory leak.
Device queries allow you to obtain information from the driver layer of the device, the two main uses for driver queries are for obtaining rendering statistics and event notifications from the device.
D3DQUERYTYPE enumeration gives the possible kinds of queries: vertex cache description queries, resource manager statistics queries, vertex statistics queries, event queries, occlusion queries, timestamp queries, time queries and cache utilization queries.
a query exists in one of three state: signaled, building, or issued.
Issue: used by the application to signal a state transition on the query.
the device driver can also change the state of a query when it has returned the data requested by the query.
the query will report the results for primitives issued between the begining of the query and the end of the query.
occlusion queries return the number of pixels that passed the depth test for primitives rendered between the begin and end of the query.
the resource manager statistics query returns a D3DDEVINFO_RESOURCEMANAGER structure, which contains an array of D3DRESOURCESTATS structure, one for each resource type.
the vertex cache is a memory cache close to the GPU that avoids access to vertex memory for a small number of recently used vertices.
PIX: is a performance measurement tool for DirectX applications. the remaining query types return data for performance measurements with tools like PIX.
the device object's properties control the behavior of the rendering pipeline while its methods supply data for the pipeline to render.

state blocks are COM objects that provide a way for your application to cache a group of device properties for later use.
each state block is associated with a device, returned by the GetDevice method.once  a state block has been created, the state block can be applied to the device by calling apply on the state block, calling capture on an existing state block captures the current values of the device properties into the state block.
there are two ways to create a state block object and fill it with specific device property values.
the first way: call CreateStateBlock with D3DSTATEBLOCKTYPE value identifying the kind of state you  want recorded in the block.
the second way of obtaining a state block object is to call BeginStateBlock, set device properties and then call EndStateBlock.
when EndStateBlock is called, each device property marked for capture is recorded into the state block. if a device property is set multiple times between BeginStateBlock and EndStateBlock, only the last value set in the property is captureed into the state block.
release the state block COM object when you are finished with a state block.
a pure device has a performance advantage because the runtime and driver do not have to keep a copy of the non-queryable state for the application.
scenes contain one or more objects that are positioned relative to each other and to the virtual camera that views the scene. such objects are called "models", and contain data that define their shape and apperance. the shape of a model is described by a collection of a simple geometric shapes, called graphic primitives.
when we draw a three dimensional scene, we need to solve the problem of visibility: objects in the foreground should occlude objects in the background. Two- dimensional applications use a painter's algorithm to determine visibility. Direct3D can use depth/stencil surfaces to resolve visibility.

using either a flexible vertex format or a vertex shader declaration, Direct3D describes colors, textures corrdinates,vertex blending weights and arbitrary shader data at each vertex.the vertex data is supplied to the device through a collection of streams, each associated with a vertex buffer.
the streams can be driven through a level of indirection with an index buffer.the streams can be driven though a level of indirection with an index buffer.
the scene is described to the device one primitive at a time. each primitive  is rasterized into a collection of pixels written to the render target property of the device.
All Direct3D rendering is done within a scene. each successive frame draws the models at successive moments in time, as in cel animation used for cartoons.
frame rates of greater than 15 fps can be preceived as "real-time", the z-buffer algorithm solution to the visibility problem works at each pixels on the render target instead of on models, as models are rasterized, each pixel that is associated with z value is used to determine which pixel is cloest to the camera.the closer pixels are stored into the render target, while pixels farther away are discarded. the depth/stencil buffer holds each pixel's depth from the camera. to use the Z-buffer for resolving visibility, set RS_Z Enable to D3DZB_TRUE, RS_Z Write Enable to TRUE, and RS_Z Func to D3DCMP_LESS.

if the D3DPRASTERCAPS_ZBUFFERLESSHSR bit of D3DCAPS9:RasterCaps is set, it indicates the device has an alternative visivility algorithm for hidden surface removal that doesn't use a Z-buffer. how visibility is determined is hardware dependent and application transparent. 

all back buffers on swap chains are valid render targets, but render targets are not restricted to back buffer surfaces, when the device is created or reset, the render target is back buffer zero of the device's default swap chain. when present is called on the device, the render target  advances to the next back buffer so that after present returns, render target is back buffer zero again.

setting the render target to a surface other than a back buffer surface allows the device to render directly into an imanage surface instead of rendering into a swap chain's back buffer and using stretchrect to obtain the results of the rendering, which could stall the pipeline.

D3DPT_POINTLIST draws a collection of points,
D3DPT_LINELIST draws a squence of possibly disjoint line segments.
posted on 2009-02-17 15:49 jolley 閱讀(712) 評論(0)  編輯 收藏 引用

只有注冊用戶登錄后才能發表評論。
網站導航: 博客園   IT新聞   BlogJava   博問   Chat2DB   管理


青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            久久这里只有| 国产嫩草影院久久久久| 一区二区三区波多野结衣在线观看| 亚洲国产精品高清久久久| 久久国产欧美精品| 久久婷婷国产综合精品青草| 免费久久久一本精品久久区| 久久一综合视频| 你懂的网址国产 欧美| 亚洲高清视频在线观看| 亚洲精品美女91| 亚洲综合欧美| 久久九九热re6这里有精品| 久久成人免费日本黄色| 久久久久欧美精品| 欧美成人r级一区二区三区| 欧美激情精品| 国产亚洲一二三区| 亚洲最新在线| 久久本道综合色狠狠五月| 久久综合福利| 亚洲伦理一区| 久久久精品国产免大香伊| 欧美大片va欧美在线播放| 欧美性做爰猛烈叫床潮| 狠狠干综合网| 一区二区三区不卡视频在线观看| 午夜国产精品影院在线观看| 久久嫩草精品久久久精品| 亚洲免费观看高清完整版在线观看| 亚洲欧美另类在线| 美女成人午夜| 国产一区二区三区四区在线观看| 亚洲另类视频| 久久亚洲电影| 亚洲欧洲99久久| 欧美aⅴ一区二区三区视频| 国产精品乱人伦一区二区| 91久久久久| 久久综合色播五月| 亚洲欧美第一页| 欧美日韩一区二区三区四区在线观看| 国产亚洲一区二区在线观看| 日韩图片一区| 欧美成人免费播放| 亚洲自拍啪啪| 国产精品久久久亚洲一区| 日韩午夜激情电影| 亚洲高清资源| 久久色在线观看| 国产精品日日做人人爱| 亚洲一区二区三区中文字幕在线| 亚洲国产视频一区| 久久国产精品第一页 | 一本色道久久综合亚洲精品高清| 久久精品123| 国产麻豆综合| 午夜欧美理论片| 亚洲精品专区| 欧美日韩xxxxx| 日韩午夜激情| 亚洲免费观看在线观看| 欧美美女操人视频| 一区二区激情| 夜夜嗨一区二区三区| 欧美另类极品videosbest最新版本 | 亚洲激情在线视频| 欧美精品18+| 一本久久综合| 亚洲国产成人精品久久久国产成人一区| 久久精品亚洲一区| 一色屋精品视频在线观看网站| 久久狠狠一本精品综合网| 亚洲男人的天堂在线| 国语自产精品视频在线看抢先版结局 | 亚洲国产精品成人综合色在线婷婷| 久久www成人_看片免费不卡| 国产欧美一区二区三区在线老狼| 性色av一区二区三区| 欧美亚洲一区二区三区| 国产麻豆一精品一av一免费| 久久丁香综合五月国产三级网站| 亚洲一区二区三区精品在线| 国产一区观看| 亚洲成人自拍视频| 欧美人妖在线观看| 亚洲影视九九影院在线观看| 亚洲在线中文字幕| 亚洲国产黄色| 一区二区三区黄色| 黑人巨大精品欧美一区二区| 亚洲国内精品| 国产亚洲第一区| 亚洲福利视频一区| 国产精品网站一区| 欧美电影免费网站| 国产欧美日韩精品在线| 欧美大片网址| 国产九色精品成人porny| 欧美高清一区二区| 欧美日韩一区二区免费视频| 久久精品国产2020观看福利| 噜噜噜噜噜久久久久久91| 亚洲午夜女主播在线直播| 久久久久久久网站| 亚洲视频在线观看一区| 亚洲男人第一av网站| 在线日韩精品视频| 一区二区三区www| 亚洲国产高清在线观看视频| 中日韩午夜理伦电影免费| 亚洲电影免费| 亚洲欧美日韩天堂| 亚洲人成在线观看网站高清| 先锋影音国产精品| 一本色道久久综合亚洲精品高清 | 免费观看一级特黄欧美大片| 欧美性猛交99久久久久99按摩 | 久久久久国产精品一区三寸| 亚洲一区精品视频| 老色鬼久久亚洲一区二区| 亚洲一区综合| 欧美日精品一区视频| 亚洲国产精品小视频| 国产真实乱子伦精品视频| 一区二区三区国产在线| 一卡二卡3卡四卡高清精品视频| 欧美亚洲午夜视频在线观看| 亚洲一级黄色av| 欧美午夜a级限制福利片| 亚洲国产另类久久精品| 亚洲高清激情| 免费人成网站在线观看欧美高清 | 日韩午夜电影| 亚洲毛片一区| 欧美男人的天堂| 亚洲日本欧美在线| 亚洲激情在线观看视频免费| 亚洲性视频h| 欧美在线免费视屏| 国产精品视频网站| 亚洲欧美在线免费观看| 亚洲欧美国产毛片在线| 欧美日韩国产综合视频在线观看中文| 欧美激情精品久久久久久免费印度 | 亚洲精品一区在线| 99www免费人成精品| 欧美精品一区二区久久婷婷| 女人天堂亚洲aⅴ在线观看| 精品51国产黑色丝袜高跟鞋| 久久黄色小说| 美女性感视频久久久| 亚洲国产一二三| 欧美日产国产成人免费图片| 亚洲精品一区二区三区樱花 | 亚洲激情一区二区三区| 欧美精品日韩一区| 国产亚洲成av人片在线观看桃| 欧美国产日本| 欧美视频在线看| 亚洲香蕉伊综合在人在线视看| 性久久久久久| 好吊妞这里只有精品| 蜜臀av一级做a爰片久久| 嫩草成人www欧美| 91久久精品一区二区别| 国产精品久久久久久福利一牛影视| 亚洲宅男天堂在线观看无病毒| 久久精品二区| 9人人澡人人爽人人精品| 国产精品swag| 亚洲欧美影院| 亚洲国产第一页| 欧美一级电影久久| 一区二区三区自拍| 欧美色视频在线| 久久综合给合久久狠狠色| 日韩视频一区二区三区在线播放| 9色精品在线| 激情伊人五月天久久综合| 欧美日韩不卡合集视频| 欧美中文字幕在线| 日韩亚洲精品视频| 久久嫩草精品久久久精品一| 亚洲小视频在线| 欧美影院一区| 亚洲激情电影在线| 国产精品婷婷| 欧美成人情趣视频| 久久精品国产清高在天天线| 日韩网站在线观看| 欧美激情第五页| 久久嫩草精品久久久精品一 | 久久精品国产免费观看| 日韩亚洲不卡在线| 在线欧美不卡| 狠狠色丁香婷综合久久| 国产精品久久9| 欧美日韩色婷婷| 欧美激情第8页|