Christoph Oelckers
a2dc4afe3f
- screwed by the editor's autocompletion... (wrong GL flag was used...)
2014-08-19 14:25:47 +02:00
Christoph Oelckers
00d7707aef
- allow reallocation of light buffer if more lights are needed.
...
- added a light preprocessing pass to the renderer so that a non-persistent buffer can be used with minimal mapping/unmapping. This only gets used if necessary because it adds some overhead to the renderer.
2014-08-19 14:18:21 +02:00
Christoph Oelckers
38796e7714
- removed some obsolete and useless GL calls.
2014-08-17 11:41:03 +02:00
Christoph Oelckers
b9ffb51d0c
- small but important optimization: Two-sided lines with both sides in the same sector don't really require vertex splitting for precise rendering.
2014-08-04 23:00:40 +02:00
Christoph Oelckers
19cfffebb3
- fixed: the WallTypes enum contained a value that no longer was valid. This was fixed orignally last week but it seems to have gotten lost.
2014-08-03 12:21:05 +02:00
Christoph Oelckers
c98e3ca99d
Merge branch 'master' into v2.x
2014-08-03 10:58:41 +02:00
Christoph Oelckers
b3e0d93385
- implemented rendering of wall sprites.
2014-08-03 10:57:58 +02:00
Christoph Oelckers
398d902e7e
- split off sprite clipping adjustment code into its own function.
2014-08-03 10:22:12 +02:00
Christoph Oelckers
a63871d170
- at least for Intel GMA we need shaders without 'discard' to render non-transparent stuff. The performance penalty is rather hefty here.
2014-08-02 21:06:34 +02:00
Christoph Oelckers
a97b58fa27
- added check for light uniform buffer overflows, because uniform buffers on Intel are rather small.
2014-08-02 20:41:13 +02:00
Christoph Oelckers
e35fefdc06
- better rebind the active shader after updating the matrices.
2014-08-02 11:59:04 +02:00
Christoph Oelckers
b2860a1d63
- it looks like glProgramUniform is not working correctly with Intel drivers, so better forget about it for setting the view and projection matrices. Even on NVidia the time difference can only be measured in microseconds per frame so it's not a big loss.
2014-08-02 11:57:42 +02:00
Christoph Oelckers
a8e9c1832f
- decided to restrict the 2.0 beta to OpenGL 4.x with GL_ARB_buffer_storage extension and removed all code for supporting older versions.
...
Sadly, anything else makes no sense.
All the recently made changes live or die, depending on this extension's presence.
Without it, there are major performance issues with the buffer uploads. All of the traditional buffer upload methods are without exception horrendously slow, especially in the context of a Doom engine where frequent small updates are required.
It could be solved with a complete restructuring of the engine, of course, but that's hardly worth the effort, considering it's only for legacy hardware whose market share will inevitably shrink considerably over the next years.
And even then, under the best circumstances I'd still get the same performance as the old immediate mode renderer in GZDoom 1.x and still couldn't implement the additions I'd like to make.
So, since I need to keep GZDoom 1.x around anyway for older GL 2.x hardware, it may as well serve for 3.x hardware, too. It's certainly less work than constantly trying to find workarounds for the older hardware's limitations that cost more time than working on future-proofing the engine.
This new, trimmed down 4.x renderer runs on a core profile configuration and uses persistently mapped buffers for nearly everything that is getting transferred to the GPU. (The global uniforms are still being used as such but they'll be phased out after the first beta release.
2014-08-01 22:42:39 +02:00
Christoph Oelckers
7967082e60
- use the light buffer to handle dynamic lighting.
2014-08-01 20:59:39 +02:00
Christoph Oelckers
1ec58011d2
- start of light buffer implementation so that we don't have to use uniform arrays which appear to be broken on AMD.
2014-07-31 00:44:22 +02:00
Christoph Oelckers
ef8f66c9a1
- removed the code for hardware alpha testing again because it didn't work anymore with how things are set up now.
...
- we need to check all GL versions when trying to get a context because some drivers only give us the version we request, leaving out newer features that are not exposed via extension.
- added some status info about uniform blocks.
2014-07-30 23:13:16 +02:00
Christoph Oelckers
beabfad293
Merge branch 'master' into Glew_Version_For_Real
2014-07-28 22:23:56 +02:00
Christoph Oelckers
318aebc4ad
- fixed: the vertex collection code used incorrect indices for checking the checkmap array.
2014-07-28 22:23:17 +02:00
Christoph Oelckers
192daf1d5a
Merge branch 'master' into Glew_Version_For_Real
2014-07-27 21:57:38 +02:00
Christoph Oelckers
ece10bb57f
- fixed several incorrect uses of abs instead of fabs.
2014-07-27 21:57:05 +02:00
Christoph Oelckers
c9c93a58a2
- fixed bad constant and potential use of uninitialized variable.
2014-07-27 21:55:25 +02:00
Christoph Oelckers
3d24f58bf0
- fixed conditions for disabling the flat vertex buffer.
2014-07-27 20:18:32 +02:00
Christoph Oelckers
29a56fe01c
Merge branch 'master' into Glew_Version_For_Real
2014-07-27 17:59:50 +02:00
Christoph Oelckers
925305aa05
- fixed: The code for updating vertex dirty state had been completely missing. I have no idea when it disappeared...
2014-07-27 17:58:51 +02:00
Christoph Oelckers
4904abfc1c
- forgot test stuff.
2014-07-27 13:47:37 +02:00
Christoph Oelckers
97341fcb31
- reenabled the flat vertex buffer for GL 3.x NVidia hardware. On AMD and Intel it'll stay off because past tests have shown that it won't improve performance at all.
2014-07-27 13:46:35 +02:00
Christoph Oelckers
c1d8f235c2
- renamed some stuff that clashed with gl function names.
2014-07-27 12:33:54 +02:00
Christoph Oelckers
77d9d9b2a5
- fixed: For updating the model VAO's attribute pointers it is necessary to first bind the vertex buffer we need to refer to, because this is not part of the VAO's state.
2014-07-27 11:53:18 +02:00
Christoph Oelckers
e07d06fa2a
Merge branch 'master' into Glew_Version_For_Real
2014-07-26 22:26:58 +02:00
Christoph Oelckers
7ae25906fd
- fixed: fog must be disabled before drawing the HUD model, not after it.
2014-07-26 22:26:17 +02:00
Christoph Oelckers
bdf5bbd34e
- make the shader timer part of the render state.
2014-07-26 20:56:10 +02:00
Christoph Oelckers
637aa9d77e
- some adjustments to allow testing the different rendering methods.
2014-07-26 18:43:54 +02:00
Christoph Oelckers
6c9a818220
- allow different render modes if persistent buffers are not available (untested!)
2014-07-26 10:23:07 +02:00
Christoph Oelckers
e0b756e511
- fixed: The cubemapped skybox renderer did not set up the model matrix properly.
2014-07-17 10:04:20 +02:00
Christoph Oelckers
eb9d2d9917
- reactivate compatibility profile so that immediate mode drawing can be used on older hardware not supporting persistently mapped buffers.
...
- reactivate alpha testing per fixed function pipeline
- use the 'modern' way to define clip planes (GL_CLIP_DISTANCE). This is far more portable than the old glClipPlane method and a lot more robust than checking this in the fragment shader.
2014-07-17 02:37:18 +02:00
Christoph Oelckers
6b9d6787d9
- move models into their own draw list to avoid frequent buffer changes.
...
- same for SKYHACK walls. Although rare, they would get in the way of optimizing the draw calls if not being separated out.
2014-07-15 21:16:59 +02:00
Christoph Oelckers
b8bcbe819b
- removed texture based dynamic lighting. For GL 3.x the shader approach is always better.
...
- fixed: sky fog was not unset.
2014-07-15 20:49:21 +02:00
Christoph Oelckers
fb6b4238ed
- fixed: glProgramUniform is only present from GL 4.1 or a specific extension so it may not be used on systems not supporting it.
2014-07-15 02:48:59 +02:00
Christoph Oelckers
fc0cf4f998
- GZDoom now runs on an OpenGL core profile. :)
...
It's probably still necessary to replace GLEW with another loader library. GLEW is pretty much broken on core OpenGL without some hacky workarounds...
2014-07-15 02:26:23 +02:00
Christoph Oelckers
6046b11b4f
- all shaders now compile in core profile.
2014-07-15 01:05:53 +02:00
Christoph Oelckers
eedc5a69be
- replaced builtin position vertex attribute.
2014-07-15 01:02:48 +02:00
Christoph Oelckers
1b7f5a2e6a
- replaced builtin texture coordinate vertex attribute.
2014-07-15 00:59:01 +02:00
Christoph Oelckers
5a322742c3
- remove use of builtin and deprecated color vertex attribute.
2014-07-15 00:37:13 +02:00
Christoph Oelckers
ed8a21fd86
- replaced deprecated alpha testing with shader code.
2014-07-14 21:14:43 +02:00
Christoph Oelckers
84a49e37ee
- handle normals for spheremapped mirror surfaces using non-deprecated features.
...
- move all WGL references out of global header files so that global wgl header include is no longer necessary
2014-07-14 19:54:07 +02:00
Christoph Oelckers
ed5ee4e8d1
- removed some obsolete init stuff and some deprecated constants.
2014-07-14 18:48:46 +02:00
Christoph Oelckers
1f2f7616e1
- remove timing of matrix application method
2014-07-14 00:31:10 +02:00
Christoph Oelckers
150135a07d
- reinstate drawcall timing.
2014-07-13 23:14:28 +02:00
Christoph Oelckers
ce3653f6e1
- remove all uses of builtin matrices.
2014-07-13 23:13:40 +02:00
Christoph Oelckers
2214c0ac06
- remove all uses of builtin matrix manipulation. Only glLoadMatrix for view and projection matrix are left.
2014-07-13 22:37:34 +02:00