Lines Matching defs:tnl

41 #include "tnl.h"
50 TNLcontext *tnl;
55 ctx->swtnl_context = tnl = calloc(1, sizeof(TNLcontext));
57 if (!tnl) {
63 tnl->vb.Size = ctx->Const.MaxArrayLockSize + MAX_CLIPPED_VERTICES;
66 /* Initialize tnl state.
74 _math_matrix_ctr(&tnl->_WindowMap);
76 tnl->NeedNdcCoords = GL_TRUE;
77 tnl->AllowVertexFog = GL_TRUE;
78 tnl->AllowPixelFog = GL_TRUE;
82 tnl->Driver.Render.PrimTabElts = _tnl_render_tab_elts;
83 tnl->Driver.Render.PrimTabVerts = _tnl_render_tab_verts;
84 tnl->Driver.NotifyMaterialChange = _tnl_validate_shine_tables;
86 tnl->nr_blocks = 0;
89 tnl->_ShineTabList = MALLOC_STRUCT( tnl_shine_tab );
90 make_empty_list( tnl->_ShineTabList );
96 insert_at_tail( tnl->_ShineTabList, s );
103 _tnl_init_inputs(&tnl->draw_arrays);
113 TNLcontext *tnl = TNL_CONTEXT(ctx);
115 _math_matrix_dtr(&tnl->_WindowMap);
118 foreach_s( s, tmps, tnl->_ShineTabList ) {
121 free( tnl->_ShineTabList );
125 free(tnl);
133 TNLcontext *tnl = TNL_CONTEXT(ctx);
139 assert(tnl->AllowVertexFog || tnl->AllowPixelFog);
140 tnl->_DoVertexFog = ((tnl->AllowVertexFog && (ctx->Hint.Fog != GL_NICEST))
141 || !tnl->AllowPixelFog) && !fp;
144 tnl->pipeline.new_state |= new_state;
146 /* Calculate tnl->render_inputs. This bitmask indicates which vertex
149 tnl->render_inputs_bitset = BITFIELD64_BIT(_TNL_ATTRIB_POS);
152 tnl->render_inputs_bitset |= BITFIELD64_BIT(_TNL_ATTRIB_COLOR0);
156 tnl->render_inputs_bitset |= BITFIELD64_BIT(_TNL_ATTRIB_COLOR1);
162 tnl->render_inputs_bitset |= BITFIELD64_BIT(_TNL_ATTRIB_TEX(i));
170 tnl->render_inputs_bitset |= BITFIELD64_BIT(_TNL_ATTRIB_FOG);
175 tnl->render_inputs_bitset |= BITFIELD64_BIT(_TNL_ATTRIB_EDGEFLAG);
178 tnl->render_inputs_bitset |= BITFIELD64_BIT(_TNL_ATTRIB_TEX0);
181 tnl->render_inputs_bitset |= BITFIELD64_BIT(_TNL_ATTRIB_POINTSIZE);
189 tnl->render_inputs_bitset |= BITFIELD64_BIT(_TNL_ATTRIB_GENERIC(i));
197 _math_matrix_viewport(&tnl->_WindowMap, scale, translate,
229 TNLcontext *tnl = TNL_CONTEXT(ctx);
230 tnl->NeedNdcCoords = mode;
236 TNLcontext *tnl = TNL_CONTEXT(ctx);
237 tnl->AllowVertexFog = value;
238 tnl->_DoVertexFog = ((tnl->AllowVertexFog && (ctx->Hint.Fog != GL_NICEST))
239 || !tnl->AllowPixelFog) && !ctx->FragmentProgram._Current;
246 TNLcontext *tnl = TNL_CONTEXT(ctx);
247 tnl->AllowPixelFog = value;
248 tnl->_DoVertexFog = ((tnl->AllowVertexFog && (ctx->Hint.Fog != GL_NICEST))
249 || !tnl->AllowPixelFog) && !ctx->FragmentProgram._Current;