2014-11-01 00:28:24 +03:00
|
|
|
|
|
|
|
align 4
|
|
|
|
proc glopClearColor uses ecx esi edi, context:dword, p:dword
|
|
|
|
mov esi,[p]
|
|
|
|
add esi,4
|
|
|
|
mov edi,[context]
|
|
|
|
add edi,offs_cont_clear_color
|
|
|
|
mov ecx,4
|
|
|
|
rep movsd
|
2014-11-03 18:53:21 +03:00
|
|
|
ret
|
2014-11-01 00:28:24 +03:00
|
|
|
endp
|
|
|
|
|
|
|
|
align 4
|
|
|
|
proc glopClearDepth uses eax ebx, context:dword, p:dword
|
|
|
|
mov eax,[context]
|
|
|
|
mov ebx,[p]
|
|
|
|
mov ebx,[ebx+4] ;ebx = p[1]
|
|
|
|
mov dword[eax+offs_cont_clear_depth],ebx
|
|
|
|
ret
|
|
|
|
endp
|
|
|
|
|
2014-11-03 18:53:21 +03:00
|
|
|
align 4
|
|
|
|
fl_65535 dd 65535.0
|
|
|
|
|
2014-11-03 16:16:54 +03:00
|
|
|
align 4
|
|
|
|
proc glopClear uses eax ebx, context:dword, p:dword
|
|
|
|
mov eax,[context]
|
2014-11-03 18:53:21 +03:00
|
|
|
fld dword[eax+offs_cont_clear_color+8] ;context.clear_color.v[2]
|
|
|
|
fmul dword[fl_65535]
|
|
|
|
fistp dword[esp-4]
|
|
|
|
fld dword[eax+offs_cont_clear_color+4] ;context.clear_color.v[1]
|
|
|
|
fmul dword[fl_65535]
|
|
|
|
fistp dword[esp-8]
|
|
|
|
fld dword[eax+offs_cont_clear_color] ;context.clear_color.v[0]
|
|
|
|
fmul dword[fl_65535]
|
|
|
|
fistp dword[esp-12]
|
|
|
|
sub esp,12
|
2014-11-03 16:16:54 +03:00
|
|
|
|
|
|
|
mov ebx,[p]
|
|
|
|
mov ebx,[ebx+4] ;ebx = p[1]
|
|
|
|
and ebx,GL_COLOR_BUFFER_BIT
|
|
|
|
push ebx
|
|
|
|
mov ebx,[p]
|
|
|
|
mov ebx,[ebx+4] ;ebx = p[1]
|
|
|
|
and ebx,GL_DEPTH_BUFFER_BIT
|
|
|
|
|
|
|
|
; TODO : correct value of Z
|
|
|
|
stdcall ZB_clear,[eax+offs_cont_zb],ebx,0 ;,...,r,g,b
|
|
|
|
ret
|
|
|
|
endp
|
|
|
|
|
2014-11-01 00:28:24 +03:00
|
|
|
|