Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I was doing the same as you. Gouraud shading, texture-mapping, phong-shading.

I looked at your code and saw only .cpp files. I had to open your triangle renderer, and there it was - you'd inlined your x86. I don't think I ever inlined my assembler, even though I was using Borland C++ like you. I think I must have linked it in somehow?



> I was doing the same as you. Gouraud shading, texture-mapping, phong-shading.

Is your old code posted anywhere? I think many of us were working from the same example projects/tutorials. I wouldn't be surprised if the code is incredibly similar.

> I had to open your triangle renderer, and there it was - you'd inlined your x86.

Being able to inline asm was amazing. The code:

https://github.com/bhouston/3DMaskDemo1997/blob/master/src/N...

Being able to access C++ variables on the stack directly from assembler to read and to write to them was so nice. You get the speed benefits without adding significant complexity.


I mixed TurboPascal (or C++) with Assembly for critical loops, and it changed everything :-) (high level for overall scripting, low level for rendering triangle loops).

I would love to be able to properly decompile my old demos, but it would require a bit of work.

For phong rendering, I remember I interpolated the full vector along each line (with an "integer" square root table stored in memory, taking 512k or something), it was fun times :-)


I think all of my code is lost now. My artist friend says he has a hard drive which might have the binaries on it.

I did find one of my commercial releases on the Internet the other day because it was on a magazine cover disk in 1994 which saved it from obscurity :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: