Subversion Repositories Kolibri OS

Rev

Rev 5153 | Rev 5163 | 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. endp
  11.  
  12. align 4
  13. proc glopClearDepth uses eax ebx, context:dword, p:dword
  14.         mov eax,[context]
  15.         mov ebx,[p]
  16.         mov ebx,[ebx+4] ;ebx = p[1]
  17.         mov dword[eax+offs_cont_clear_depth],ebx
  18.         ret
  19. endp
  20.  
  21. align 4
  22. proc glopClear uses eax ebx, context:dword, p:dword
  23.         mov eax,[context]
  24.         mov ebx,[eax+offs_cont_clear_color+8] ;context.clear_color.v[2]
  25.         shl ebx,16
  26.         push ebx
  27.         mov ebx,[eax+offs_cont_clear_color+4] ;context.clear_color.v[1]
  28.         shl ebx,16
  29.         push ebx
  30.         mov ebx,[eax+offs_cont_clear_color] ;context.clear_color.v[0]
  31.         shl ebx,16
  32.         push ebx
  33.  
  34.         mov ebx,[p]
  35.         mov ebx,[ebx+4] ;ebx = p[1]
  36.         and ebx,GL_COLOR_BUFFER_BIT
  37.         push ebx
  38.         mov ebx,[p]
  39.         mov ebx,[ebx+4] ;ebx = p[1]
  40.         and ebx,GL_DEPTH_BUFFER_BIT
  41.  
  42.         ; TODO : correct value of Z
  43.         stdcall ZB_clear,[eax+offs_cont_zb],ebx,0 ;,...,r,g,b
  44.         ret
  45. endp
  46.  
  47.  
  48.