Commit Graph

72 Commits (668fd219cc7d18ca3887ea0125a694edaea02747)

Author SHA1 Message Date
Chris Laurel a3bf034f82 Fixed some more DXT5nm related issues:
- Check for dxt5nm file extension to decide whether an image file contains a DXT5nm format file
- Make compressed normal maps work for meshes
- Avoid using dxt5nm textures with non-OGL2 render paths.
2006-10-22 00:13:18 +00:00
Toti 152627ae29 Disabled blocks of code that caused 'defined but not used' compiler warnings 2006-09-12 21:59:05 +00:00
Chris Laurel 65149af63f Fixed opacity for meshes in the OpenGL 2.0 path. 2006-09-06 06:14:11 +00:00
Chris Laurel 54d5de0563 - Added support for emissive color to OpenGL 2.0 render path
- Eliminated code for Lommel-Seeliger photometric model, since it's just a special case of the more general Lunar-Lambert model.
- Cleaned up GLSL_RenderContext so it uses the light and shadow functions in the shader manager
2006-09-03 23:22:07 +00:00
Chris Laurel 9fe6abc739 Fixed a crash bug that occurred when switching from the OpenGL 2.0 render path while viewing a mesh with clouds. 2006-08-30 17:38:54 +00:00
Chris Laurel a784a69004 Corrected the alpha blend function used for translucent meshes in the OpenGL 2.0 render path. 2006-08-30 09:36:44 +00:00
Chris Laurel 1cc0b38fde Enable new atmospheres to work for irregular objects.
Moved parameter setup for atmospheres, lighting, and shadows into the CelestiaGLProgram class.
2006-08-29 06:13:41 +00:00
Chris Laurel c79c01297a Fixed crash bug that occurred when rendering a mesh object with a new-style atmosphere. 2006-08-27 00:57:14 +00:00
Chris Laurel c23d15a4e4 Made LunarLambert term apply to models instead of just ellipsoid bodies. 2006-08-09 06:12:41 +00:00
Chris Laurel c5d25dcb32 Added destructor for GLSL_RenderContext with some code to clean up some render state (vertex array enables.) Fixes a crash that occurred in the OpenGL 2.0 render path when viewing a model with tangents. 2006-08-09 05:13:38 +00:00
Chris Laurel 734f6490c1 Changed ambient light in OpenGL 2.0 path to be modulated by material color to match other render paths. 2006-08-08 06:59:07 +00:00
Chris Laurel 370655d004 Enabled opacity attribute in the OpenGL 2.0 render path. 2006-08-07 17:23:09 +00:00
Chris Laurel f3326dd39f - Added per-pixel specular lighting for GLSL path; can work either with or without bump mapping
- Turn on separate specular color when rendering models (not required for GLSL path)
- Fixed completely broken calculation of object space eye position for GLSL shaders
2006-07-09 02:03:29 +00:00
Chris Laurel dc7ce8986a Improved rendering of meshes in GLSL path:
- Switched to local viewer model for better quality specular highlights
- Added support for specular and normal maps for meshes
- Implemented shadows for meshes (cast by ellipsoids only, not from other meshes yet.)
2006-07-04 05:03:27 +00:00
Chris Laurel 5857865126 Added support for emissive textures for mesh objects (and foundation for further improvements for mesh rendering.) 2005-03-09 16:38:45 +00:00
Chris Laurel ee3bea442d Moved light and shadow state definitions from render.h to rendcontext.h. (part of improved model rendering changes) 2005-02-11 06:11:37 +00:00
Chris Laurel c369770c81 Disabled depth buffer writes when rendering translucent parts of models. 2004-08-13 07:59:02 +00:00
Chris Laurel 8dad02c746 More fixes and improvements for meshes:
- Implemented more general textures (diffuse, specular, emissive, and normal maps supported)
- Fixed texture loading for binary CMOD files
- Corrected a nasty memory allocation error
2004-07-08 11:12:10 +00:00
Chris Laurel 8a692bc773 Mesh and rendering cleanup:
- Add semantic-indexed attribute list to VertexDescription class
- Abstracted RenderContext so that it's an interface with implementations for various render paths.
- Moved all GL code from Mesh class into RenderContext
This work will enable normal and specular maps for meshes (soon)
2004-07-07 09:53:09 +00:00
Chris Laurel 922048f805 Added missing parens in call to hasAlpha--the function was pointer was
being tested for true rather than the result of the function call!
2004-02-23 18:12:42 +00:00
Chris Laurel 6f2cde6770 - Render antiliased lines for graticules (and any other deep sky objects)
- Allow an ssc file definition to override the texture in a model
- When deciding if blending should be turned on when rendering a model, consider whether the texture has an alpha channel
2004-02-22 01:44:38 +00:00
Chris Laurel af25acd173 Implemented textures, specular color, emissive color, and opacity in mesh materials.
Added support for Celestia model files (ASCII only right now)
2004-02-17 09:56:08 +00:00