1
0
forked from 0ad/0ad
Commit Graph

761 Commits

Author SHA1 Message Date
adbd7633dd # Initial GLSL rendering support
This was SVN commit r10978.
2012-01-29 01:22:22 +00:00
63e151fbd5 Slightly more Android compatibility
This was SVN commit r10975.
2012-01-28 16:38:21 +00:00
e64a3d3946 Experiment a little with OpenGL ES
This was SVN commit r10915.
2012-01-15 23:15:31 +00:00
0ec4242962 Detect and fix printf signedness errors. Fixes #1086, #1087.
This was SVN commit r10846.
2012-01-01 16:43:10 +00:00
fbff0aa98d Fix printf argument types
This was SVN commit r10529.
2011-11-13 18:31:06 +00:00
80df13f47b add support for recursive mutex on windows; ensure h_mgr uses them (pthread doesnt guarantee default type is recursive)
This was SVN commit r10247.
2011-09-10 22:51:51 +00:00
78fe8e1e62 h_mgr: fix simple double-free warning triggered at shutdown when an object's child was freed AND the all objects were forcibly freed (complicated by the fact that the pool allocator overwrites freed storage, which made this appear to be a tag conflict).
fixes #860, #915, #920

This was SVN commit r10243.
2011-09-10 20:04:01 +00:00
5406a68959 feature request by philip: instead of refusing to load textures larger than the OpenGL limit, ensure they have mipmaps (unless it's s3tc, which would be too expensive to recompress) and skip levels until it fits
This was SVN commit r10043.
2011-08-20 17:56:12 +00:00
b9bd7ff86e Fix signed/unsigned comparison warning
This was SVN commit r9972.
2011-08-06 12:31:48 +00:00
083e7a41fd fix typo
This was SVN commit r9962.
2011-08-04 17:27:14 +00:00
0748c5a75e cleanup and simplification of the really old h_mgr code.
replace array-of-pages data structure with demand-committed VM => allows
simple allocation of new resources without having to search for the
first free index. I suspect the cause of multiple reported bugs (refs
#860, #899, #915) was a race. Most issues are fixed, but the pool's
freelist also needs to be made thread-safe and lock-free. this has
performance and 64-bit portability implications, so I'll leave it for
later (Pool is due for some serious refactoring anyway).

please post a comment if this or similar issues persist.

This was SVN commit r9961.
2011-08-04 17:11:16 +00:00
6304797cbd pool - safely handle zero-sized allocations (fixes #909)
snd_mgr - remove no longer needed hacks for native OpenAL
implementations
test_wdbg_sym.h - belated commit of warning fix

This was SVN commit r9944.
2011-07-31 09:42:57 +00:00
8fee3d8ef8 # New territory border rendering.
Add textured line overlay rendering.
Change terrain height calculations to be triangulation-dependent for
improved accuracy.
Add triangulation-dependent terrain normal function.
Support separate S/T wrap modes for textures.
Rename CVector2D_Maths since it no longer conflicts with simulation
CVector2D.
Coalesce freed chunks in vertex buffers, to avoid excessive
fragmentation.
Add some things to help debug vertex buffer allocation a little.

This was SVN commit r9929.
2011-07-30 00:56:45 +00:00
708e9cea05 Fix looping of non-streaming sounds
This was SVN commit r9877.
2011-07-18 17:56:17 +00:00
0d23e3f333 post-alpha sync with work.
debug stack trace fixes, remove more asm, change CONTINUE/OK scheme to
OK/ALL_COMPLETE, fix tests

This was SVN commit r9871.
2011-07-18 09:21:56 +00:00
34186dd017 refactor file interface. requires workspace update
- separate file_system_util into vfs functions (-> vfs/vfs_util) and
file_system (avoids ugly fs_util namespace prefix)
- get rid of non-portable O_BINARY_NP etc. flags
- use standard O_WRONLY etc. flags instead of LIO_WRITE; but avoid the
need for specifying O_CREAT|O_TRUNC
- only open files for aio when O_DIRECT is specified (which 0ad does
not) - avoids wasting time and security issues
- return file descriptor directly instead of via output param
- waio: safer FCB mechanism that avoids mixing descriptors between lowio
and aio

This was SVN commit r9550.
2011-05-25 10:39:13 +00:00
7600c3862b refactor gfx detection code (interface), allow exporting from DLL (required at work)
This was SVN commit r9546.
2011-05-24 14:17:47 +00:00
1075e206f7 Fix some format string errors
This was SVN commit r9534.
2011-05-18 19:10:36 +00:00
7ed9a84252 avoid double-free when sounds are reclaimed and then freed.
fixes #833

This was SVN commit r9477.
2011-05-07 17:34:47 +00:00
46e5db4dc4 fix build with ICC
This was SVN commit r9475.
2011-05-07 15:47:20 +00:00
f608b44d1d fix self-test and map load on Windows (avoid mixing dir separators).
add more specific error codes (used at work)

This was SVN commit r9462.
2011-05-06 18:45:30 +00:00
5c76bc12fa refactor status code definitions: allow modules to define an array of them (more convenient+efficient).
merge ERR::NO_SYS, NOT_IMPLEMENTED into NOT_SUPPORTED
renderer: remove unnecessary ogl_shader include

This was SVN commit r9447.
2011-05-05 13:03:34 +00:00
7523894760 ENSURE(0) -> DEBUG_WARN_ERR(ERR::LOGIC) (a bit smaller, and more descriptive)
This was SVN commit r9423.
2011-05-04 12:10:17 +00:00
cccd6849a7 cleanup (requires update-workspaces)
lib_errors.cpp: replace with status.cpp, adapt to needs at work
wutil: fix runtime warning reported via feedback box
config: merge CONFIG_PARANOIA and !CONFIG_FINAL into
CONFIG_ENABLE_CHECKS
add openmp, pointer_typedefs.h

This was SVN commit r9410.
2011-05-03 12:38:42 +00:00
0720025073 cleanup
reduce dependency on PCH. move KiB constants to alignment, ARRAY_SIZE to
code_annotation.h.
move glext_funcs.h to external_libraries/glext_funcs.h, move part of
ogl.h to external_libraries/opengl.h
remove unused saturating arithmetic functions

This was SVN commit r9363.
2011-04-30 13:22:46 +00:00
4663ac0fe7 split debug_assert into ENSURE and ASSERT as discussed in a previous meeting.
the old debug_assert always ran and tested the expression, which slows
down release builds. wrapping them in #ifndef NDEBUG is clumsy. the new
ASSERT behaves like assert and ENSURE like the old debug_assert. Let's
change any time-critical but not-super-important ENSURE to ASSERT to
speed up release builds. (already done in bits.h and unique_range.h)

This was SVN commit r9362.
2011-04-30 13:01:45 +00:00
6c915291cc cleanup (requires update-workspaces):
major refactor of wfilesystem - remove gotos and workaround for FAT file
times
replace more round_up of constants with Align<>
remove old unused allocators (STL aligned, matrix, some shared_ptr)
move allocator utils into separate headers.
remove lockfree, wterminal
avoid testing __cplusplus

This was SVN commit r9361.
2011-04-30 12:34:28 +00:00
2374caac3e major refactor of file/io and alignment code. requires update-workspaces
. completely rewrite waio - use IOCP, add several hardcore
optimizations. now outperforms the
  AS SSD and ATTO benchmarks when writing
. refactor file interface - use LIO_READ instead of 'r', allow access to
file descriptor.
. completely rewrite the IO wrapper. now much more simple, less CPU
overhead, adds
  support for pre-issue/post-completion hooks and preallocation.
  io::Run defaults to simple synchronous IO; use io::Parameters to get
asynchronous.
. add alignment.h with constants and Align() function template (more
efficient than
  round_up for compile-time constants)
. add UniqueRange - similar to C++0x unique_ptr (emulated for C++03),
plus a
  built-in size. avoids expensive thread-safe reference counting in
shared_ptr.

cleanup:
- move fat_time functions into archive_zip
- remove no longer needed io_align and block_cache
- reduce dependencies in sysdep/compiler (move parts to
code_annotation.h)
- move IOCP into separate file (reused by waio)

This was SVN commit r9350.
2011-04-29 19:10:34 +00:00
1f7e8d7194 per discussion with Philip, remove STL_HASH_MAP etc. because they're ugly, rarely used and superseded by boost::unordered*
This was SVN commit r9111.
2011-03-23 16:56:27 +00:00
64a02932e3 refactor headers: path_util -> path, native_path -> os_path, remove where unnecessary
This was SVN commit r9108.
2011-03-23 14:43:35 +00:00
dcd192cb60 refactor path interface:
- use wrapper class instead of std::wstring (reduces mixing of
strings/paths; allows safe+easy join via operator/ and convenient
case-insensitive comparison via operator==, avoids NativePathFromString,
similar to boost::filesystem)
- NativePath -> OsPath
- add hash and To/FromJSVal for Path
- add TS_ASSERT_PATH_EQUALS
- replace _wfopen_s with sys_OpenFile
- remove obsolete SortFiles/Directories

This was SVN commit r9107.
2011-03-23 13:36:20 +00:00
6d25329412 # towards locale-independent pathnames on Linux
c.f.
http://www.wildfiregames.com/forum/index.php?showtopic=14541&st=0&p=217250&#entry217250
and 2011-03-19 meeting

This was SVN commit r9090.
2011-03-21 17:53:13 +00:00
cec05f02ea fix insidious OpenAL issue: the spec doesn't guarantee 0 isn't a valid source name => we need to use an out-of-band mechanism for specifying whether the source is valid.
refs #557

This was SVN commit r9087.
2011-03-20 16:40:36 +00:00
0378500bdc Fix #712 (remove S3TC warning).
Add timer to S3TC decoder so it's still easy to determine if it was
used.

This was SVN commit r8981.
2011-02-25 01:28:46 +00:00
1c7e33b528 Remove a load of implicit CStr type conversions, since they're error-prone and can cause silent data loss.
Handle most CStr8/CStrW conversions via UTF-8 instead of effectively
assuming Latin-1.
Return UTF-8 strings from Xeromyces API.

This was SVN commit r8929.
2011-02-17 20:08:20 +00:00
19dbbb816d Changed all references from old CLogger API to use the new API. Removed old API. Fixes #247
This was SVN commit r8791.
2010-12-05 08:41:55 +00:00
53b1447007 Fix what looks like miscompilation with GCC 4.0 on OS X
This was SVN commit r8786.
2010-12-04 19:06:13 +00:00
4100a13e0a # Add resource shuttling.
Add resource-carrying animations/props to an actor for testing.
Warn more quietly about invalid cursor names.

This was SVN commit r8589.
2010-11-13 19:15:29 +00:00
f45c74c368 thread-safety fixes to debug.cpp - most functions were already reentrant, just CAS-ified the assert suppression flags.
(NB: the debug_filter stuff remains non-reentrant because it's usually
only called from main() or at least the main thread)
closes #654

This was SVN commit r8543.
2010-11-06 19:14:16 +00:00
0c3d69ae29 fixes from work: clarify that cpu_MemoryBarrier has no runtime cost by renaming to COMPILER_FENCE and moving to code_annotation.h; fix 32-bit Parallel Studio 2011 warning.
This was SVN commit r8486.
2010-10-29 12:54:51 +00:00
094ccc6a98 Fix playing of sound files in archives (by disabling proper streaming).
This was SVN commit r8370.
2010-10-15 23:06:14 +00:00
7b59550cc3 Fix #612 (passing a program object to glDeleteShader via pglDeleteObjectARB)
This was SVN commit r8344.
2010-10-13 16:45:27 +00:00
fecac5a7be # add support for streaming sounds, not just loading them entirely into memory (avoids stalls when switching music tracks)
very belated revision/integration of Heron/Kyniker's patch (thanks!)

ogg fixes: ensure file remains open by holding a shared_ptr. avoid
returning 0 (success) when bytesRead==requestedSize.

closes #100

This was SVN commit r8322.
2010-10-10 12:08:51 +00:00
b15c5c1c45 Add anisotropic filtering support to ogl_tex.
Shrink some OglTex fields so that it fits in the size limit.
Add function to efficiently read the 1x1 mipmap level's colour.
Add RGB->RGBA and BGR->RGBA transforms.
Fix DXT1a detection logic.
Fix OglTex_validate failing when ogl_max_tex_size == -1 (e.g. before
ogl_Init is called).

This was SVN commit r8097.
2010-09-10 20:37:54 +00:00
dee3cb84b5 Fix S3TC decoder bug.
Add S3TC decoder test.
Fix texture codec test to not be a no-op, then disable it since it
fails.
Add DDS mipmap removal transform.

This was SVN commit r8094.
2010-09-10 20:25:23 +00:00
9fa5af5fbf Avoid crash when loading texture named "".
Report texture-loading errors.

This was SVN commit r8006.
2010-08-19 21:58:27 +00:00
df4e9a05c2 Fix build error on 32-bit Linux
This was SVN commit r7851.
2010-08-05 14:24:32 +00:00
cc8ad0f3c0 Fix line endings
This was SVN commit r7850.
2010-08-05 14:22:56 +00:00
fdb8be2fd5 Fix warning
This was SVN commit r7836.
2010-08-01 17:36:39 +00:00
e20f93ffdc add proper OGG support, a near-total rewrite of a patch by Kyniker/Heron. not yet integrated into snd_mgr. also remove the no longer used CMusicPlayer and CPlayList.
This was SVN commit r7834.
2010-08-01 10:52:12 +00:00