TinyGL: Added gluDisk. Fixed args in gluCylinder and gluSphere (#223)
TinyGL: - Fixed setting of `GL_FRONT_AND_BACK` mode; - Fixed setting of `GL_SPOT_DIRECTION` angle; - Optimization of drawing triangles and lines; - Input parameters are adjusted to the OpenGL standard in `gluCylinder` and `gluSphere` functions; - Added `gluDisk` function (the gluDisk function draws a disk-shaped quadric figure); - Optimize function `calc_buf`. Flag: - Added lighting. info3ds, info3ds_u, test_glu0, test_glu1, test_glu2, textures0, textures1, textures2: - Updated programs using `gluCylinder` and `gluSphere`. Reviewed-on: #223 Reviewed-by: Ivan B <dunkaist@noreply.localhost> Reviewed-by: Max Logaev <maxlogaev@proton.me> Co-authored-by: IgorA <aie85playm@gmail.com> Co-committed-by: IgorA <aie85playm@gmail.com>
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