1
0
forked from 0ad/0ad
Commit Graph

22 Commits

Author SHA1 Message Date
c0ed950657 had to remove uint and ulong from lib/types.h due to conflict with other library.
this snowballed into a massive search+destroy of the hodgepodge of
mostly equivalent types we had in use (int, uint, unsigned, unsigned
int, i32, u32, ulong, uintN).

it is more efficient to use 64-bit types in 64-bit mode, so the
preferred default is size_t (for anything remotely resembling a size or
index). tile coordinates are ssize_t to allow more efficient conversion
to/from floating point. flags are int because we almost never need more
than 15 distinct bits, bit test/set is not slower and int is fastest to
type. finally, some data that is pretty much directly passed to OpenGL
is now typed accordingly.

after several hours, the code now requires fewer casts and less
guesswork.

other changes:
- unit and player IDs now have an "invalid id" constant in the
respective class to avoid casting and -1
- fix some endian/64-bit bugs in the map (un)packing. added a
convenience function to write/read a size_t.
- ia32: change CPUID interface to allow passing in ecx (required for
cache topology detection, which I need at work). remove some unneeded
functions from asm, replace with intrinsics where possible.

This was SVN commit r5942.
2008-05-11 18:48:32 +00:00
5529977ecd fix: CLogger's ELogMethod is now inside the class and does not use names that are vulnerable to macro destruction (fixes a conflict with Windows system header's #define ERROR)
This was SVN commit r5532.
2007-12-29 16:22:23 +00:00
b755ddefda remove all author/modified by tags.
make include guards consistent.

This was SVN commit r5040.
2007-05-07 16:33:24 +00:00
73683b6109 # SwEng
. the massive renaming undertaking: camelCase functions -> PascalCase.
. add some cppdoc.
. minor additional renaming improvements: e.g. GetIsClosed -> IsClosed
. in entity code, replace constructs like "pvec = new vector; return
pvec; use *pvec; delete pvec" with a simple stack variable passed as
output parameter (avoid unnecessary dynamic allocs)
. timer: simpler handling of raw ticks vs normal timer (less #if)

This was SVN commit r5017.
2007-05-02 12:07:08 +00:00
4883dd015c Changed default DepthTextureBits again. Should fix #180.
This was SVN commit r4893.
2007-02-10 20:53:48 +00:00
5e3e78ca78 # Fixed some graphical and scenario editor issues.
Atlas: Changed video format to 640x480 and losslessly compressed. Added
most-recently-used files list. Stopped switching sidebar when selecting
tools, since it was getting annoying. Added Slow playback mode. Fixed
crash when resetting sim while projectiles exist.
Renderer: Added JS-accessible renderer.shadowMapSize to override the
size of shadow maps.
ShadowMap: Changed default depth texture bits to 24, since that seems to
go faster (see #180).
PolygonSortModelRenderer: Made more similar to other renderers, so that
the renderer.sortAllTransparent=true mode works better.
Projectile: Fixed update, so it interpolates smoothly.
Entgraph: Fixed promotion detection.

This was SVN commit r4876.
2007-02-09 17:04:55 +00:00
dave
2bb1bde51e Mac gcc complains about mixing size_t, uint etc..
This was SVN commit r4285.
2006-09-01 06:59:29 +00:00
3195893d1c # MacOS X compat (part 1)
- u_anim_name disambiguation
- fix implementation of finite (use our fpclassify instead of compiler's
routine)
- รค -> ae
- workaround for MAP_ANONYMOUS
- fix GLint in ogl.cpp
- add include for SIZE_MAX in string_s
- avoid PIC clobbered error and speed up rdtsc a bit
- add include for stat

This was SVN commit r4170.
2006-07-26 14:04:52 +00:00
5f7855f7f0 Simplification of #Include paths: relative names are used only for included files in the same directory as the including file; everything else uses the full path relative to source/.
This was SVN commit r3930.
2006-06-02 02:10:27 +00:00
a9dfb016ca # Fixed self-shadowing in Atlas
(The ShadowMap object was being destroyed/recreated, and thus forgot
that it had been told to use depth textures)

This was SVN commit r3916.
2006-05-31 16:42:50 +00:00
0d648b2df8 #More accurate bounds calculations to improve shadow resolution
and a fix for the auto-build: #define enums from EXT_framebuffer_object

* clip shadow bounds to frustum
* add CBrush, a class representing a convex object

This was SVN commit r3695.
2006-03-26 21:58:48 +00:00
8fd256c458 #Use EXT_framebuffer_object when available
* noframebufferobject configuration in system.cfg can be used to
  disable EXT_fbo (in case drivers are flaky etc.)
* shadow texture size now honours the OpenGL maximum texture size as
reported
  by the implementation

This was SVN commit r3693.
2006-03-26 17:36:33 +00:00
e2bbd9a654 #Models receive shadows now, including self-shadows.
This is a huge patch, including:
* add a LitRenderModifier abstract base class for RenderModifiers with
  shadow+light
* add LitRenderModifiers for all types of models
* add STREAM_TEXGENTOUV1 to request generation of shadow map texcoords
  for models
* create facilities to pass the texture matrix from the
  RenderModifier (fragment stage) to the ModelRenderer (vertex stage)
* split ambient and diffuse terms of lighting until further down in the
  pipeline; this is necessary since shadowed regions receive only
ambient light
* small improvement in how RenderPathVertexShader scales to a greater
  number of vertex shaders

This was SVN commit r3690.
2006-03-26 00:54:20 +00:00
e2a11fabe8 fix warnings (VC7)
This was SVN commit r3542.
2006-02-19 21:16:54 +00:00
f903b83674 Add renderer.disableCopyShadow for debugging purposes.
Add renderer.depthTextureBits configuration value.

This was SVN commit r3518.
2006-02-15 23:50:24 +00:00
1560a17dfb Rendering related fixes:
- explicitly enable blending in the ProfileViewer (fixes display bug)
- adjust luminance map based shadows to look roughly the same as depth
texture
  shadows (minus self-shadows, obviously)
- default depth texture path will not touch TexParameters any longer

This was SVN commit r3511.
2006-02-14 20:38:51 +00:00
7dee30e24c - Terrain self-shadows (only noticeable with a low angle of sun)
- explicitly split ambient and diffuse
- add renderer.shadowZBias to bias depths in the depth texture
  and avoid flickering artifacts caused by Z fighting
- cantabrian_generated uses new light values so that shadows aren't
pitch
  black

This was SVN commit r3508.
2006-02-13 14:18:20 +00:00
9f055eddb0 Shadow rendering can use depth textures, as a preparation for
self-shadowing and shadows on models in general.
Usage of depth textures can be toggled using
?renderer.useDepthTexture = true/false in the JavaScript console.

This was SVN commit r3495.
2006-02-11 18:04:32 +00:00
66c9c1fbf5 Replace old shadow matrix calculation; the sun really is a parallel light
source now.

This was SVN commit r3488.
2006-02-11 00:26:40 +00:00
90bf4ae0a7 - add CBound::Render()
- fix CBound::Transform() math
- beginnings of new shadow bound calculations

This was SVN commit r3436.
2006-01-29 17:34:45 +00:00
f25de48559 - Seperate ViewCamera (eye position) and CullCamera (model culling, shadow
calculations) internally. Use ?gameView.lockCullCamera = true in the
console
  to move around while the CullCamera stays in place
- add CCamera::Render to visualize a camera's frustum
- use ?renderer.debugFrustum = true in the console to visualize the
frustum
  of the CullCamera

This was SVN commit r3405.
2006-01-22 19:12:30 +00:00
b889826a3d Some Linux compile fixes over the place.
Create TerrainRenderer, ShadowMap and WaterManager classes to divide
CRenderer's functions into more logical units.

This was SVN commit r3332.
2006-01-07 01:04:26 +00:00