TinyGL:
- fixed setting of 'GL_FRONT_AND_BACK' mode - fixed setting of 'GL_SPOT_DIRECTION' angle - optimization of drawing triangles and lines - fixes in 'gluCylinder' and 'gluSphere' functions - 'gluDisk' function added - optimize function 'calc_buf' - clean code Flag: add lighting info3ds, info3ds_u, test_glu0, test_glu1, test_glu2, textures0, textures1, textures2: - updated programs using 'gluCylinder' and 'gluSphere'
This commit is contained in:
@@ -393,20 +393,9 @@ align 4
|
||||
mov [dx1],eax ;dx1 = l2.x - l1.x
|
||||
cmp edx,0 ;if (dy1 > 0)
|
||||
jle .els_3
|
||||
xor edx,edx
|
||||
cmp eax,0
|
||||
jl .otr_dx1
|
||||
shl eax,16
|
||||
div dword[dy1] ;eax = (dx1 << 16) / dy1
|
||||
jmp .end_3
|
||||
align 4
|
||||
.otr_dx1:
|
||||
neg eax
|
||||
inc eax
|
||||
shl eax,16
|
||||
div dword[dy1] ;eax = (-dx1 << 16) / dy1
|
||||
neg eax
|
||||
inc eax
|
||||
cdq
|
||||
idiv dword[dy1] ;eax = (dx1 << 16) / dy1
|
||||
jmp .end_3
|
||||
align 4
|
||||
.els_3:
|
||||
@@ -505,7 +494,6 @@ end if
|
||||
.end_upd_l:
|
||||
|
||||
; compute values for the right edge
|
||||
|
||||
cmp dword[update_right],0 ;if(update_right)
|
||||
je .end_upd_r
|
||||
mov ebx,[pr1]
|
||||
@@ -521,20 +509,9 @@ end if
|
||||
mov [dy2],edx ;dy2 = pr2.y - pr1.y
|
||||
cmp edx,0 ;if (dy2 > 0)
|
||||
jle .els_4
|
||||
xor edx,edx
|
||||
cmp eax,0
|
||||
jl .otr_dx2
|
||||
shl eax,16
|
||||
div dword[dy2] ;eax = (dx2 << 16) / dy2
|
||||
jmp .end_4
|
||||
align 4
|
||||
.otr_dx2:
|
||||
neg eax
|
||||
inc eax ;dx2 *= -1
|
||||
shl eax,16
|
||||
div dword[dy2] ;eax = (-dx2 << 16) / dy2
|
||||
neg eax
|
||||
inc eax
|
||||
cdq
|
||||
idiv dword[dy2] ;eax = (dx2 << 16) / dy2
|
||||
jmp .end_4
|
||||
align 4
|
||||
.els_4:
|
||||
|
Reference in New Issue
Block a user