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

concentrate on c/c++ related technology

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

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

常用鏈接

留言簿(9)

我參與的團(tuán)隊(duì)

搜索

  •  

最新評(píng)論

閱讀排行榜

評(píng)論排行榜

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 閱讀(709) 評(píng)論(0)  編輯 收藏 引用

只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。
網(wǎng)站導(dǎo)航: 博客園   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>
            久久久www成人免费毛片麻豆| 开元免费观看欧美电视剧网站| 性欧美大战久久久久久久免费观看| 亚洲精品在线视频| 亚洲欧洲日本mm| 亚洲精品无人区| 一卡二卡3卡四卡高清精品视频 | 欧美激情一区三区| 欧美不卡视频| 欧美三级欧美一级| 国产午夜精品久久久久久免费视 | 国产视频精品va久久久久久| 国产日韩欧美亚洲| 亚洲第一天堂av| 亚洲视频播放| 久久精品动漫| 亚洲精品久久久久中文字幕欢迎你 | 欧美jizz19hd性欧美| 欧美激情一区在线| 国产精品亚洲产品| 91久久精品国产91久久性色tv| 中文国产成人精品| 久久网站热最新地址| 亚洲精品国产精品国自产观看浪潮| 日韩视频免费观看高清在线视频| 亚洲欧美激情诱惑| 欧美精品免费播放| 好吊日精品视频| 亚洲午夜一级| 欧美成人国产一区二区| 亚洲午夜精品一区二区| 免费在线亚洲| 一区福利视频| 久久成人精品视频| 亚洲天堂成人在线观看| 欧美国产乱视频| 伊人成人网在线看| 欧美在线一二三四区| 一本色道久久综合亚洲精品小说| 另类图片国产| 伊人影院久久| 久久久久国产免费免费| 亚洲在线成人精品| 一区二区三区高清不卡| 欧美日韩不卡一区| 99riav国产精品| 久久婷婷蜜乳一本欲蜜臀| 欧美亚一区二区| 亚洲精品一区二区三区婷婷月 | 久久久久www| 日韩午夜在线播放| 免播放器亚洲一区| 影音先锋久久精品| 久久午夜精品| 久久精品视频在线| 黄色免费成人| 久久阴道视频| 久久精品国产免费看久久精品 | 亚洲高清久久网| 午夜精品久久久久久久99樱桃| 91久久国产精品91久久性色| 久久久噜噜噜| 精品动漫3d一区二区三区免费| 欧美在线999| 亚洲欧美成人综合| 国产农村妇女毛片精品久久莱园子 | 久久成人精品一区二区三区| 亚洲一区在线免费观看| 国产精品白丝黑袜喷水久久久| 亚洲一区日韩在线| 亚洲午夜久久久久久久久电影院 | 午夜伦欧美伦电影理论片| 99在线热播精品免费| 欧美视频成人| 性欧美办公室18xxxxhd| 久久久噜噜噜久噜久久| 久久嫩草精品久久久精品| 亚洲国产精品一区二区www在线| 亚洲一区中文字幕在线观看| 一区二区三区国产精品| 亚洲网在线观看| 国产欧美日韩三级| 欧美成人日本| 欧美吻胸吃奶大尺度电影| 久久久99精品免费观看不卡| 久久嫩草精品久久久精品| 一本到12不卡视频在线dvd| 亚洲一区在线免费| 亚洲福利视频网| 一区二区福利| 亚洲日本欧美天堂| 一区二区三区视频在线看| 免播放器亚洲一区| 欧美成人精品不卡视频在线观看| 99精品欧美一区二区蜜桃免费| 一级日韩一区在线观看| 国产一区二区三区久久| 亚洲电影天堂av| 国产精品久久久久久影院8一贰佰 国产精品久久久久久影视 | 久久亚洲欧美| 欧美精品99| 久久久免费av| 欧美亚州一区二区三区 | 一区二区三区国产精品| 欧美中文字幕在线播放| 亚洲色无码播放| 老鸭窝91久久精品色噜噜导演| 亚洲男人的天堂在线观看| 美女脱光内衣内裤视频久久影院 | 亚洲免费视频一区二区| 久久天天躁狠狠躁夜夜爽蜜月| 亚洲视频一区在线观看| 蜜桃av一区| 久久乐国产精品| 国产精品三区www17con| 亚洲免费观看| 日韩视频―中文字幕| 久久久久在线| 久久久水蜜桃| 国产一区二区电影在线观看| 亚洲午夜国产成人av电影男同| 99国产精品国产精品久久| 老司机午夜精品视频| 麻豆乱码国产一区二区三区| 国产精品一二三四区| 亚洲视屏一区| 午夜久久黄色| 国产精品一区二区三区四区五区| 亚洲美女在线视频| 日韩一区二区精品葵司在线| 免费久久精品视频| 免费一级欧美片在线观看| 好吊视频一区二区三区四区| 欧美在线www| 久久精品国内一区二区三区| 国产欧美视频在线观看| 亚洲欧美日韩国产成人| 欧美在线观看一区二区三区| 国产精品国产亚洲精品看不卡15| 一区二区高清在线| 亚洲免费视频成人| 国产精品区一区二区三区| 一本色道久久综合| 亚洲图片你懂的| 国产精品视屏| 欧美专区日韩视频| 欧美成va人片在线观看| 亚洲日本欧美日韩高观看| 欧美高清视频| 亚洲国产福利在线| 久久免费的精品国产v∧| 亚洲国产成人久久| 亚洲成人在线网站| 午夜精品福利电影| 欧美日韩激情网| 亚洲精品美女在线| 欧美在线一级视频| 亚洲在线国产日韩欧美| 欧美日韩黄色大片| 9久草视频在线视频精品| 美女精品自拍一二三四| 亚洲欧美精品伊人久久| 国产精品日韩| 欧美**人妖| 欧美日韩伦理在线| 性久久久久久久| 欧美一区二区在线| 亚洲精品国产精品乱码不99按摩| 久久香蕉国产线看观看av| 久久精品视频在线观看| 日韩亚洲欧美一区| 亚洲视频久久| 狠狠入ady亚洲精品经典电影| 免费中文日韩| 国产精品久在线观看| 美女精品自拍一二三四| 欧美亚洲第一区| 亚洲承认在线| 在线日韩av| 亚洲一区二区在线看| 亚洲高清不卡在线| 午夜精品999| 午夜免费在线观看精品视频| 久久电影一区| 午夜精品久久久久久久99樱桃 | 久久久www成人免费毛片麻豆| 国产视频不卡| 亚洲一区二区日本| 久久久久久久久岛国免费| 亚洲免费观看高清完整版在线观看| 亚洲日本成人| 妖精成人www高清在线观看| 久久九九热re6这里有精品| 久久本道综合色狠狠五月| 国产日韩亚洲| 久久久.com| 亚洲高清av| 亚洲欧美日韩精品久久奇米色影视| 欧美日韩精品一区二区在线播放| 亚洲精品看片|