1
0
forked from 0ad/0ad
Commit Graph

188 Commits

Author SHA1 Message Date
c14765989e # Introduce a Scene abstraction that allows the renderer to query visibility from multiple virtual camera positions.
This is the first step towards fixing #142

This was SVN commit r4385.
2006-09-24 11:25:11 +00:00
a63f49e582 Add gameView.culling and renderer.skipSubmit for debugging purposes.
This was SVN commit r4382.
2006-09-23 16:04:54 +00:00
e0b68b7f9f Use AddLocalProperty in CRenderer.
This gets rid of lots of boiler-plate code in JSI_* functions.

This was SVN commit r4380.
2006-09-23 12:48:06 +00:00
a1a7dac59c # Integrated Actor Viewer and Actor Editor tools
ObjectManager: Removed ObjectTypes because it hasn't been used for
years.
Atlas: Fixed leak when saving with Xerces. Changed range of water
shininess slider.
Actor Editor: Relabelled "Freq" to "Ratio". Made modal dialogs use the
correct parent.

This was SVN commit r4376.
2006-09-22 17:43:00 +00:00
09b87e84ec #Bugfix: Shadows appeared to be rendered one frame too late
close #141

The problem was that the shadow matrices were setup in BeginFrame, but
GraphicsView calls SetCamera after BeginFrame. The solution was to move
the shadow matrix setup into CRenderer::SetCamera.

This caused a second problem because RenderReflections/RenderRefractions
used SetCamera to change the OpenGL matrices. Solved this problem by
distinguishing explicitly between the camera used for the scene as a
whole and the camera used to configure OpenGL. The latter can be a
virtual camera for shadow or reflection rendering and similar
render-to-texture effects.

This was SVN commit r4330.
2006-09-14 20:06:21 +00:00
df1a779d76 # Updates to water rendering (more effects).
This was SVN commit r4318.
2006-09-10 05:31:41 +00:00
6db054f7dd # Add JS variable renderer.fancyWater to enable/disable fancy water rendering at runtime
This was SVN commit r4307.
2006-09-07 22:16:15 +00:00
c183bcde1f Territory boundaries are now rendered before transparent objects, so these can properly cover them.
This was SVN commit r4306.
2006-09-06 22:26:27 +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
35e91718c5 # Added tool for viewing models and animations outside the game.
Atlas: Added ActorViewer. Moved GL canvas into separate class for shared
use. Disabled message-handling callback while blocked on the game, and
stopped creating dialog boxes inside the game thread in order to avoid
deadlocks (hopefully). Support multiple Views (for independent sets of
camera/update/render code). Recalculate territory boundaries when
necessary. Changed default list of animations to match those currently
used by actors.
# Tidied up more code.
Moved some more #includes out of .h files, to minimise unnecessary
compilation.
MathUtil: Deleted unused/unuseful macros (M_PI (use PI instead), M_PI_2
(use PI/2), MAX3, ABS (use abs)).
ObjectManager: Removed some ScEd-specific things.
Unit: Moved creation out of UnitManager, so units can be created without
adding to the manager. Changed CStr8 to the more conventional CStr.
app_hooks: Removed warning for setting multiple times.
win: Restored SEH catcher.
GameSetup, GameView: Removed RenderNoCull, because it doesn't seem to do
what it says it does ("force renderer to load everything") since we're
loading-on-demand most stuff and it doesn't seem especially useful since
we'd prefer to minimise loading times (but feel free to correct me if
I'm wrong). (And because it crashes when things need to be initialised
in a different order, so it's easier to remove than to understand and
fix it.)
PatchRData, Renderer: Work sensibly when there's no game (hence no LOS
manager, water, etc).
LOSManager: Use entity position instead of actor position when possible.
TerritoryManager: Allow delayed recalculations (so Atlas can issue lots
of move+recalculate commands per frame).
Cinematic: Non-pointer wxTimer, so it doesn't leak and doesn't have to
be deleted manually.

This was SVN commit r4261.
2006-08-28 17:36:42 +00:00
c817566222 # housekeeping
replaced all (*) CStr / CStrW by-value params with const reference. hoo
boy.

please always perform this optimization (actually standard idiom) when
writing the code - it takes little work, tells the next guy that the
string won't be modified, and makes a large performance difference.

(* where possible.. a few require other changes and will follow later)

This was SVN commit r4151.
2006-07-20 14:37:58 +00:00
f0ec100d1a Bug fix to construction (units weren't being given the building to convert to due to some hasty refactoring in an earlier commit). Also increased shadow Z bias to 0.02 since there still seemed to be cases when it was very visible.
This was SVN commit r4125.
2006-07-17 00:59:32 +00:00
7926b3d93c # Some groundwork for territories.
Entities with traits.is_territory_centre == true will act as territory
centres, and territory areas are calculated and displayed on the
minimap. It remains to display these areas in the game view and to make
Civ Centres "socketable" so you can build them on Settlements to claim
them.

This was SVN commit r4070.
2006-07-08 22:40:01 +00:00
2b0e5d0b42 # Added parameters to control water murkiness.
This was SVN commit r4013.
2006-06-22 21:11:18 +00:00
5814e10126 # complete revamp of build system in preparation for automated self tests.
* now splits everything up into independent static libraries.
* fixed a great deal of incorrect #include statements. all headers must
now be specified with their full path relative to source. exception: if
file being included and including file are in the same directory, no
path needed.
use <> when relying on the build system's include path (e.g. for system
headers and external libraries, e.g. boost), otherwise "".

* temporarily renamed maths/Vector2D to Vector2D_Maths to avoid
conflict. these should be merged.
* hacked around VC linker stupidness when building static libs; texture
codecs must now be registered manually.

This was SVN commit r3931.
2006-06-02 03:56:24 +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
aa9a1c4f29 Reflection and refraction cameras should now take more advantage of the textures' resolutions, by stretching the image according to the inverse of the screen's aspect ratio to cover it all without requiring a larger Field of View. This should result in higher-resolution reflections and refractions.
Also increased water repeat period slightly, to 17.

This was SVN commit r3919.
2006-05-31 22:37:23 +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
1a8cb85e08 Some water-related bug fixes:
- Underwater tiles will be tested against the frustum with a bounding
box including the water surface, so the water gets drawn even if the
terrain is off-screen.
- Transparent objects (e.g. trees) should now interact with water
properly. I did this by rendering them twice, first before the water, so
it overlaps the underwater pieces, then after, so the above-water pieces
overlap the water (the water now writes Z as well as colour to allow
this). Before, only the first pass was done, so the tops of trees were
covered by water. There might be more efficient ways of doing this - the
best could be for the transparent objects to be drawn with a shader that
always either discards a pixel or writes alpha of 1.0 instead of using
2-pass depth write then colour write.

This was SVN commit r3904.
2006-05-29 00:49:09 +00:00
67ede785d5 Updates to water and a fix for a rendering bug with bar textures
This was SVN commit r3902.
2006-05-28 21:58:56 +00:00
106f59c5c7 # Added fancy water.
This was SVN commit r3897.
2006-05-28 02:13:32 +00:00
f0615df318 # Initial work on fancy water.
Also, horizon height (skybox vertical offset) can now be set from the
console with renderer.horizonHeight.

This was SVN commit r3893.
2006-05-25 05:46:17 +00:00
2db8963039 # big VFS update: laid groundwork for running as non-admin; move XMB files into separate directory tree
^ actually that was last revision, but forgot this there :P

housekeeping/cleanup of smaller issues I noticed while working:
lib: add NO_COPY_CTOR macro
lib_errors: fix descriptions, rename
INFO_ALREADY_PRESENT->INFO_ALREADY_EXISTS

* refactor "is valid VFS dir" to VFS_PATH_IS_DIR macro
* remove some scaffolding
* update docs
* scour all VFS APIs, make sure they receive valid VFS dir paths

second try for Trac notification:
closes #79
closes #80

This was SVN commit r3876.
2006-05-17 16:47:49 +00:00
18eb72a25a Added Perlin noise class, which will be useful for water.
This was SVN commit r3871.
2006-05-17 03:53:54 +00:00
4879b98fc7 # Sky set can now be changed through the console.
This was SVN commit r3869.
2006-05-17 02:24:17 +00:00
275a73851c # Added sky box as well as repair, heal and trample actions.
Closes #31, #32, #37. Refs  #46.

This was SVN commit r3865.
2006-05-16 04:41:37 +00:00
3d26549032 Fixed file properties - removed svn:executable and svn:keywords (left over from CVS conversion?) from all files; set svn:eol-style=native for *.cpp, *.h (and fixed files with inconsistent line endings)
This was SVN commit r3802.
2006-04-23 23:14:18 +00:00
01700f0e9f # refactor VFS path-related functions; split into separate files
- replace all hardcoded strrchr functions (used to get extension / file
name only) with path helper functions (found a few bugs in the process)
- split VFS-independent path helper functions into lib/path_util (allows
including by other files without pulling in entire VFS)
- renamed pp_* functions path_package_*
- split remaining path helper functions into lib/res/file/path
- vfs: split should-reload logic out of vfs_reload_changed_files

- lib: add comments to rand/xrand

This was SVN commit r3796.
2006-04-22 16:26:16 +00:00
d158ed9dc9 Terrain overlay: Fixed incorrect state change
Other: Trivially tidied profile text. Removed VC2005 deprecation
avoidance, since wx 2.6.3 does that anyway.

This was SVN commit r3773.
2006-04-19 00:56:24 +00:00
8a11f53011 # More consistent terrain-space coordinate names
# Removed more ancient unused code
# Partial VC2005 compatibility for Atlas editor / AoE3Ed
# Terrain overlay rendering system; used to implemented Atlas brush
display
# Renamed 'right' to 'left'

This was SVN commit r3771.
2006-04-17 20:02:51 +00:00
d9944f9524 # remove last occurrences of old ScEd-specific code
This was SVN commit r3719.
2006-04-02 16:27:34 +00:00
87780e328a Potentially really fix that renderpath related crash.
This was SVN commit r3708.
2006-03-31 02:19:11 +00:00
b951eb5fd6 #Fix a potential crash in renderpath selection.
This was SVN commit r3702.
2006-03-28 19:45:44 +00:00
5acfc87608 #Adjust the default Z bias for shadow rendering.
This was SVN commit r3699.
2006-03-27 19:00:04 +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
73506eb076 #Code cleanups related to renderer
Remove the OPT_NOPBUFFER and OPT_SHADOWCOLOR options and related
variables
since they weren't really used.

This was SVN commit r3694.
2006-03-26 17:46:18 +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
d3f57744d9 Refactored actor variation system, and added support for entity-level selections (controlled by the current animation).
Avoided tooltip error message.
Avoided noisy warnings when textures fail to load.

This was SVN commit r3653.
2006-03-17 03:59:49 +00:00
26dc8cc4c8 - tex_dds: fix comment; enable warning on unsupported formats
- renderer: avoid particle-emitter memory leak warnings

This was SVN commit r3639.
2006-03-15 18:32:24 +00:00
e2a11fabe8 fix warnings (VC7)
This was SVN commit r3542.
2006-02-19 21:16:54 +00:00
livingaftermidnight
a82888286f This was SVN commit r3530. 2006-02-17 02:03:15 +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
36fa5ec2bf * clean up CLightEnv a bit
* add CLightEnv::m_TerrainShadowTransparency
* shadows will let a fraction of diffuse light through
* added JS LightEnv objects, so the lighting environment can be changed
  from the console
* new element TerrainShadowTransparency supported in the scenario .xml
format,
  changed cantabrian_generated with an example

This was SVN commit r3513.
2006-02-15 00:45:16 +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
de493d92dd Reset point width and line width in various places around the game code.
Linux build: Add a const void* hash function.

This was SVN commit r3500.
2006-02-13 00:59:59 +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
livingaftermidnight
58da2342c2 At last! Finally! Particles rendering in the game! The emitter can be found at the origin (0,0,0). I just need textures and billboarding with the camera.
This was SVN commit r3493.
2006-02-11 09:40:04 +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
6e82e33ccf - display_msg and display_error -> debug prefix since in debug header
- debug_warn_err now takes LibError
- lib_error.cpp: revise error code -> string (only support liberror
now); add function to set errno from LibError
- unifont, CFont: parameter made a simple wchar_t from const wchar_t&
- mmap now sets errno
- Loader and VfsUtil function now return LibError as well
- Profile.cpp, ProfileViewer.cpp: fix int/uint/size_t warnings
- Renderer.cpp: fix cannot-generate-assignment-operator warning

This was SVN commit r3235.
2005-12-12 19:19:30 +00:00
pyrolink
f174796540 Added fresnel effect for water.
This was SVN commit r3194.
2005-12-06 06:42:49 +00:00
8f976e4b8a glext_funcs: Added gDEBugger-specific extension.
Interact: Answered comment. Fixed calculation of map edge.
Renderer: Fixed unloading of water textures. Removed some redundant
state-setting in water renderer. Avoided potential problems with
floating point accuracy.

This was SVN commit r3182.
2005-12-02 02:08:26 +00:00
5c9501830c Fix some more warnings.
This was SVN commit r3156.
2005-11-19 16:43:20 +00:00
5087732fe3 Refactor ProfileViewer into a singleton that uses AbstractProfileTable as
data model.
Profile.cpp implements AbstractProfileTable so the original
functionality
of the profiling display remains.
CRenderer also contains an AbstractProfileTable implementation that
displays
the rendering stats. Switch through different profile views using F11.

This was SVN commit r3154.
2005-11-19 16:15:34 +00:00
d5d6e4052e lib: only debug_warn in UNREACHABLE in paranoia builds - avoids lots of warnings in debug mode
cursor: fix definition of ALLOW_SYS_CURSOR and use DDS instead of PNG
ogl_tex: add ogl_tex_transform_to for convenience
tex: fix issue with transform code (might not flip image if it was DDS)
win: decompress cursor texture if it was DDS
renderer: use DDS instead of PNG for alpha maps

This was SVN commit r3148.
2005-11-18 16:23:39 +00:00
15cce8566f minimap: only update 10x/sec and if LOS state != ALL_VISIBLE; fix incorrect SAFE_DELETE
fix use of LOS_EXPLORED; == implies explored but not visible

This was SVN commit r3100.
2005-11-06 02:02:44 +00:00
6668ad6e1c CTerrain, Brushes: made CalcFromPosition static and added float x,y overload
minimap, PatchRData, renderer: fix ELOSState comparison vs & and use
SAFE_DELETE
ia32: add rounding control constants (for FISTP)
premake: set /QIfist compiler setting which causes float->int casts to
go through FISTP instruction instead of _ftol2() (much faster, but
requires CPU state to have been set)
LOSManager.cpp: cache m_TilesPerSize; use MIN/MAX; use
CTerrain::CalcFromPosition; clean up GetUnitState a bit. now runs at
203ns, down from 222

This was SVN commit r3099.
2005-11-06 01:33:16 +00:00
0346ba1b18 Refactor model rendering to perform vertex setup in ModelVertexRenderer.
Sort all transparent models by distance to camera (however, do not sort
polygons by default).

This was SVN commit r3096.
2005-11-05 23:15:23 +00:00
74bf76d523 fix bug #71 - was a double-free (both ~CRenderer and UnloadResources were calling UnloadWaterTextures)
This was SVN commit r3071.
2005-10-31 18:57:03 +00:00
501acc65f5 Extension function pointers are renamed from glXyzARB to pglXyzARB
to avoid conflicts with system header files.

This was SVN commit r3054.
2005-10-30 01:18:15 +00:00
875cb3bca1 Add ARB_vertex_shader specific functions to glext_funcs.h
Add an "instancing" model renderer to improve rendering of
non-transparent,
unanimated models. This renderer is used when the vertexshader path is
rendering path is used.

This was SVN commit r3052.
2005-10-30 00:22:22 +00:00
15d9278af6 tex, mem: fix refcnt issue that is the possible cause of bug#70! huge thanks to philip, who localized the problem to tex_wrap/memory not getting freed.
wdbg_sym: make sure symbol info is initialized even if *resolve() fails;
also fix warnings
renderer: make sure texture array is initialized

This was SVN commit r3049.
2005-10-29 22:29:55 +00:00
b10534d224 Transform normals using the original bone matrix instead of the inverse of the
transpose. This assumes orthogonal transformations (which we have
exclusively,
as far as I can tell), but is significantly faster, because calculating
the
inverse is slow.

This was SVN commit r3041.
2005-10-28 19:25:47 +00:00
bbda296289 TerrainProperties: Use CTerrainPropertiesPtr (boost::shared_ptr) instead of CTerrainProperties*, to fix (slightly inelegantly) memory leaks.
Renderer: Initialise pointers when HW lighting is unavailable.
Atlas: Avoid strange VS2005 iterator complaint.

This was SVN commit r3036.
2005-10-28 01:43:16 +00:00
b7df6f7fbf Do not sort transparent models by default.
This was SVN commit r3012.
2005-10-25 02:22:22 +00:00
d977bc27dc Eek.. apparently, I committed in the wrong subdirectory.
Also, fixed a stupid bug that caused transparent objects to be
retransformed
all the time.

This was SVN commit r3011.
2005-10-25 02:00:09 +00:00
82ee484821 Massive rewrite/refactoring of the model rendering system.
Performance impact:
+ Player color rendered models are batched like normal models
- Transparent sorted models never use the vertex shader path

This was SVN commit r3009.
2005-10-25 01:43:07 +00:00
26d2fc71ad loaders: increase timeout interval (less time wasted in main loop during loading)
vfs: move public functions into vfs.cpp to avoid confusion (except
vfs_mount in vfs_mount.cpp, but that's obvious)
h_mgr: fix bug in filename display causing dir names to be truncated
main/gamesetup: replace 2 bools with flags; remove Atlas trampoline
functions (clutters up main.cpp)
atlas: use GameSetup.h instead of extern ..

This was SVN commit r2983.
2005-10-21 18:01:21 +00:00
d43aa11d36 file: free cached IO blocks to avoid them appearing as "leaks"
vfs: now always check filter in VDir (Not only in debug mode)
vfs_tree: free VFS nodes to avoid them appearing as "leaks". bugfix in
bucket allocator - wasn't coping with exactly filled buckets correctly
all Handle users: add to_string method that writes the interesting parts
of a resource's user data to string.
h_mgr: show this information when a handle is closed
ogl_tex: add ogl_tex_find
add 2 timer clients
mem: now record address of function that allocated memory
GameSetup: fix shutdown order
Renderer: allow freeing individual alpha map textures (we cache the
composite)

This was SVN commit r2981.
2005-10-21 07:47:38 +00:00
d7996c104a CInput: swapped direction of mouse-wheel scrolling.
wsdl: initialise handles such that wsdl_shutdown doesn't try to close
them if they remain unchanged.
GameSetup: made work in Atlas.
Renderer: fixed progressive loading of water textures.

This was SVN commit r2941.
2005-10-14 21:59:08 +00:00
991d6c438c Fix water renderer to fully specify its texture environment.
This was SVN commit r2932.
2005-10-13 15:46:31 +00:00
a1cddc4ac3 gameview, renderer: LoadWaterTextures is now a coroutine because it takes friggin forever (3 seconds). VFS performance is down by a factor of ten! investigating is on todo.
dyn_array.h -> allocators.h
ogl_tex: reenable performance warning
tex: comments
h_mgr: debug_printf if long filename is passed in (so we notice)
wsdl: squelch DestroyWindow warning. will look into the cause.
sysdep: slightly simplify "restrict" determination

This was SVN commit r2916.
2005-10-12 17:19:07 +00:00
990e343ae6 renderer: load/unload water textures (similar to alpha maps); do that in delay load and avoid leaking them.
GUIrenderer: add oglSquelchError

lib.h: add feq() (checks for floating point equality); remove redundant
if from SAFE_DELETE
maths: use new feq()
Model*RData, VertexArray: fix trivial warnings

This was SVN commit r2904.
2005-10-12 04:16:41 +00:00
de5361047a Player colour rendering fallback now looks exactly the same as the fast path
again (using multi-pass).

This was SVN commit r2902.
2005-10-12 01:07:01 +00:00
e05ca36bc5 Changed water color/depth/alpha again
This was SVN commit r2897.
2005-10-10 23:05:53 +00:00
6efb1e1c00 Single pass player color rendering.
Falls back to a simpler formula when only 2 TMUs are available.
CRenderer is now a JS object called "renderer" for scripting.

This was SVN commit r2891.
2005-10-10 14:15:28 +00:00
57cfc7c6ac Made LOS drawn using terrain vertex color (which requires some terrain render data to be rebuilt each frame, but is faster).
This was SVN commit r2878.
2005-10-09 04:40:18 +00:00
0ed2815c8b Added initial version of LOS, and updated minimap to show both LOS and water.
LOS issues still outstanding:
- LOS looks ugly because of quad tesselation into 2 triangles
- Quad tesselation is unspecified by OpenGL (in fact using GL_QUADS on
LOS quads seemed to give different tesselations than it did for the
underlying terrain quads, but terrain rendering also used GL_QUADS).
This should be fixed once we decide on the quad tesselation issue.
- Units with traits.vision.permanent set are visible through FOW even if
you havent seen them before; this should only be true when you have seen
them before. But it gets even more complicated - if a permanent unit
seen through FOW dies or gets upgraded or something, perhaps you should
remember the old version. I'm not completely sure how to do this
(probably involves cloning its actor somehow).

This was SVN commit r2876.
2005-10-09 03:43:03 +00:00
04650efe7a Lots of gcc -Wall fixes. The common ones:
- switch() statements don't handle all values in an enum
- missing \n at end of file
- non-virtual destructors in classes containing virtual functions
- order of initializers in constructor initializer lists
... some other stuff (signedness, nested comments, unused variables) as
well.

This was SVN commit r2864.
2005-10-07 15:24:29 +00:00
dbd58f4011 Remove CRenderer::Close(), which wasn't called anyway and the only reasonable
calling site would have been just before the destructor.
m_VertexShader is no longer leaked.

This was SVN commit r2860.
2005-10-06 16:07:36 +00:00
f1ee2cd66d Add the notion of render paths and an appropriate configuration option.
Add Ogl_Shader and Ogl_Program handle types for shaders/programs loaded
from
files.
In the vertexshader render path, use a vertex program for lighting for
optimization.

This was SVN commit r2853.
2005-10-05 16:42:09 +00:00
a92e92cd46 Basic GL_ARB_vertex_shader detection.
Remove a redundant copy operation in ModelRData::BuildVertices

This was SVN commit r2822.
2005-09-30 22:23:48 +00:00
2790981eae CVSROOT: doesn't seem particularly useful now
ObjectBase: removed support for old actor format
Various: reduced sometimes-unnecessary header inclusions
Atlas: slightly nicer tool and message systems

This was SVN commit r2816.
2005-09-30 00:59:42 +00:00
d98abf0685 final refactor (i hope). split up fmt / int_fmt determination to allow override of fmt without overriding int_fmt (useful for unifont.cpp). this changed the signature of ogl_tex_upload. better explained flags in OglTex and warn_if_uploaded.
also a few improvements / stomped on some warnings.

This was SVN commit r2809.
2005-09-29 17:33:30 +00:00
cd2f3948dd changed sys_cursor interface to load directly from file; can add createFromMemory version later if ever needed.
cursor: reflects the above; much simplified now.

ogl_tex: preserve all texture state across reloads. add quality
mechanism (perf boost on older cards). split up upload code. add
ogl_tex_transform(). add more docs.

renderer, GUIrenderer, unifont: bring in line with ogl_tex changes (int
-> uint and call setters before ogl_tex_upload)

GameSetup.cpp: add tex quality mechanism

This was SVN commit r2803.
2005-09-29 05:00:20 +00:00
f5613e74c8 Changed water color to Jason's dark blue.
This was SVN commit r2792.
2005-09-28 05:53:22 +00:00
b7c04793f4 Updated water to use black-and-white texture and mix it with material color, allowing water color to be changed.
This was SVN commit r2786.
2005-09-27 23:14:08 +00:00
f2cae8cb9b Added animated water.
This was SVN commit r2783.
2005-09-27 18:17:45 +00:00
37e9fc0388 - update load times
- config: add proper HAVE_ macro for string_s functions rather than
checking MSC ver directly
- string_s: disable parts of the self-test that trigger errors if not
using the string_s.cpp implementation

This was SVN commit r2760.
2005-09-21 16:42:56 +00:00
13501cf58b hook up emulate_glCompressedTexImage2D to new tex transform code (which takes care of DDS unpack)
to that end, provide support for "wrapping" existing textures so that
tex_* and ogl_tex* calls may be used.

also have renderer use ogl_tex for its created-on-the-fly composite
alpha texture
also named atlas's thread (for fun+profit during debugging)

This was SVN commit r2754.
2005-09-19 22:48:20 +00:00
603c475cf0 This was SVN commit r2749. 2005-09-18 06:28:23 +00:00
e5dea3e5a1 Water source code :|.
This was SVN commit r2746.
2005-09-18 03:47:15 +00:00
a0a01e7a7d Linux/GCC Compat, added some includes, ported inline assembly stuff to gnu syntax (and misc. cleanup in ia32.cpp)
This was SVN commit r2702.
2005-09-12 23:37:52 +00:00
9ec828f6fd - both tex.cpp and ogl_tex.cpp had functions named tex_* - confusing. renamed to ogl_tex* to disambiguate.
- ogl_tex_bind now supports multitexturing (avoids need to get id and
then bind manually)
- provide nicer API for querying texture properties (no longer one big
getter). improved GUI determination of texture alpha.
- renderer: another see-if-texture-has-alpha and fixed alpha map code
(wasn't checking if all are same size. only worked because the first map
was larger than the rest

This was SVN commit r2647.
2005-09-02 02:54:02 +00:00
0e20c08969 waio: fix spurious WARN_ERR
vfs: integrate hotload code
fixed a few warnings as well.

This was SVN commit r2609.
2005-08-13 17:09:57 +00:00
4aa740bff5 - split up lib/res into file, graphics and sound.
- wposix.cpp: initial support for MEM_RESERVE and MEM_COMMIT semantics
in mmap
- cstr: removed no longer necessary serialization header
- xmlutils: wrap new() calls in nommgr/mmgr; allows tracking other
allocs in this file.
- add u64_from_u32
- various minor comments/improvements.

This was SVN commit r2604.
2005-08-12 17:06:53 +00:00