horde3d / Horde3D

Horde3D is a small 3D rendering and animation engine. It is written in an effort to create an engine being as lightweight and conceptually clean as possible.
http://horde3d.org/
1.55k stars 308 forks source link

glDrawBuffers is a global state function, used incorrectly #149

Open JSandusky opened 5 years ago

JSandusky commented 5 years ago

Per the title, glDrawBuffers is used incorrectly and has to be specified (per the literal language of the spec) every time the fbo is changed.

This is why deferred rendering doesn't function on Intel hardware (like an HD4000). ATI/nVidia treat the fbo a bit like a vao, which is not correct - drivers massaging out common errors.

algts commented 5 years ago

Hello. Did you test on gl4 backend or gl2 backend? I can confirm that intel 530 works correctly with deferred rendering (win 10).

JSandusky commented 5 years ago

I checked an intel 3600 and an HD4000 in GL2. The HD4000 I also checked in GL4 (had to cheat it to create a 4.0 (GLFW) instead of a 4.3 one).

I made the necessary changes for the HD4000 to run GL4 deferred-pipeline correctly. I need to do the same changes to GL2 and check the 3600 again on it (that's a GL3 device IIRC).

Though, if newer Intels have taken the same interpretation of the specs (the language is nonsensically vague in them) as the other vendors it might make sense to only make those changes in GL2 (where the issue is more realistic) or ignore it altogether.