Commit Graph
71 Commits
Author SHA1 Message Date
portej05 98f337f701 safe_strings - from Antipodes build #1 2009-07-27 16:06:24 +00:00
portej05 6a8d45c93d Replace most instances of std::vector with SCP_vector. Memory is now all run through vm_malloc and vm_free.
Watch it go up AND down in mission.
2009-07-11 07:07:57 +00:00
portej05 719825f80d The big CVS comment removal. This chops approx. 3.5mb off a full checkout.
I've tested this through compiling and through hand checking. 
Normalises line endings in ALL files to \n.
2009-06-20 08:08:20 +00:00
Wanderer cabc75bfe5 merge from wanderer branch. 2d and 3d radar images support 2009-05-18 22:08:13 +00:00
chief1983 51a6901dae OpenGL tweaks from Taylor's 3610 patch and a big fix for OS X graphics - Thanks Echelon9! 2009-01-03 02:39:11 +00:00
taylor 9231692e48 basic commit of a few Xt tree changes
- updated OpenGL code (basic shader support, etc.)
 - new ships lab code
 - scripting RTT fixes
 - don't let FRED hog CPU time
2008-07-16 02:49:19 +00:00
taylor 461922f046 some minor mprintf() cleanup 2008-03-28 03:32:38 +00:00
taylor 5188a848ea get rid of some old/obsolete items (Mantis #1489 and #1497) 2007-10-04 16:18:46 +00:00
taylor ddda5bcc9f some generic code cleanup 2007-03-22 20:50:28 +00:00
taylor 960754fe13 remove some dead code
general cleanup
fix issues with texture state changes not affecting things properly
fix stupid texture addressing thing that I had done a long time ago
deal with -img2dds error issue
2007-02-11 10:03:29 +00:00
taylor fd87e59d93 wurrps, someone besides me might actually want to use that ;) 2006-12-27 09:24:31 +00:00
taylor 5a4332c3a8 lots of little cleanup, stale code removal, and small performance adjustments
get rid of the default combine texture state, we don't need it in general, and it can screw up fonts
get rid of the secondary color support, it doesn't do much in non-HTL mode, screws up various things, and has long since been obsolete but material setup
get rid of the old gamma setup, it actually conflicts with newer gamma support
default texture wrapping to edge clamp
do second gr_clear() on init to be sure and catch double-buffer
make sure that our active texture will always get reset to 0, rather than leaving it at whatever was used last
fixed that damn FBO bug from it hanging on textures and causing some rendering errors for various people
only lock verts once in HTL model rendering
2006-12-26 05:25:18 +00:00
taylor dbc1fb0417 get rid of "vram_full", it can never actually be full the way the code works, so having this is redundant
comment out APPLE_client_storage extension usage, I think this was messing some stuff up on OS X and causing memory errors
fix handling of cubemap data so that they can be read properly (can't believe it took so long to notice to an obvious and stupid bug)
be sure to un-bind textures during preload to avoid freaky little errors later
ifdef an error message from the framebuffer error code, Apple doesn't have this one define in their headers for some reason
2006-12-07 18:14:49 +00:00
taylor 36190d92e7 some minor cleanup to anisotropy setting
only use negative lod bias when not using anisotropy to help avoid shimmering
stick lod bias setting in with anisotropy function
2006-08-12 13:14:45 +00:00
taylor ef010994f2 fix for setting of texture lod bias 2006-08-09 14:42:24 +00:00
taylor 700a4958e3 maybe this will finally shut-up some of the people who have complained about certain mipmap issues 2006-07-17 01:11:32 +00:00
taylor 9daca5f555 change clamp mode for font/interface graphics, don't want the border factored in for scaling/filtering 2006-07-15 06:11:27 +00:00
taylor fc765d5e29 fix various things that Valgrind has been complaining about 2006-06-22 14:59:45 +00:00
taylor fb11c6d1bd as a temporary measure, until I can figure out what is going on here:
- disable depth buffer for RTT, may be causing the ATI issues, should work ok without it for most things
  - disable mipmap generation for RTT, something strange is going on there, it's sometimes making black mipmap levels (even for the same texture)
2006-06-19 22:50:58 +00:00
taylor 4d5d947451 fix so that multiple FBOs can be used with different sizes (plus a few other minor adjustments) 2006-06-18 16:49:40 +00:00
taylor f9615c21e8 fix Assert() on value of face variable, it should be able to be -1 for non-cubemap images 2006-06-15 00:15:17 +00:00
taylor ca5b63540d sync current OGL changes:
- go back to using minimize mode which non-active, but doin't minimize when Fred_running
 - remove temporary cmdline options (-spec_scale, -env_scale, -alpha_alpha_blend)
 - change FBO renderbuffer link around a little to maybe avoid freaky drivers (or freaky code)
2006-06-12 03:37:24 +00:00
taylor 326788332a don't Int3() here, it's actually going to happen in some cases when using -img2dds 2006-06-05 23:59:33 +00:00
taylor 7a8789e334 OpenGL envmap support
newer OpenGL extension support
add GL_ARB_texture_rectangle support for non-power-of-2 textures as interface graphics
add cubemap reading and writing support to DDS loader
fix bug in DDS loader that made compressed images with mipmaps use more memory than they really required
add support for a default envmap named "cubemap.dds"
new mission flag "$Environment Map:" to use a pre-existing envmap
minor cleanup of compiler warning messages
get rid of wasteful math from gr_set_proj_matrix()
remove extra gr_set_*_matrix() calls from starfield.cpp as there was no longer a reason for them to be there
clean up bmpman flags in reguards to cubemaps and render targets
disable D3D envmap code until it can be upgraded to current level of code
remove bumpmap code from OpenGL stuff (sorry but it was getting in the way, if it was more than copy-paste it would be worth keeping)
replace gluPerspective() call with glFrustum() call, it's a lot less math this way and saves the extra function call
2006-05-13 07:29:52 +00:00
taylor 2ee9d66423 some cleanup and slight reorg
- remove special uv offsets for non-standard res, they were stupid anyway and don't actually fix the problem (which should actually be fixed now)
 - avoid some costly math where possible in the drawing functions
 - add opengl_error_string(), this is part of a later update but there wasn't a reason to not go ahead and commit this peice now
 - minor cleanup to Win32 extension defines
 - make opengl_lights[] allocate only when using OGL
 - cleanup some costly per-frame lighting stuff
 - clamp textures for interface and aabitmap (font) graphics since they shouldn't normally repeat anyway (the default)
   (doing this for D3D, if it doesn't already, may fix the blue-lines problem since a similar issue was seen with OGL)
2006-04-12 01:10:35 +00:00
taylor bb99432d75 bits of cleanup
minor fixes for -img2dds
2006-04-06 23:23:56 +00:00
taylor 4feb121a5a if -mipmap is used with -img2dds to then have compressed image also contain mipmaps
use nicest hints for texture compression, should improve quality a little
when reporting compressed sizes to debug log make ani size be total, not per frame
2006-03-22 18:14:52 +00:00
taylor 676cee0dfe couple of nitpicks 2006-03-15 17:33:05 +00:00
taylor df3debd00d when I forget that I'm an idiot little things like this slip through (me == moron) 2006-03-12 07:34:39 +00:00
taylor 26b25d548a better lighting for OpenGL
remove some extra stuff that was from sectional bitmaps since we don't need it anymore
2006-01-30 06:52:15 +00:00
taylor b194acc433 be sure to account for skipped mipmap levels in calculation of textures in VRAM 2006-01-14 06:23:39 +00:00
wmcoolmon 746b0724b9 Even more scripting stuff. 2006-01-12 17:42:56 +00:00
taylor 0a6578c8b6 oops, should have been checking my logs on that one, fixes minor GL error 2006-01-03 22:46:52 +00:00
taylor fae386d216 fix a couple of minor mipmap problems
add resizing with mipmaps rather than a physical change in memory when detail levels dictate scaling (maybe this won't blow up)
2006-01-03 02:59:14 +00:00
taylor fa632ab2ee handle case where we make an atexit (on failure) flush call before the texture system is initted 2005-12-29 00:00:18 +00:00
taylor 0b6ed1b5b0 add support for glCompressedTexSubImage2D(), we don't use it yet but there is nothing wrong with adding it already
better support for mipmaps and mipmap filtering
add reg option "TextureFilter" to set bilinear or trilinear filter
clean up bitmap_id/bitmap_handle/texture_handle madness that made things difficult to understand
small fix for using 24-bit images on 16-bit bpp visual (untested)
2005-12-28 22:28:44 +00:00
taylor 9ac1accce9 "House Keeping!!"
- minor cleanup of things that have bothered me at one time or another
  - slight speedup from state switching
  - slightly better specmap handling, fixes a couple of (not frequent) strange and sorta random issues
  - make sure to only disable HTL arb stuff when in HTL mode
  - handle any extra lighting pass before spec pass so the light can be applied properly
2005-12-16 06:48:28 +00:00
taylor 76eda9798d make sure we always disable all VBO related elements to avoid crashing (new that was a problem, did it anyway, me == stupid) 2005-12-15 16:27:45 +00:00
taylor 1dd17dc698 add APPLE_client_storage support to improve texture performance and reduce memory usage a tiny bit on OS X 2005-12-08 15:10:07 +00:00
taylor 926c78f347 fix last bit of recent spec issue 2005-12-07 12:40:51 +00:00
taylor 985e6522fa clean up some init stuff and fix a minor SDL annoyance
make debug messages a bit more readable
clean up the debug console commands for minimize and anisotropic filter setting
make anisotropic filter actually work correctly and have it settable with a reg option
give opengl_set_arb() the ability to disable all features on all arbs at once so I don't have to everywhere
2005-12-06 02:50:41 +00:00
taylor a1ee36aa50 umm, no one saw that, right? :) 2005-11-16 07:45:35 +00:00
taylor 0fe5be4fe9 small bit of EFF cleanup
add -img2dds support
cleanup some D3D stuff (missing a lot since the old code is so unstable I couldn't get it working like I wanted)
some minor OGL cleanup and small performance changes
converge the various pcx_read_bitmap* functions into one
cleanup/rename/remove some cmdline options
2005-11-13 06:44:18 +00:00
taylor dd21fa57f2 some cleanup, fix some general memory leaks, safety stuff and whatever else Valgrind complained about 2005-10-23 20:34:30 +00:00
taylor f47f4034dd make AABITMAP use GL_ALPHA rather than GL_LUMINANCE_ALPHA (now 8-bit instead of 16-bit, fixes several minor rendering issues) 2005-10-23 19:07:18 +00:00
taylor de8bbd5254 slight speedup for font rendering
fix a couple of things that Valgrind complained about
2005-09-20 02:46:53 +00:00
taylor d06f863d48 merge of OSX tree
fix OGL fullscreen switch for SDL since the old way only worked under Linux and not OSX or Windows
fix OGL version check, it would allow a required major version to be higher if the required minor version was lower than current
2005-09-05 09:36:41 +00:00
taylor 260b800593 general cleanup, remove some old code
speed up gr_opengl_flip() just a tad
inverted gamma slider fix that Sticks made to D3D
possible fix for ATI green screens
move opengl_check_for_errors() out of gropentnl so we can use it everywhere
fix logged OGL info from debug builds to be a little more readable
if an extension is found but required function is not then fail
try to optimize glDrawRangeElements so we are not rendering more than the card is optimized for
some 2d matrix usage checks
2005-06-19 02:37:02 +00:00
taylor c5c5382fe4 cleanup of gr_bitmap since it's the same for D3D and OGL, skip if GR_STUB though
fix resize/rendering issue when detail culling is used with optimized opengl_create_texture_sub()
2005-06-03 06:44:17 +00:00
taylor af3587c1e8 little cleanup
optimize opengl_create_texture_sub() by not doing any extra image processing if we don't have to
  if an image is already power-of-2 or we don't need power-of-2 then avoid the extra time and memory usage
2005-06-01 09:37:44 +00:00