Subversion Repositories Kolibri OS

Rev

Rev 5159 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1.  
  2. align 4
  3. proc glopClearColor uses ecx esi edi, context:dword, p:dword
  4.         mov esi,[p]
  5.         add esi,4
  6.         mov edi,[context]
  7.         add edi,offs_cont_clear_color
  8.         mov ecx,4
  9.         rep movsd
  10.         ret
  11. endp
  12.  
  13. align 4
  14. proc glopClearDepth uses eax ebx, context:dword, p:dword
  15.         mov eax,[context]
  16.         mov ebx,[p]
  17.         mov ebx,[ebx+4] ;ebx = p[1]
  18.         mov dword[eax+offs_cont_clear_depth],ebx
  19.         ret
  20. endp
  21.  
  22. align 4
  23. fl_65535 dd 65535.0
  24.  
  25. align 4
  26. proc glopClear uses eax ebx, context:dword, p:dword
  27.         mov eax,[context]
  28.         fld dword[eax+offs_cont_clear_color+8] ;context.clear_color.v[2]
  29.         fmul dword[fl_65535]
  30.         fistp dword[esp-4]
  31.         fld dword[eax+offs_cont_clear_color+4] ;context.clear_color.v[1]
  32.         fmul dword[fl_65535]
  33.         fistp dword[esp-8]
  34.         fld dword[eax+offs_cont_clear_color] ;context.clear_color.v[0]
  35.         fmul dword[fl_65535]
  36.         fistp dword[esp-12]
  37.         sub esp,12
  38.  
  39.         mov ebx,[p]
  40.         mov ebx,[ebx+4] ;ebx = p[1]
  41.         and ebx,GL_COLOR_BUFFER_BIT
  42.         push ebx
  43.         mov ebx,[p]
  44.         mov ebx,[ebx+4] ;ebx = p[1]
  45.         and ebx,GL_DEPTH_BUFFER_BIT
  46.  
  47.         ; TODO : correct value of Z
  48.         stdcall ZB_clear,[eax+offs_cont_zb],ebx,0 ;,...,r,g,b
  49.         ret
  50. endp
  51.  
  52.  
  53.