Commit graph

308 commits

Author SHA1 Message Date
Luis Anton Rebollo
8da9b7461f Merge pull request #1085 from Azaezel/DX9CubemapMips
cubemap Mip retrieval-DX
2015-02-15 22:55:11 +01:00
Azaezel
43e0826308 reordered by request 2015-02-12 14:47:39 -06:00
Azaezel
02de4658e5 nvidia nsight debugger support.
requires defining the TORQUE_NSIGHT_WORKAROUND preprocessor macro
2015-02-12 14:31:10 -06:00
Luis Anton Rebollo
1097e957a3 Merge pull request #1048 from Lopuska/patch-11
missing texture format.
2015-02-07 18:04:46 +01:00
Ben Payne
c19a70814c Tidy up and fix the various Assert macros
Rephrase the macros so that they can be used in expressions, and
properly require semicolons. And add the semicolons where missing.
2015-02-02 18:37:48 -05:00
Luis Anton Rebollo
cc9be50422 Merge pull request #1121 from bpay/fix-buffer-overflows
Fix buffer overflows
2015-02-02 20:15:51 +01:00
Nathan Bowhay
ac0ba27753 Fixed degree symbol not displaying
Fixed bug with degree symbol not displaying correctly in torque thanks
to the forums:
http://www.garagegames.com/community/forums/viewthread/125190/1#comment-804996
2015-01-29 15:18:00 -08:00
Daniel Buckmaster
014b566014 Merge remote-tracking branch 'gg/development-3.6' into development
Conflicts:
	Engine/source/T3D/gameFunctions.cpp
2015-01-29 21:17:38 +11:00
Ben Payne
4694b0a8ed Fix buffer size larger than necessary 2015-01-26 16:52:04 -05:00
Ben Payne
a88339c219 Fix buffer overflows due to incorrect use of sizeof
A snippet of example code:

UTF16 pszFilter[1024];
...
convertUTF8toUTF16((UTF8 *)mData.mFilters, pszFilter, sizeof(pszFilter));

Since the conversion function is expecting the third parameter to be the
length in 16-bit characters, *not* bytes, this results in the function
writing outside the bounds of the output array.

To make this less likely to happen in the future (I hope), I've provided a
template function that infers the correct size of a static array, so it's
no longer necessary to pass the size in most cases. The sized function has
been renamed with an "N" suffix to hopefully encourage this use.

This bug was caught due to a warning from MSVC about stack corruption
occurring in codeBlock::exec(), after opening a file open dialog twice in
succession. After some hunting, I found that this was due to
FileDialog::Execute() passing incorrect buffer sizes to the conversion
function, which resulted in the function writing a null terminator into
some memory that happened to be in the stack frame of codeBlock::exec()!
2015-01-26 16:52:01 -05:00
LuisAntonRebollo
52d8aa3a97 Remove a get* OpenGL function causing CPU-GPU sync point (bad performance). 2015-01-26 01:56:13 +01:00
Luis Anton Rebollo
6492028bb2 Merge pull request #1035 from bpay/memfixes
Memfixes
2015-01-25 13:42:32 +01:00
Luis Anton Rebollo
ea0e3fd683 Merge pull request #1096 from bpay/fix-include-guards
Fix include guards
2015-01-24 23:02:13 +01:00
LuisAntonRebollo
4e9034854d Linux implementation. Include changes for gcc x64. 2015-01-24 22:08:26 +01:00
Anis
ee4f0df69a Update gfxGLDevice.win.cpp 2015-01-19 17:44:48 +01:00
LuisAntonRebollo
aa35157eef PlatformSDL implementation. 2015-01-19 01:17:37 +01:00
LuisAntonRebollo
21d58bb191 Modified files for SDL2. 2015-01-19 00:33:23 +01:00
Azaezel
b8c750dd56 extraneous mipmap generation prune
OR spits out quite a few pointless mips for non square textures, which can lead to it triggering that AssertFatal(mNumMipLevels <= c_maxMipLevels, "GBitmap::allocateBitmap: too many miplevels"); entry
2015-01-11 17:45:29 -06:00
Ben Payne
b2b950c84a Add missing include guards to some headers 2015-01-06 00:42:33 -05:00
Azaezel
f1d382fcff cubemap Mip retrieval-DX
similar to opengl, if the textures comprising a cubemap contain mips, it retrieves them, otherwise it generates them.
2014-12-27 11:34:08 -06:00
Luis Anton Rebollo
39bd99a61a Merge pull request #1056 from Lopuska/patch-12
mipmap support on OpenGL cubemap
2014-12-27 03:18:16 +01:00
LuisAntonRebollo
6789270789 OpenGL: Mipmaps for GFXGLCubemap. Fix dynamic cubemaps. 2014-12-27 03:03:33 +01:00
Luis Anton Rebollo
9eb05b2bdc Merge pull request #1083 from BeamNG/opengl_intel_WIP
Fix/walkaround for OpenGL on Intel
2014-12-27 01:13:14 +01:00
LuisAntonRebollo
c2c9cf4a2d OpenGL: Mipmaps for GFXGLCubemap. Fix compressed textures. 2014-12-27 00:01:21 +01:00
LuisAntonRebollo
2f8f89d486 OpenGL: Mipmaps for GFXGLCubemap. Fix mipmaps size. 2014-12-26 21:28:31 +01:00
LuisAntonRebollo
9150c7f5ab OpenGL: Mipmaps for GFXGLCubemap. 2014-12-26 21:03:54 +01:00
Daniel Buckmaster
ae284a89ec Merge branch 'development' into defineconsolemethod
Conflicts:
	Engine/source/materials/materialDefinition.cpp
2014-12-26 13:22:16 +11:00
Daniel Buckmaster
3ab048c5b0 Fixes after feedback from Luis.
* Made use of dStrIsEmpty in more locations (and fixed it :P)
 * Removed commented-out code
 * Corrected default params
 * Fixed some console warning formats
 * Removed tabs
 * Corrected setExtent API
2014-12-23 18:48:02 +11:00
Daniel Buckmaster
9396ae7176 Merge remote-tracking branch 'Winterleaf/Development-Console' into defineconsolemethod
Conflicts:
	Engine/source/T3D/missionMarker.cpp
2014-12-21 21:23:55 +11:00
Anis
ca04726ad6 glGenerateMipmap on uncompressed cubemap 2014-12-16 15:14:30 +01:00
Anis
0cf36a8906 mipmap support on DDS for openGL cubemap 2014-12-15 18:59:42 +01:00
Ben Payne
cadc390895 Fix leaked member var 2014-12-13 16:08:48 -05:00
Anis
2db9aa52ef missing texture format.
To silence a console error on startup (OpenGL)
2014-12-13 15:11:13 +01:00
LuisAntonRebollo
d000a1e7c5 OpenGL Intel - Workaround for warning spam or even crash with actual framebuffer code, remove when implemented TGL layer. 2014-12-11 01:20:39 +01:00
LuisAntonRebollo
190f68b998 Fix SkatterSky flare occlusion. 2014-12-09 23:34:21 +11:00
Anis
1a76341049 Update gfxGLDevice.cpp 2014-12-06 20:46:27 +01:00
Anis
2165266ff4 revert vsync on reset changes 2014-12-06 20:44:47 +01:00
Anis
005f322a94 vsync update on reset settings 2014-12-06 19:41:00 +01:00
Anis
b444cabe4d vSync on opengl 2014-12-06 19:32:38 +01:00
LuisAntonRebollo
d49018df63 Fix GLCircularVolatileBuffer incorrect binding. 2014-12-05 22:56:22 +01:00
LuisAntonRebollo
4409a12af6 Fix GLSL out fragment shader color. 2014-11-30 05:32:40 +01:00
LuisAntonRebollo
a4bf61f07b Fix x64 builds. 2014-11-30 04:00:58 +01:00
Azaezel
fdbe6ce849 opengl error reporting formatting 2014-11-29 20:45:55 -06:00
LuisAntonRebollo
98e3651db5 Merge pull request #940 from BeamNG/add_opengl_support
Add/Activate OpenGL render.
2014-11-30 02:48:13 +01:00
LuisAntonRebollo
3067c3f0b2 Merge pull request #924 from BeamNG/remove_disableshader
Remove GFXDevice::disableShader
2014-11-30 02:47:46 +01:00
LuisAntonRebollo
0747a0efe9 Remove GFXDevice::disableShader becouse we are going to remove Fixed Function Pipeline and we need a shader for render. 2014-11-30 02:36:21 +01:00
LuisAntonRebollo
50fab23cb0 Merge pull request #938 from BeamNG/remove_old_opengl
Remove old/unused OpenGL files.
2014-11-30 02:23:29 +01:00
LuisAntonRebollo
9c66aa0681 Merge pull request #931 from BeamNG/terrain_layer_format
Set correct terrain layer texture format.
2014-11-30 02:22:39 +01:00
LuisAntonRebollo
07b0ea9ca6 Merge pull request #927 from BeamNG/setupgenericshader
Add GFXDevice::setupGenericShader for fix render on non FFP.
2014-11-30 02:22:13 +01:00
LuisAntonRebollo
60f4d4f282 Merge pull request #926 from BeamNG/primbuild_for_non_ffp
Fix PrimBuild with non Fixed Function Pipeline.
2014-11-30 02:21:36 +01:00