←back to thread

241 points fschuett | 1 comments | | HN request time: 0.207s | source
Show context
Archit3ch ◴[] No.45662996[source]
> OpenGL 1.1-style implementation on software

How many lines to implement OpenGL 2.0 (non ES) ?

replies(3): >>45663054 #>>45664278 #>>45666931 #
1. Pannoniae ◴[] No.45663054[source]
An order of magnitude more ;) You need to implement user-programmable shaders, both ARB assembly and GLSL. That needs a GLSL parser, a shader interpreter (talking about compiling it to machine code would add another magnitude of complexity).

You also need to implement multitexturing (probably the easy part) but also all the texture combiner stuff too. This one is not hard but also a good chunk of code...

All in all, at least 40K if you ask me, but that's a very lowball estimate.

Of course if you don't care about implementing the full spec, you can get away with a lot less.