Commit Graph

92 Commits

Author SHA1 Message Date
Michael Bayne e00b4ddd6b Switch to new logging API.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@510 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-05-27 22:55:10 +00:00
Michael Bayne 51c01493f2 Type safety, redundant case removal, other cleanup.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@490 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-05-09 11:39:45 +00:00
Michael Bayne cbe348db9a Fixed warning messages.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@313 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-10-26 20:17:30 +00:00
Michael Bayne 9103590534 Load our images directly. Yay.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@311 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-10-26 19:52:52 +00:00
Dave Hoover b5b3a5316e Christmas comes but once a year, but svn keyword substitution day comes
whenever the urge strikes!


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@274 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-07-14 00:27:00 +00:00
Dave Hoover 717dc79c02 Tabs -> spaces
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@268 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-06-26 00:07:47 +00:00
Andrzej Kapolka c755fd626a To reduce shader state changes and compilations, just use the
four-bone-per-vertex configuration for all skinned meshes.  Depending on 
the models we have, it may be worth compiling a separate one for two 
bones per vertex.  Added a hook to customize the material color (for 
per-vertex colors, e.g.)


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@245 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-05-15 00:55:19 +00:00
Andrzej Kapolka 124af1e0b1 Use a fragment shader as well as a vertex shader for the skinned meshes.
I tracked the ATI slowdown down to using a vertex shader in combination 
with fixed function fog.  Also cleaned up ShaderConfig a little.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@244 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-05-14 20:13:39 +00:00
Andrzej Kapolka 6b07087c31 32 matrices is just a feeeeew two many for ATI cards, but of course
their drivers can't do anything useful like report an error; they just 
silently screw up.  Limiting it to 31 makes it work, but there's still a 
strange slowdown issue (and it's not that the shaders are being run in 
software, but it's worth checking for that anyway).


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@243 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-05-12 00:57:35 +00:00
Andrzej Kapolka 82ba950111 Go back to using byte buffers; that wasn't the problem.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@241 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-05-11 18:30:51 +00:00
Andrzej Kapolka fd192268c3 Try using shorts rather than bytes for bone indices.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@238 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-05-10 23:21:15 +00:00
Andrzej Kapolka 8a0168760f Much work to reconfigure shaders automatically based on the model's
current JME state set.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@237 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-05-10 20:35:27 +00:00
Andrzej Kapolka 1d8f04c43a Prepend the #version directive before compiling the shader.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@236 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-05-10 01:31:42 +00:00
Andrzej Kapolka e5db96b963 Ignore cull mode when we're generating frames to morph between.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@235 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-05-10 01:07:54 +00:00
Andrzej Kapolka 45df6d814b Use VBOs for vertices, indices when using shaders; multiply vertices by
weights even if we only have one weight per vertex.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@232 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-05-09 19:51:32 +00:00
Andrzej Kapolka ef35b37648 We need to create a new array when we're *not* using shaders.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@230 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-05-08 01:56:53 +00:00
Andrzej Kapolka 742dc30f9e Basic support for skinning with GLSL shaders. Still need to work out
how to handle different lighting arrangements and complex materials 
(e.g., the metal effect for the Iron Plate).


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@229 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-05-08 01:50:07 +00:00
Andrzej Kapolka 3401bbf3bf Don't skin what you can't see.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@226 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-05-04 01:25:40 +00:00
Andrzej Kapolka bb54ec1888 Optimize vertex order for cache usage and use a better data structure to
(re)index vertices.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@224 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-05-04 00:39:54 +00:00
Andrzej Kapolka 277b62bd52 Don't merge meshes where, in any animation, one is visible and the other
isn't.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@221 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-05-02 18:19:09 +00:00
Andrzej Kapolka 072926f814 Merge meshes in animated models by finding ones that maintain the same
relative position throughout all animations.  Also, don't include 
transforms in the animations for nodes that never move.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@218 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-05-01 23:36:23 +00:00
Andrzej Kapolka 250670e699 Default to using S3TC texture compression.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@215 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-04-27 20:48:48 +00:00
Andrzej Kapolka 488d47262b Where possible, merge meshes with identical attributes.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@201 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-04-18 21:06:08 +00:00
Dave Hoover 4b933b4379 Keyword substition.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@188 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-04-07 00:22:24 +00:00
Andrzej Kapolka 33c0d7f8a5 Added a visitor for geometry batches.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@180 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-03-22 20:55:51 +00:00
Andrzej Kapolka 89e7c41c2e Check for successful shader linkage, returning null if there was an
error.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@178 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-03-21 21:15:53 +00:00
Mark Johnson 9ed8c648ac Allow createDisplay to throw a JmeException
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@177 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-03-21 18:26:02 +00:00
Mark Johnson a75658d7b0 Small change to make it possible to intercept window closing actions (in
case we want to do something other than close the application at that 
time).


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@173 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-03-19 23:11:56 +00:00
Andrzej Kapolka dc4b721198 Added a method to create a shader state using Files and preprocessor
definitions.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@159 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-02-26 19:33:01 +00:00
Michael Bayne b6f5317ad2 More header patrol.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@158 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-02-24 00:38:17 +00:00
Andrzej Kapolka a09600c969 Disable fog on meshes using additive blending.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@156 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-02-17 00:10:03 +00:00
Andrzej Kapolka 15a4d1d075 Use apply, rather than load, to ensure that JME remembers the current
texture state.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@151 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-02-07 23:52:11 +00:00
Michael Bayne 8df7f7e0b3 Support (but don't require) compiling to a custom destination directory.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@150 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-02-07 18:44:17 +00:00
Michael Bayne aa9f74eed8 Use equals() to assuage code analysis tools that don't know that we assign
localType in the local VM and are careful to use the exact same instance.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@149 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-02-06 06:05:27 +00:00
Andrzej Kapolka dddf409ad7 Fixed NPE.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@142 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-02-02 01:36:17 +00:00
Mark Johnson a32f3a65e5 The % operator in Java is not a modulo operator but a remainder
operator.  As such, the result can be negative.  I've added a check to 
prevent our next frame index from becoming negative.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@141 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-02-01 23:01:46 +00:00
Andrzej Kapolka a8e905f419 Added "emissive" and "additive" flags for model bits.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@140 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-02-01 22:48:03 +00:00
Andrzej Kapolka 7f36e60353 Added a translation controller.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@139 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-02-01 21:54:53 +00:00
Andrzej Kapolka 60abc93638 Specify the default repeat type as a parameter; model animations should
not loop by default.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@138 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-02-01 20:03:00 +00:00
Andrzej Kapolka 7cdebe1912 Added a billboard model controller.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@137 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-02-01 19:31:55 +00:00
Andrzej Kapolka fb8f4ce0a8 Fixed a bug with the texture controllers and moved some shared code into
a utility class.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@132 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-01-31 22:05:46 +00:00
Andrzej Kapolka 1bdce080ae Assume that we start at the first frame.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@130 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-01-31 03:55:34 +00:00
Andrzej Kapolka 1cba0183f9 Added texture translation and animation controllers.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@129 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-01-31 03:41:26 +00:00
Michael Bayne 12f8cabd90 Config -> PrefsConfig where appropriate.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@125 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-01-31 00:49:05 +00:00
Dave Hoover 120e9c0db9 Actually substitute keywords (these files are chock full of stale $Id$ tags)
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@119 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-01-24 00:22:12 +00:00
Mark Johnson 86645aa41e Let's remove the path controller when we cancel our move
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@111 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-01-19 18:14:43 +00:00
Andrzej Kapolka 154ce35b3a When stopping animation, make sure to update the meshes if the model was
outside the view frustum on the last update.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@109 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-01-02 19:06:34 +00:00
Andrzej Kapolka 8c346c4f4f Don't set the other texture buffers for cards that don't support
multi-texturing.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@100 ed5b42cb-e716-0410-a449-f6a68f950b19
2006-12-19 02:22:03 +00:00
Michael Bayne 871e38149b Added a new slider mode.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@99 ed5b42cb-e716-0410-a449-f6a68f950b19
2006-12-19 01:55:53 +00:00
Michael Bayne bf6eb30ef6 Whoops added scale caching to the wrong method.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@98 ed5b42cb-e716-0410-a449-f6a68f950b19
2006-12-18 04:24:23 +00:00