⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 notes.imm

📁 Mesa is an open-source implementation of the OpenGL specification - a system for rendering interacti
💻 IMM
字号:
NOTE:These files are incomplete.  They do not yet form a workingimplementation of hte concepts discused below.OVERVIEWThe t_dd_imm_* files form a set of templates to produce driver -specific software tnl modules for a small subset of transformation andlighting states.The approach is quite different to the large vertex buffers of thesrc/tnl module, and is based around a cache of four recent verticesand a 'current' vertex which is updated directly from the Color,Normal, Texcoord, SecondaryColor and Fog entrypoints.The current vertex is actually a composite of the ctx->Current valuesand a partial hardware vertex maintained where the hardware valuesdiffer from those in ctx->Current.  For example, clamped color valuesare kept in the hardware vertex, while texcoords remain inctx->Current.A crude diagram:       		+--------------+	+-------------------+		| ctx->Current |	| Current-HW-vertex |		+--------------+	+-------------------+		       \       	       	       	  /		       	\      			 /			 \     			/			  \    		       /			   ---------   --------			       	   |   |      			       	   v   v     	+--------+   +--------+  +--------+  +--------+ 	| vert-0 |   | vert-1 |  | vert-2 |  | vert-3 |		       	 	+--------+   +--------+  +--------+  +--------+		       	 				     |				     |				     v				     				    DMAHere values from ctx->Current and current-HW-vertex are merged tobuild vert-2, which is then dumped to hardware (DMA).  A state machinedetermines which vertex is built in turn, and how the vertices areused to present primitives to hardware.  These actions all occurduring a call to Vertex{234}f{v}.Each vert-n includes clip coordinates and a clipmask in addition tothe hardware (window) coordinates.  This information allows clippingto take place directly on these vertices, if need be.t_dd_imm_capi.h		Color{34}{fub}{v}() implementations.  These update both	ctx->Current (unclamped float colors) and current-HW-vertex	with hardware-specific color values (typically unsigned	bytes).	When lighting is enabled, the functions from src/api_noop.c	should be used, which just update ctx->Current.  (The	current-hw-vertex colors are produced from lighting, which is	keyed to Normal3f).t_dd_imm_vb.c	Support functions for clipping and fallback.  See	t_dd_imm_primtmp.h.t_dd_imm_napi.ct_dd_imm_napi.h	Versions of Normal3f{v} to perform lighting with one or more	infinite lights.  Updates ctx->Current.Normal and the current	HW colors.	When lighting is disabled, use the functions from api_noop.c	instead.t_dd_imm_primtmp.h	State machine to control emission of vertices and primitives	to hardware.  Called indirectly from Vertex{234}f{v}.  Capable	of supporting hardware strip and fan primitives, and of	decomposing to discreet primitives for clipping or fallback,	or where the native primitive is unavailable.t_dd_imm_tapi.h	Implementations of TexCoord{v} and MultiTexCoord4f{v}ARB to	fire a callback when transitioning to projective texture.	Most drivers will need to change vertex format at this point,	some may need to enable a software rasterization fallback.t_dd_imm_vapi.h	Implementations of Vertex{234}f{v}.  These perform	transformation and cliptesting on their arguments, then jump	into the state machine implemented in primtmp.h.t_dd_imm_vertex.h	Support functions for building and clip-interpolating hardware	vertices.  Called from primtmp.h.Keith Whitwell, June 2001.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -