TinyGL:
All checks were successful
Build system / Check kernel codestyle (pull_request) Successful in 32s
Build system / Build (pull_request) Successful in 5m37s

- 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:
2025-04-22 21:43:12 +03:00
parent d7795a8961
commit 0c6fca2d92
23 changed files with 1155 additions and 722 deletions

View File

@@ -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: