fix in glClearColor

git-svn-id: svn://kolibrios.org@5163 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
IgorA 2014-11-03 15:53:21 +00:00
parent dbfaa9d5ab
commit 11b3a68203
2 changed files with 15 additions and 9 deletions

View File

@ -7,6 +7,7 @@ proc glopClearColor uses ecx esi edi, context:dword, p:dword
add edi,offs_cont_clear_color
mov ecx,4
rep movsd
ret
endp
align 4
@ -18,18 +19,22 @@ proc glopClearDepth uses eax ebx, context:dword, p:dword
ret
endp
align 4
fl_65535 dd 65535.0
align 4
proc glopClear uses eax ebx, context:dword, p:dword
mov eax,[context]
mov ebx,[eax+offs_cont_clear_color+8] ;context.clear_color.v[2]
shl ebx,16
push ebx
mov ebx,[eax+offs_cont_clear_color+4] ;context.clear_color.v[1]
shl ebx,16
push ebx
mov ebx,[eax+offs_cont_clear_color] ;context.clear_color.v[0]
shl ebx,16
push ebx
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
mov ebx,[p]
mov ebx,[ebx+4] ;ebx = p[1]

View File

@ -26,6 +26,7 @@ start:
stdcall [kosglMakeCurrent], 10,10,300,225,ctx1
stdcall [glEnable], GL_DEPTH_TEST
stdcall [glClearColor], 0.2,0.0,0.2,0.0
call draw_3d