1 Commits

Author SHA1 Message Date
f42e35f19a TinyGL:
All checks were successful
Build system / Check kernel codestyle (pull_request) Successful in 28s
Build system / Build (pull_request) Successful in 8m3s
- 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'
2025-05-01 22:55:02 +03:00

View File

@@ -138,12 +138,12 @@ macro interpolate q, p0, p1, t
{
fld dword[t]
; интерполяция по координатам
fld dword[p1+GLVertex.pc]
fsub dword[p0+GLVertex.pc]
; interpolation by coordinates
fld dword[p1+GLVertex.pc+offs_X]
fsub dword[p0+GLVertex.pc+offs_X]
fmul st0,st1
fadd dword[p0+GLVertex.pc]
fstp dword[q+GLVertex.pc] ;q.pc.X = p0.pc.X + (p1.pc.X - p0.pc.X) * t
fadd dword[p0+GLVertex.pc+offs_X]
fstp dword[q+GLVertex.pc+offs_X] ;q.pc.X = p0.pc.X + (p1.pc.X - p0.pc.X) * t
fld dword[p1+GLVertex.pc+offs_Y]
fsub dword[p0+GLVertex.pc+offs_Y]
@@ -163,7 +163,7 @@ macro interpolate q, p0, p1, t
fadd dword[p0+GLVertex.pc+offs_W]
fstp dword[q+GLVertex.pc+offs_W]
; интерполяция по цвету
; color interpolation
fld dword[p1+GLVertex.color]
fsub dword[p0+GLVertex.color]
fmul st0,st1
@@ -228,7 +228,7 @@ align 4
fstsw ax
sahf
jae .r1_f1
fstp dword[ebx] ;if (t<*tmin) *tmax=t
fstp dword[ebx] ;if (t<*tmax) *tmax=t
jmp .r1
align 4
.els_1: ;else if (num>0)