Subversion Repositories Kolibri OS

Rev

Rev 5218 | Rev 5262 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5218 Rev 5256
Line 135... Line 135...
135
	jnc .end_mmpu
135
	jnc .end_mmpu
136
 
136
 
Line 137... Line 137...
137
	cmp dword[edx+offs_cont_lighting_enabled],0 ;if(context.lighting_enabled)
137
	cmp dword[edx+offs_cont_lighting_enabled],0 ;if(context.lighting_enabled)
138
	je @f
138
	je @f
-
 
139
if DEBUG ;context.matrix_stack_ptr[0]
-
 
140
	stdcall gl_print_matrix,dword[edx+offs_cont_matrix_stack_ptr],4
-
 
141
end if
139
		; precompute inverse modelview
142
		; precompute inverse modelview
140
		mov ebx,ebp
143
		mov ebx,ebp
141
		sub ebx,64
144
		sub ebx,64
142
		stdcall gl_M4_Inv, ebx, edx+offs_cont_matrix_stack_ptr
145
		stdcall gl_M4_Inv, ebx,dword[edx+offs_cont_matrix_stack_ptr]
-
 
146
if DEBUG ;tmp
-
 
147
	stdcall dbg_print,txt_sp,txt_nl
-
 
148
	stdcall gl_print_matrix,ebx,4
-
 
149
end if
-
 
150
		push ebx
-
 
151
		mov ebx,edx
143
		stdcall gl_M4_Transpose, edx+offs_cont_matrix_model_view_inv, ebx
152
		add ebx,offs_cont_matrix_model_view_inv
-
 
153
		stdcall gl_M4_Transpose, ebx
-
 
154
if DEBUG ;context.matrix_model_view_inv
-
 
155
	stdcall dbg_print,txt_sp,txt_nl
-
 
156
	stdcall gl_print_matrix,ebx,4
-
 
157
end if
144
		jmp .end_if_0
158
		jmp .end_if_0
145
	@@:
159
	@@:
146
		mov ecx,edx
160
		mov ecx,edx
147
		add ecx,offs_cont_matrix_model_projection
161
		add ecx,offs_cont_matrix_model_projection
148
		; precompute projection matrix
162
		; precompute projection matrix
Line 294... Line 308...
294
		mov edi,eax
308
		mov edi,eax
295
		add edi,offs_cont_current_normal
309
		add edi,offs_cont_current_normal
296
		mov edx,[v]
310
		mov edx,[v]
297
 
311
 
Line 298... Line 312...
298
		fld dword[edi+offs_X]
312
		fld dword[edi] ;edi = &n
299
		fld dword[edi+offs_Y]
313
		fld dword[edi+offs_Y]
300
		fld dword[edi+offs_Z]
314
		fld dword[edi+offs_Z]
Line 301... Line 315...
301
 
315
 
302
		mov ecx,3
316
		mov ecx,3
Line 456... Line 470...
456
 
470
 
Line 457... Line 471...
457
	stdcall gl_vertex_transform, edx, ebx
471
	stdcall gl_vertex_transform, edx, ebx
Line 458... Line 472...
458
 
472
 
459
	; color
-
 
460
 
473
	; color
461
	cmp dword[edx+offs_cont_lighting_enabled],0
474
	cmp dword[edx+offs_cont_lighting_enabled],0
462
	je .els_0
475
	je .els_0
463
		stdcall gl_shade_vertex, edx,ebx
476
		stdcall gl_shade_vertex, edx,ebx
464
		jmp @f
477
		jmp @f