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
Daniel Buckmaster
540e68aadb
Undid changes to Point3F.
2015-01-26 00:16:38 +11:00
Luis Anton Rebollo
6492028bb2
Merge pull request #1035 from bpay/memfixes
...
Memfixes
2015-01-25 13:42:32 +01:00
Vincent Gee
c1203c1cea
Dev forest wind emitter improvement
...
So the problem is that when your inside the sphere it won't render so it might make someone
think that it's not working right. So what I did was determine if the camera is inside the sphere.
If the camera is inside the sphere, then I find the distance from the center of the sphere to the camera
Round down and use that as the radius to draw the sphere.
That way if someone zooms in or out, their screen is still showing the sphere.
2015-01-25 22:50:36 +11:00
Luis Anton Rebollo
79df1a1b3a
Merge pull request #1089 from eightyeight/profile-stringtable
...
Add profiler regions for StringTable functions
2015-01-25 10:56:20 +01:00
LuisAntonRebollo
19afd0c22b
.
2015-01-25 02:01:11 +01:00
Luis Anton Rebollo
94f5e6d9dc
Merge pull request #1080 from eightyeight/netevent-reference-counting
...
Use a strong reference instead of more manual reference counting
2015-01-24 23:03:33 +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
Luis Anton Rebollo
be84142502
Merge pull request #1118 from Lopuska/patch-17
...
fix #1117
2015-01-24 22:59:06 +01:00
Luis Anton Rebollo
ca382f56a6
Merge pull request #1119 from Lopuska/patch-18
...
OpenGL fix - fixed a crash when you activate Alpha Threshold checkbox wi...
2015-01-24 22:58:47 +01:00
LuisAntonRebollo
4e9034854d
Linux implementation. Include changes for gcc x64.
2015-01-24 22:08:26 +01:00
LuisAntonRebollo
a7002c0ecc
Changes for Linux.
2015-01-24 21:52:46 +01:00
Anis
4ccf89ba8e
fix to avoid a missing sampler name declaration
2015-01-21 14:39:05 +01:00
Anis
5d392e373e
Update shaderFeatureGLSL.cpp
2015-01-20 19:13:25 +01:00
Anis
c9116dd4a4
OpenGL fix - fixed a crash when you activate Alpha Threshold checkbox without a diffuse map
2015-01-20 19:07:29 +01:00
Anis
f05b1b5cbd
fix #1117
2015-01-20 17:02:56 +01:00
Anis
9d84372dc8
Intel OpenGL - fix a crash/shader compile error when you activate Vertex Lit from Material Editor
2015-01-19 20:56:02 +01:00
Anis
32b2564cd5
Jeff faust fix also on openGL.
2015-01-19 18:04:31 +01:00
Anis
ee4f0df69a
Update gfxGLDevice.win.cpp
2015-01-19 17:44:48 +01:00
LuisAntonRebollo
3336bffad2
Changes for Linux.
2015-01-19 01:44:36 +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
LukasPJ
a3f08df9e3
Fix for fuzzy borders
2015-01-12 17:03:52 +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
Jeff Hutchinson
f615802ba2
Fixed defines for shadergen. Defines were "defining" structure properties out for IN structures.
...
example:
// struct VertexData
// {
// vec3 position;
// vec3 normal;
// vec3 T;
// vec3 B;
// vec2 texCoord;
// vec2 texCoord2;
// } IN;
//
// varying vec4 _TEXCOORD2_;
//
// #define texCoord2 OUT_texCoord2
// #define OUT_outVpos _TEXCOORD2_
2015-01-11 01:30:58 -05:00
Ben Payne
b2b950c84a
Add missing include guards to some headers
2015-01-06 00:42:33 -05:00
Ben Payne
3574ef838b
Fix erroneous include guards
2015-01-06 00:42:09 -05:00
Daniel Buckmaster
33a0579735
Merge pull request #1093 from eightyeight/fix-setextent
...
Fix setExtent
2015-01-02 19:40:00 +11:00
Daniel Buckmaster
f1da30f285
Those are ints, not floats.
2015-01-02 19:38:05 +11:00
Daniel Buckmaster
7ab6731f51
Merge branch 'development' into walkabout
...
Conflicts:
Templates/Empty/game/tools/worldEditor/scripts/editors/creator.ed.cs
Templates/Full/game/tools/worldEditor/scripts/editors/creator.ed.cs
2015-01-02 14:45:20 +11:00
Daniel Buckmaster
37159bf9ad
Take object scale into account.
2015-01-02 13:59:16 +11:00
Daniel Buckmaster
93b0179019
Merge pull request #1002 from Winterleaf/Fix-ScatterSky-Zindex
...
Z Offset for Scattersky to fix the rendering issue at high altitudes.
2015-01-02 13:04:24 +11:00
Daniel Buckmaster
dd9e416b00
Regenerate flex/bison files.
2015-01-01 10:33:50 +11:00
Daniel Buckmaster
5a66f00697
Use a buffer on the stack.
2015-01-01 10:33:35 +11:00
Daniel Buckmaster
170a4ea08f
Add anonymous functions before other statements.
2014-12-29 22:44:57 +11:00
Daniel Buckmaster
412247c401
Regenerate lex/bison files.
2014-12-29 21:50:11 +11:00
Daniel Buckmaster
1204b81a78
Added anomymous functions as in Konrad Kiss's resource.
2014-12-29 21:49:52 +11:00
Daniel Buckmaster
40b871e652
Add profiling to StringTable.
2014-12-29 20:20:00 +11:00
Daniel Buckmaster
e9308e40ed
Merge pull request #998 from rextimmy/physx3_cpu_dispatcher_fix
...
Fixed issue where physx3 cpu dispatcher was created multiple times
2014-12-29 14:14:05 +11:00
Daniel Buckmaster
05b8fe4423
Bump version numbers.
2014-12-29 12:32:45 +11:00
Daniel Buckmaster
f85fc550c5
Merge pull request #1038 from stenyak/fix-cursor-show-bug
...
Fix off-by-one error in cursor hiding/showing function
2014-12-28 22:54:41 +11: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
Azaezel
6ee81d9420
Revert "Ref Count Catch"
...
This reverts commit dbf9275037 .
2014-12-26 13:04:53 -06:00