Magnus Norddahl
ef6d217623
Rearrange the code slightly so it is easier to add other backends
2019-12-23 20:09:38 +01:00
Magnus Norddahl
84efdad49e
Add the license that applies to BuilderNative
2019-12-23 00:13:09 +01:00
Magnus Norddahl
e1ff5fc0da
Implement resource cleanup for all resource types
2019-12-22 23:44:58 +01:00
Magnus Norddahl
848ff8e771
Fix typo
2019-12-21 03:32:59 +01:00
Magnus Norddahl
b0538ac3c8
Move matrix functions to its own file
2019-12-21 03:31:44 +01:00
Magnus Norddahl
28406cf1a7
Declare the uniform variables in C#
2019-12-21 02:14:42 +01:00
Magnus Norddahl
a21edf78da
Misc adjustments to make the cherry-picked 'C# shader resources' commit work
2019-12-21 01:47:27 +01:00
Magnus Norddahl
236ddd14eb
Remove shader references from BuilderNative.vcxproj
2019-12-21 01:36:31 +01:00
Magnus Norddahl
7f6ff8929d
Move the shaders to C# resources
2019-12-21 01:26:58 +01:00
Magnus Norddahl
5c5633c1e7
Clearing the current active OpenGL context is apparently very expensive. Only do it if we're destroying an OpenGL context.
2019-12-20 05:30:27 +01:00
Magnus Norddahl
80f815cad9
Fix the error handling: only create one call unless there's an error and only check for errors in functions that can fail
2019-12-20 03:39:06 +01:00
Magnus Norddahl
4274ee2893
Use C++ and SSE code to do matrix math
...
Avoid copying by passing matrices by reference to RenderDevice
Use fasttrig from GZDoom for faster cos/sin
Don't set matrices unless they changed. Even though the memcmp prevents it from being pushed to OpenGL it is still a waste.
2019-12-19 03:12:44 +01:00
Magnus Norddahl
b19ce39abc
Only set uniforms if they changed
2019-12-18 04:22:47 +01:00
Magnus Norddahl
de2e336cb1
Use OpenGL sampler objects
2019-12-18 03:24:09 +01:00
Magnus Norddahl
b70b114a6b
Place all vertex buffers in the same GPU vertex buffer so that the 3D scene only contains 2 vertex buffer binds per frame
2019-12-18 02:27:49 +01:00
ZZYZX
b3a4f563e9
Call wglMakeCurrent before SwapBuffers in Windows context implementation
2019-12-18 00:36:13 +02:00
ZZYZX
4cb6d68c45
Use PBO to stream texture data for software rendering
2019-12-16 06:54:44 +02:00
ZZYZX
2433b8eb0d
Removed -f suffixes for floats (not supported on AMD)
2019-12-16 01:17:41 +02:00
ZZYZX
502b641967
Improved error reporting
2019-12-15 23:53:33 +02:00
ZZYZX
99a90512f1
Fixed: depth tested FBO did not work
2019-12-15 18:48:38 +02:00
ZZYZX
d1ff6bcc36
Fixed: line can be either dotted or smoothed
2019-12-15 07:20:54 +02:00
ZZYZX
2c3013f74c
Make everything build with VS2015 again
2019-12-14 23:42:44 +02:00
Magnus Norddahl
03e9da365e
Misc fixes for mono P/Invoke of BuilderNative
2019-08-30 10:30:28 +02:00
Magnus Norddahl
3cd96fc788
Fix linux compile errors and build the BuilderNative.so library
2019-08-30 08:45:14 +02:00
Magnus Norddahl
9d02676f8f
- fix wrong uniform state
2019-08-22 22:59:27 +02:00
Magnus Norddahl
64cc7d2bc2
- implement the fixed function fog
2019-08-22 18:43:54 +02:00
Magnus Norddahl
1ef7d4a267
- improve performance
2019-08-22 15:46:24 +02:00
Magnus Norddahl
0562dac685
- fix screenverts math and some line drawing bugs
2019-08-20 12:45:23 +02:00
Magnus Norddahl
4c0e6e8fcc
- implement plotter as a shader
2019-08-20 11:00:24 +02:00
Magnus Norddahl
3b2d50cce0
- add the X11 OpenGL init code, even though it is useless until someone repairs mono's winforms implementation
2019-08-18 06:04:15 +02:00
Magnus Norddahl
ebba32e7ba
- add the appropriate ifdefs for an unix build
2019-08-18 03:29:33 +02:00
Magnus Norddahl
5ccc225fa8
- fix light pass
2019-08-17 05:21:28 +02:00
Magnus Norddahl
c914aadcaa
- simplify texture binding
2019-08-17 03:21:11 +02:00
Magnus Norddahl
c88b94e1c9
- render to texture bug fixes
2019-08-17 03:08:34 +02:00
Magnus Norddahl
0542bd25ec
- convert texturefactor to uniform
2019-08-16 14:01:27 +02:00
Magnus Norddahl
3968206199
- Sending data to Direct3D 9 just to retrieve it is stupid
2019-08-16 13:38:53 +02:00
Magnus Norddahl
9b53939f0c
- simplify vertex buffer and vertex format
2019-08-16 13:07:57 +02:00
Magnus Norddahl
d701987fb4
- don't pass sizes into VertexBuffer and IndexBuffer constructors
...
- CopyTexture bug fixes
2019-08-16 11:24:22 +02:00
Magnus Norddahl
fb137d46db
- draw streamed vertices
2019-08-16 07:45:34 +02:00
Magnus Norddahl
5604685770
- remove old fixed function shader as it isn't used
2019-08-16 07:10:46 +02:00
Magnus Norddahl
55c404e689
- add raw mouse input
2019-08-16 06:39:18 +02:00
Magnus Norddahl
c4dafbedc1
- implement alpha test
2019-08-16 04:10:03 +02:00
Magnus Norddahl
8ea439a5c2
- fix some rendering problems in visual mode
2019-08-15 14:49:49 +02:00
Magnus Norddahl
a292300eaa
- use some more sane values for the frame buffer
2019-08-15 09:49:36 +02:00
Magnus Norddahl
e6731115ed
- and we have visuals!
2019-08-15 09:40:49 +02:00
Magnus Norddahl
10c06cc662
- minor bug fix
2019-08-15 02:57:09 +02:00
Magnus Norddahl
a542385cd7
- force texture and buffer updating to go through RenderDevice
2019-08-15 02:52:21 +02:00
Magnus Norddahl
b41cb07eaa
- Hook up texture creation and binding
2019-08-14 13:51:05 +02:00
Magnus Norddahl
1d09a0f86a
- implement ApplyUniforms
2019-08-14 12:36:33 +02:00
Magnus Norddahl
3c44f77b60
- port all the direct3d shaders to glsl
2019-08-14 07:55:21 +02:00
Magnus Norddahl
2eaf323ad0
- fix vertex array object binding bug
...
- add shader program
- fix that alpha color was stored in red channel in Color4
- fix buffer upload bug
2019-08-12 08:33:40 +02:00
Magnus Norddahl
fd37c455d2
- Upload and apply vertex buffers, index bufers and vertex declarations
2019-08-10 07:46:29 +02:00
Magnus Norddahl
d48f032b71
- create OpenGL context
2019-08-10 02:32:08 +02:00
Magnus Norddahl
3fae1e9ef3
- add RenderDevice bindings
2019-08-10 00:46:51 +02:00
Magnus Norddahl
407cc703b8
- implement enough of BuilderNative for GZDB to successfully run without crashing
2019-08-09 23:15:48 +02:00
Magnus Norddahl
37876f6d8a
- add BuilderNative library that does the actual rendering
2019-08-09 06:18:08 +02:00