aboutsummaryrefslogtreecommitdiffstats
path: root/ardor3d-lwjgl
diff options
context:
space:
mode:
authorneothemachine <[email protected]>2013-02-21 16:40:08 +0100
committerneothemachine <[email protected]>2013-02-21 16:40:08 +0100
commitf774bd917e9dfd8cf46e5ed66d41aad64477a238 (patch)
tree8d33aa0cf24165710d420c677f3336641223cff8 /ardor3d-lwjgl
parentedbc5c757c66d56eb2cffffa4076f0f2bfd6e748 (diff)
normalized line endings
see http://www.hanselman.com/blog/YoureJustAnotherCarriageReturnLineFeedInTheWall.aspx and https://help.github.com/articles/dealing-with-line-endings
Diffstat (limited to 'ardor3d-lwjgl')
-rw-r--r--ardor3d-lwjgl/.settings/org.eclipse.jdt.ui.prefs226
-rw-r--r--ardor3d-lwjgl/pom.xml80
-rw-r--r--ardor3d-lwjgl/src/main/java/com/ardor3d/framework/lwjgl/LwjglCanvasRenderer.java414
-rw-r--r--ardor3d-lwjgl/src/main/java/com/ardor3d/input/jinput/JInputControllerWrapper.java248
-rw-r--r--ardor3d-lwjgl/src/main/java/com/ardor3d/input/lwjgl/LwjglControllerWrapper.java246
-rw-r--r--ardor3d-lwjgl/src/main/java/com/ardor3d/renderer/lwjgl/LwjglTextureRendererProvider.java96
-rw-r--r--ardor3d-lwjgl/src/test/java/com/ardor3d/input/lwjgl/TestKey.java66
7 files changed, 688 insertions, 688 deletions
diff --git a/ardor3d-lwjgl/.settings/org.eclipse.jdt.ui.prefs b/ardor3d-lwjgl/.settings/org.eclipse.jdt.ui.prefs
index 7588391..2cb0f4c 100644
--- a/ardor3d-lwjgl/.settings/org.eclipse.jdt.ui.prefs
+++ b/ardor3d-lwjgl/.settings/org.eclipse.jdt.ui.prefs
@@ -1,113 +1,113 @@
-cleanup.add_default_serial_version_id=true
-cleanup.add_generated_serial_version_id=false
-cleanup.add_missing_annotations=true
-cleanup.add_missing_deprecated_annotations=true
-cleanup.add_missing_methods=true
-cleanup.add_missing_nls_tags=false
-cleanup.add_missing_override_annotations=true
-cleanup.add_serial_version_id=true
-cleanup.always_use_blocks=true
-cleanup.always_use_parentheses_in_expressions=true
-cleanup.always_use_this_for_non_static_field_access=false
-cleanup.always_use_this_for_non_static_method_access=false
-cleanup.convert_to_enhanced_for_loop=false
-cleanup.correct_indentation=true
-cleanup.format_source_code=true
-cleanup.format_source_code_changes_only=false
-cleanup.make_local_variable_final=true
-cleanup.make_parameters_final=true
-cleanup.make_private_fields_final=true
-cleanup.make_type_abstract_if_missing_method=false
-cleanup.make_variable_declarations_final=true
-cleanup.never_use_blocks=false
-cleanup.never_use_parentheses_in_expressions=false
-cleanup.organize_imports=true
-cleanup.qualify_static_field_accesses_with_declaring_class=false
-cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-cleanup.qualify_static_member_accesses_with_declaring_class=true
-cleanup.qualify_static_method_accesses_with_declaring_class=false
-cleanup.remove_private_constructors=true
-cleanup.remove_trailing_whitespaces=true
-cleanup.remove_trailing_whitespaces_all=true
-cleanup.remove_trailing_whitespaces_ignore_empty=false
-cleanup.remove_unnecessary_casts=true
-cleanup.remove_unnecessary_nls_tags=true
-cleanup.remove_unused_imports=true
-cleanup.remove_unused_local_variables=false
-cleanup.remove_unused_private_fields=true
-cleanup.remove_unused_private_members=false
-cleanup.remove_unused_private_methods=true
-cleanup.remove_unused_private_types=true
-cleanup.sort_members=false
-cleanup.sort_members_all=false
-cleanup.use_blocks=true
-cleanup.use_blocks_only_for_return_and_throw=false
-cleanup.use_parentheses_in_expressions=false
-cleanup.use_this_for_non_static_field_access=true
-cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-cleanup.use_this_for_non_static_method_access=true
-cleanup.use_this_for_non_static_method_access_only_if_necessary=true
-cleanup_profile=_ArdorLabs
-cleanup_settings_version=2
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_ArdorLabs
-formatter_settings_version=11
-org.eclipse.jdt.ui.exception.name=ex
-org.eclipse.jdt.ui.gettersetter.use.is=true
-org.eclipse.jdt.ui.javadoc=false
-org.eclipse.jdt.ui.keywordthis=false
-org.eclipse.jdt.ui.overrideannotation=true
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * \r\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/**\r\n * Copyright (c) 2008-2010 Ardor Labs, Inc.\r\n *\r\n * This file is part of Ardor3D.\r\n *\r\n * Ardor3D is free software\: you can redistribute it and/or modify it \r\n * under the terms of its license which may be found in the accompanying\r\n * LICENSE file or at &lt;http\://www.ardor3d.com/LICENSE&gt;.\r\n */\r\n\r\n${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\r\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.correct_indentation=true
-sp_cleanup.format_source_code=true
-sp_cleanup.format_source_code_changes_only=false
-sp_cleanup.make_local_variable_final=true
-sp_cleanup.make_parameters_final=true
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_type_abstract_if_missing_method=false
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=true
-sp_cleanup.remove_unused_imports=true
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=true
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=true
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=true
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=true
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_serial_version_id=true
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=true
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=true
+cleanup.format_source_code=true
+cleanup.format_source_code_changes_only=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=true
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=true
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=false
+cleanup.organize_imports=true
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=true
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=true
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup_profile=_ArdorLabs
+cleanup_settings_version=2
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_ArdorLabs
+formatter_settings_version=11
+org.eclipse.jdt.ui.exception.name=ex
+org.eclipse.jdt.ui.gettersetter.use.is=true
+org.eclipse.jdt.ui.javadoc=false
+org.eclipse.jdt.ui.keywordthis=false
+org.eclipse.jdt.ui.overrideannotation=true
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * \r\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/**\r\n * Copyright (c) 2008-2010 Ardor Labs, Inc.\r\n *\r\n * This file is part of Ardor3D.\r\n *\r\n * Ardor3D is free software\: you can redistribute it and/or modify it \r\n * under the terms of its license which may be found in the accompanying\r\n * LICENSE file or at &lt;http\://www.ardor3d.com/LICENSE&gt;.\r\n */\r\n\r\n${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\r\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=true
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=true
+sp_cleanup.make_parameters_final=true
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=true
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=true
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=true
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/ardor3d-lwjgl/pom.xml b/ardor3d-lwjgl/pom.xml
index 49a0ab7..ec2684a 100644
--- a/ardor3d-lwjgl/pom.xml
+++ b/ardor3d-lwjgl/pom.xml
@@ -1,40 +1,40 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>com.ardor3d</groupId>
- <artifactId>ardor3d</artifactId>
- <relativePath>../pom.xml</relativePath>
- <version>0.9-SNAPSHOT</version>
- </parent>
-
- <artifactId>ardor3d-lwjgl</artifactId>
- <packaging>bundle</packaging>
- <name>Ardor 3D LWJGL</name>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.6</source>
- <target>1.6</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>ardor3d-core</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.lwjgl.lwjgl</groupId>
- <artifactId>lwjgl</artifactId>
- </dependency>
- <dependency>
- <groupId>org.lwjgl.lwjgl</groupId>
- <artifactId>lwjgl_util</artifactId>
- </dependency>
- </dependencies>
-</project>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>com.ardor3d</groupId>
+ <artifactId>ardor3d</artifactId>
+ <relativePath>../pom.xml</relativePath>
+ <version>0.9-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>ardor3d-lwjgl</artifactId>
+ <packaging>bundle</packaging>
+ <name>Ardor 3D LWJGL</name>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>ardor3d-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.lwjgl.lwjgl</groupId>
+ <artifactId>lwjgl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.lwjgl.lwjgl</groupId>
+ <artifactId>lwjgl_util</artifactId>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/ardor3d-lwjgl/src/main/java/com/ardor3d/framework/lwjgl/LwjglCanvasRenderer.java b/ardor3d-lwjgl/src/main/java/com/ardor3d/framework/lwjgl/LwjglCanvasRenderer.java
index ab66a1d..51f579d 100644
--- a/ardor3d-lwjgl/src/main/java/com/ardor3d/framework/lwjgl/LwjglCanvasRenderer.java
+++ b/ardor3d-lwjgl/src/main/java/com/ardor3d/framework/lwjgl/LwjglCanvasRenderer.java
@@ -1,208 +1,208 @@
-/**
- * Copyright (c) 2008-2012 Ardor Labs, Inc.
- *
- * This file is part of Ardor3D.
- *
- * Ardor3D is free software: you can redistribute it and/or modify it
- * under the terms of its license which may be found in the accompanying
- * LICENSE file or at <http://www.ardor3d.com/LICENSE>.
- */
-
-package com.ardor3d.framework.lwjgl;
-
-import org.lwjgl.LWJGLException;
-import org.lwjgl.opengl.ARBMultisample;
-import org.lwjgl.opengl.GL11;
-import org.lwjgl.opengl.GLContext;
-
-import com.ardor3d.annotation.MainThread;
-import com.ardor3d.framework.CanvasRenderer;
-import com.ardor3d.framework.DisplaySettings;
-import com.ardor3d.framework.Scene;
-import com.ardor3d.math.ColorRGBA;
-import com.ardor3d.math.Vector3;
-import com.ardor3d.renderer.Camera;
-import com.ardor3d.renderer.ContextCapabilities;
-import com.ardor3d.renderer.ContextManager;
-import com.ardor3d.renderer.RenderContext;
-import com.ardor3d.renderer.Renderer;
-import com.ardor3d.renderer.Camera.ProjectionMode;
-import com.ardor3d.renderer.lwjgl.LwjglContextCapabilities;
-import com.ardor3d.renderer.lwjgl.LwjglRenderer;
-import com.ardor3d.util.Ardor3dException;
-
-public class LwjglCanvasRenderer implements CanvasRenderer {
- protected Scene _scene;
- protected Camera _camera;
- protected boolean _doSwap;
- protected LwjglRenderer _renderer;
- protected Object _context = new Object();
- protected int _frameClear = Renderer.BUFFER_COLOR_AND_DEPTH;
-
- private RenderContext _currentContext;
- private LwjglCanvasCallback _canvasCallback;
-
- // NOTE: This code commented out by Petter 090224, since it isn't really ready to be used,
- // and since it is at the moment more work than it is worth to get it ready. Later on, when
- // we have solved some more fundamental problems, it is probably time to revisit this.
-
- // ensure availability of LWJGL natives
- // {
- // final String[] libraryPaths = LwjglLibraryPaths.getLibraryPaths(System.getProperty("os.name"), System
- // .getProperty("os.arch"));
- //
- // try {
- // NativeLoader.makeLibrariesAvailable(libraryPaths);
- // } catch (final Exception e) {
- // ; // ignore
- // }
- // }
-
- public LwjglCanvasRenderer(final Scene scene) {
- _scene = scene;
- }
-
- @MainThread
- protected ContextCapabilities createContextCapabilities() {
- return new LwjglContextCapabilities(GLContext.getCapabilities());
- }
-
- @MainThread
- public void init(final DisplaySettings settings, final boolean doSwap) {
- _doSwap = doSwap;
-
- // Look up a shared context, if a shared LwjglCanvasRenderer is given.
- // XXX: Shared contexts will probably not work... lwjgl does not seem to have a way to make a new glcontext that
- // shares lists, textures, etc.
- RenderContext sharedContext = null;
- if (settings.getShareContext() != null) {
- sharedContext = ContextManager.getContextForKey(settings.getShareContext().getRenderContext()
- .getContextKey());
- }
-
- try {
- _canvasCallback.makeCurrent();
- GLContext.useContext(_context);
- } catch (final LWJGLException e) {
- throw new Ardor3dException("Unable to init CanvasRenderer.", e);
- }
-
- final ContextCapabilities caps = createContextCapabilities();
- _currentContext = new RenderContext(this, caps, sharedContext);
-
- ContextManager.addContext(this, _currentContext);
- ContextManager.switchContext(this);
-
- _renderer = new LwjglRenderer();
-
- if (settings.getSamples() != 0 && caps.isMultisampleSupported()) {
- GL11.glEnable(ARBMultisample.GL_MULTISAMPLE_ARB);
- }
-
- _renderer.setBackgroundColor(ColorRGBA.BLACK);
-
- if (_camera == null) {
- /** Set up how our camera sees. */
- _camera = new Camera(settings.getWidth(), settings.getHeight());
- _camera.setFrustumPerspective(45.0f, (float) settings.getWidth() / (float) settings.getHeight(), 1, 1000);
- _camera.setProjectionMode(ProjectionMode.Perspective);
-
- final Vector3 loc = new Vector3(0.0f, 0.0f, 10.0f);
- final Vector3 left = new Vector3(-1.0f, 0.0f, 0.0f);
- final Vector3 up = new Vector3(0.0f, 1.0f, 0.0f);
- final Vector3 dir = new Vector3(0.0f, 0f, -1.0f);
- /** Move our camera to a correct place and orientation. */
- _camera.setFrame(loc, left, up, dir);
- } else {
- // use new width and height to set ratio.
- _camera.setFrustumPerspective(_camera.getFovY(),
- (float) settings.getWidth() / (float) settings.getHeight(), _camera.getFrustumNear(), _camera
- .getFrustumFar());
- }
- }
-
- @MainThread
- public boolean draw() {
-
- // set up context for rendering this canvas
- makeCurrentContext();
-
- // render stuff, first apply our camera if we have one
- if (_camera != null) {
- if (Camera.getCurrentCamera() != _camera) {
- _camera.update();
- }
- _camera.apply(_renderer);
- }
- _renderer.clearBuffers(_frameClear);
-
- final boolean drew = _scene.renderUnto(_renderer);
- _renderer.flushFrame(drew && _doSwap);
-
- // release the context if we're done (swapped and all)
- if (_doSwap) {
- releaseCurrentContext();
- }
-
- return drew;
- }
-
- public Camera getCamera() {
- return _camera;
- }
-
- public Scene getScene() {
- return _scene;
- }
-
- public void setScene(final Scene scene) {
- _scene = scene;
- }
-
- public LwjglCanvasCallback getCanvasCallback() {
- return _canvasCallback;
- }
-
- public void setCanvasCallback(final LwjglCanvasCallback canvasCallback) {
- _canvasCallback = canvasCallback;
- }
-
- public Renderer getRenderer() {
- return _renderer;
- }
-
- public void makeCurrentContext() throws Ardor3dException {
- try {
- _canvasCallback.makeCurrent();
- GLContext.useContext(_context);
- ContextManager.switchContext(this);
- } catch (final LWJGLException e) {
- throw new Ardor3dException("Failed to claim OpenGL context.", e);
- }
- }
-
- public void releaseCurrentContext() {
- try {
- GLContext.useContext(null);
- _canvasCallback.releaseContext();
- } catch (final LWJGLException e) {
- throw new RuntimeException(e);
- }
- }
-
- public void setCamera(final Camera camera) {
- _camera = camera;
- }
-
- public RenderContext getRenderContext() {
- return _currentContext;
- }
-
- public int getFrameClear() {
- return _frameClear;
- }
-
- public void setFrameClear(final int buffers) {
- _frameClear = buffers;
- }
+/**
+ * Copyright (c) 2008-2012 Ardor Labs, Inc.
+ *
+ * This file is part of Ardor3D.
+ *
+ * Ardor3D is free software: you can redistribute it and/or modify it
+ * under the terms of its license which may be found in the accompanying
+ * LICENSE file or at <http://www.ardor3d.com/LICENSE>.
+ */
+
+package com.ardor3d.framework.lwjgl;
+
+import org.lwjgl.LWJGLException;
+import org.lwjgl.opengl.ARBMultisample;
+import org.lwjgl.opengl.GL11;
+import org.lwjgl.opengl.GLContext;
+
+import com.ardor3d.annotation.MainThread;
+import com.ardor3d.framework.CanvasRenderer;
+import com.ardor3d.framework.DisplaySettings;
+import com.ardor3d.framework.Scene;
+import com.ardor3d.math.ColorRGBA;
+import com.ardor3d.math.Vector3;
+import com.ardor3d.renderer.Camera;
+import com.ardor3d.renderer.ContextCapabilities;
+import com.ardor3d.renderer.ContextManager;
+import com.ardor3d.renderer.RenderContext;
+import com.ardor3d.renderer.Renderer;
+import com.ardor3d.renderer.Camera.ProjectionMode;
+import com.ardor3d.renderer.lwjgl.LwjglContextCapabilities;
+import com.ardor3d.renderer.lwjgl.LwjglRenderer;
+import com.ardor3d.util.Ardor3dException;
+
+public class LwjglCanvasRenderer implements CanvasRenderer {
+ protected Scene _scene;
+ protected Camera _camera;
+ protected boolean _doSwap;
+ protected LwjglRenderer _renderer;
+ protected Object _context = new Object();
+ protected int _frameClear = Renderer.BUFFER_COLOR_AND_DEPTH;
+
+ private RenderContext _currentContext;
+ private LwjglCanvasCallback _canvasCallback;
+
+ // NOTE: This code commented out by Petter 090224, since it isn't really ready to be used,
+ // and since it is at the moment more work than it is worth to get it ready. Later on, when
+ // we have solved some more fundamental problems, it is probably time to revisit this.
+
+ // ensure availability of LWJGL natives
+ // {
+ // final String[] libraryPaths = LwjglLibraryPaths.getLibraryPaths(System.getProperty("os.name"), System
+ // .getProperty("os.arch"));
+ //
+ // try {
+ // NativeLoader.makeLibrariesAvailable(libraryPaths);
+ // } catch (final Exception e) {
+ // ; // ignore
+ // }
+ // }
+
+ public LwjglCanvasRenderer(final Scene scene) {
+ _scene = scene;
+ }
+
+ @MainThread
+ protected ContextCapabilities createContextCapabilities() {
+ return new LwjglContextCapabilities(GLContext.getCapabilities());
+ }
+
+ @MainThread
+ public void init(final DisplaySettings settings, final boolean doSwap) {
+ _doSwap = doSwap;
+
+ // Look up a shared context, if a shared LwjglCanvasRenderer is given.
+ // XXX: Shared contexts will probably not work... lwjgl does not seem to have a way to make a new glcontext that
+ // shares lists, textures, etc.
+ RenderContext sharedContext = null;
+ if (settings.getShareContext() != null) {
+ sharedContext = ContextManager.getContextForKey(settings.getShareContext().getRenderContext()
+ .getContextKey());
+ }
+
+ try {
+ _canvasCallback.makeCurrent();
+ GLContext.useContext(_context);
+ } catch (final LWJGLException e) {
+ throw new Ardor3dException("Unable to init CanvasRenderer.", e);
+ }
+
+ final ContextCapabilities caps = createContextCapabilities();
+ _currentContext = new RenderContext(this, caps, sharedContext);
+
+ ContextManager.addContext(this, _currentContext);
+ ContextManager.switchContext(this);
+
+ _renderer = new LwjglRenderer();
+
+ if (settings.getSamples() != 0 && caps.isMultisampleSupported()) {
+ GL11.glEnable(ARBMultisample.GL_MULTISAMPLE_ARB);
+ }
+
+ _renderer.setBackgroundColor(ColorRGBA.BLACK);
+
+ if (_camera == null) {
+ /** Set up how our camera sees. */
+ _camera = new Camera(settings.getWidth(), settings.getHeight());
+ _camera.setFrustumPerspective(45.0f, (float) settings.getWidth() / (float) settings.getHeight(), 1, 1000);
+ _camera.setProjectionMode(ProjectionMode.Perspective);
+
+ final Vector3 loc = new Vector3(0.0f, 0.0f, 10.0f);
+ final Vector3 left = new Vector3(-1.0f, 0.0f, 0.0f);
+ final Vector3 up = new Vector3(0.0f, 1.0f, 0.0f);
+ final Vector3 dir = new Vector3(0.0f, 0f, -1.0f);
+ /** Move our camera to a correct place and orientation. */
+ _camera.setFrame(loc, left, up, dir);
+ } else {
+ // use new width and height to set ratio.
+ _camera.setFrustumPerspective(_camera.getFovY(),
+ (float) settings.getWidth() / (float) settings.getHeight(), _camera.getFrustumNear(), _camera
+ .getFrustumFar());
+ }
+ }
+
+ @MainThread
+ public boolean draw() {
+
+ // set up context for rendering this canvas
+ makeCurrentContext();
+
+ // render stuff, first apply our camera if we have one
+ if (_camera != null) {
+ if (Camera.getCurrentCamera() != _camera) {
+ _camera.update();
+ }
+ _camera.apply(_renderer);
+ }
+ _renderer.clearBuffers(_frameClear);
+
+ final boolean drew = _scene.renderUnto(_renderer);
+ _renderer.flushFrame(drew && _doSwap);
+
+ // release the context if we're done (swapped and all)
+ if (_doSwap) {
+ releaseCurrentContext();
+ }
+
+ return drew;
+ }
+
+ public Camera getCamera() {
+ return _camera;
+ }
+
+ public Scene getScene() {
+ return _scene;
+ }
+
+ public void setScene(final Scene scene) {
+ _scene = scene;
+ }
+
+ public LwjglCanvasCallback getCanvasCallback() {
+ return _canvasCallback;
+ }
+
+ public void setCanvasCallback(final LwjglCanvasCallback canvasCallback) {
+ _canvasCallback = canvasCallback;
+ }
+
+ public Renderer getRenderer() {
+ return _renderer;
+ }
+
+ public void makeCurrentContext() throws Ardor3dException {
+ try {
+ _canvasCallback.makeCurrent();
+ GLContext.useContext(_context);
+ ContextManager.switchContext(this);
+ } catch (final LWJGLException e) {
+ throw new Ardor3dException("Failed to claim OpenGL context.", e);
+ }
+ }
+
+ public void releaseCurrentContext() {
+ try {
+ GLContext.useContext(null);
+ _canvasCallback.releaseContext();
+ } catch (final LWJGLException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public void setCamera(final Camera camera) {
+ _camera = camera;
+ }
+
+ public RenderContext getRenderContext() {
+ return _currentContext;
+ }
+
+ public int getFrameClear() {
+ return _frameClear;
+ }
+
+ public void setFrameClear(final int buffers) {
+ _frameClear = buffers;
+ }
} \ No newline at end of file
diff --git a/ardor3d-lwjgl/src/main/java/com/ardor3d/input/jinput/JInputControllerWrapper.java b/ardor3d-lwjgl/src/main/java/com/ardor3d/input/jinput/JInputControllerWrapper.java
index fed0775..114a869 100644
--- a/ardor3d-lwjgl/src/main/java/com/ardor3d/input/jinput/JInputControllerWrapper.java
+++ b/ardor3d-lwjgl/src/main/java/com/ardor3d/input/jinput/JInputControllerWrapper.java
@@ -1,125 +1,125 @@
-/**
- * Copyright (c) 2008-2012 Ardor Labs, Inc.
- *
- * This file is part of Ardor3D.
- *
- * Ardor3D is free software: you can redistribute it and/or modify it
- * under the terms of its license which may be found in the accompanying
- * LICENSE file or at <http://www.ardor3d.com/LICENSE>.
- */
-
-package com.ardor3d.input.jinput;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import net.java.games.input.Component;
-import net.java.games.input.Component.Identifier;
-import net.java.games.input.Controller;
-import net.java.games.input.Controller.Type;
-import net.java.games.input.ControllerEnvironment;
-import net.java.games.input.Event;
-
-import com.ardor3d.input.ControllerEvent;
-import com.ardor3d.input.ControllerInfo;
-import com.ardor3d.input.ControllerState;
-import com.ardor3d.input.ControllerWrapper;
-import com.google.common.collect.AbstractIterator;
-import com.google.common.collect.Lists;
-import com.google.common.collect.PeekingIterator;
-
-public class JInputControllerWrapper implements ControllerWrapper {
-
- protected final Event _event = new Event();
- protected final List<ControllerEvent> _events = Collections.synchronizedList(new ArrayList<ControllerEvent>());
- protected JInputControllerEventIterator _eventsIt = new JInputControllerEventIterator();
- protected final List<ControllerInfo> _controllers = Lists.newArrayList();
- protected static boolean _inited = false;
-
- public PeekingIterator<ControllerEvent> getEvents() {
- init();
- if (!_eventsIt.hasNext()) {
- _eventsIt = new JInputControllerEventIterator();
- }
- for (final Controller controller : ControllerEnvironment.getDefaultEnvironment().getControllers()) {
- controller.poll();
- while (controller.getEventQueue().getNextEvent(_event)) {
- if (controller.getType() != Type.KEYBOARD && controller.getType() != Type.MOUSE) {
- _events.add(createControllerEvent(controller, _event));
- }
- }
- }
-
- return _eventsIt;
- }
-
- @Override
- public int getControllerCount() {
- init();
- return _controllers.size();
- }
-
- @Override
- public ControllerInfo getControllerInfo(final int controllerIndex) {
- init();
- return _controllers.get(controllerIndex);
- }
-
- public synchronized void init() {
- if (_inited) {
- return;
- }
-
- try {
- ControllerEnvironment.getDefaultEnvironment();
-
- for (final Controller controller : ControllerEnvironment.getDefaultEnvironment().getControllers()) {
- if (controller.getType() != Type.KEYBOARD && controller.getType() != Type.MOUSE) {
- _controllers.add(getControllerInfo(controller));
- for (final Component component : controller.getComponents()) {
- ControllerState.NOTHING.set(controller.getName(), component.getIdentifier().getName(), 0);
- }
- }
- }
- } catch (final Exception e) {
- e.printStackTrace();
- } finally {
- _inited = true;
- }
- }
-
- protected ControllerInfo getControllerInfo(final Controller controller) {
- final List<String> axisNames = Lists.newArrayList();
- final List<String> buttonNames = Lists.newArrayList();
-
- for (final Component comp : controller.getComponents()) {
- if (comp.getIdentifier() instanceof Identifier.Axis) {
- axisNames.add(comp.getName());
- } else if (comp.getIdentifier() instanceof Identifier.Button) {
- buttonNames.add(comp.getName());
- }
- }
-
- return new ControllerInfo(controller.getName(), axisNames, buttonNames);
- }
-
- protected ControllerEvent createControllerEvent(final Controller controller, final Event event) {
- return new ControllerEvent(event.getNanos(), controller.getName(), event.getComponent().getIdentifier()
- .getName(), event.getValue());
- }
-
- protected class JInputControllerEventIterator extends AbstractIterator<ControllerEvent> implements
- PeekingIterator<ControllerEvent> {
-
- @Override
- protected ControllerEvent computeNext() {
- if (_events.size() > 0) {
- final ControllerEvent controllerEvent = _events.remove(0);
- return controllerEvent;
- } else {
- return endOfData();
- }
- }
- }
+/**
+ * Copyright (c) 2008-2012 Ardor Labs, Inc.
+ *
+ * This file is part of Ardor3D.
+ *
+ * Ardor3D is free software: you can redistribute it and/or modify it
+ * under the terms of its license which may be found in the accompanying
+ * LICENSE file or at <http://www.ardor3d.com/LICENSE>.
+ */
+
+package com.ardor3d.input.jinput;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import net.java.games.input.Component;
+import net.java.games.input.Component.Identifier;
+import net.java.games.input.Controller;
+import net.java.games.input.Controller.Type;
+import net.java.games.input.ControllerEnvironment;
+import net.java.games.input.Event;
+
+import com.ardor3d.input.ControllerEvent;
+import com.ardor3d.input.ControllerInfo;
+import com.ardor3d.input.ControllerState;
+import com.ardor3d.input.ControllerWrapper;
+import com.google.common.collect.AbstractIterator;
+import com.google.common.collect.Lists;
+import com.google.common.collect.PeekingIterator;
+
+public class JInputControllerWrapper implements ControllerWrapper {
+
+ protected final Event _event = new Event();
+ protected final List<ControllerEvent> _events = Collections.synchronizedList(new ArrayList<ControllerEvent>());
+ protected JInputControllerEventIterator _eventsIt = new JInputControllerEventIterator();
+ protected final List<ControllerInfo> _controllers = Lists.newArrayList();
+ protected static boolean _inited = false;
+
+ public PeekingIterator<ControllerEvent> getEvents() {
+ init();
+ if (!_eventsIt.hasNext()) {
+ _eventsIt = new JInputControllerEventIterator();
+ }
+ for (final Controller controller : ControllerEnvironment.getDefaultEnvironment().getControllers()) {
+ controller.poll();
+ while (controller.getEventQueue().getNextEvent(_event)) {
+ if (controller.getType() != Type.KEYBOARD && controller.getType() != Type.MOUSE) {
+ _events.add(createControllerEvent(controller, _event));
+ }
+ }
+ }
+
+ return _eventsIt;
+ }
+
+ @Override
+ public int getControllerCount() {
+ init();
+ return _controllers.size();
+ }
+
+ @Override
+ public ControllerInfo getControllerInfo(final int controllerIndex) {
+ init();
+ return _controllers.get(controllerIndex);
+ }
+
+ public synchronized void init() {
+ if (_inited) {
+ return;
+ }
+
+ try {
+ ControllerEnvironment.getDefaultEnvironment();
+
+ for (final Controller controller : ControllerEnvironment.getDefaultEnvironment().getControllers()) {
+ if (controller.getType() != Type.KEYBOARD && controller.getType() != Type.MOUSE) {
+ _controllers.add(getControllerInfo(controller));
+ for (final Component component : controller.getComponents()) {
+ ControllerState.NOTHING.set(controller.getName(), component.getIdentifier().getName(), 0);
+ }
+ }
+ }
+ } catch (final Exception e) {
+ e.printStackTrace();
+ } finally {
+ _inited = true;
+ }
+ }
+
+ protected ControllerInfo getControllerInfo(final Controller controller) {
+ final List<String> axisNames = Lists.newArrayList();
+ final List<String> buttonNames = Lists.newArrayList();
+
+ for (final Component comp : controller.getComponents()) {
+ if (comp.getIdentifier() instanceof Identifier.Axis) {
+ axisNames.add(comp.getName());
+ } else if (comp.getIdentifier() instanceof Identifier.Button) {
+ buttonNames.add(comp.getName());
+ }
+ }
+
+ return new ControllerInfo(controller.getName(), axisNames, buttonNames);
+ }
+
+ protected ControllerEvent createControllerEvent(final Controller controller, final Event event) {
+ return new ControllerEvent(event.getNanos(), controller.getName(), event.getComponent().getIdentifier()
+ .getName(), event.getValue());
+ }
+
+ protected class JInputControllerEventIterator extends AbstractIterator<ControllerEvent> implements
+ PeekingIterator<ControllerEvent> {
+
+ @Override
+ protected ControllerEvent computeNext() {
+ if (_events.size() > 0) {
+ final ControllerEvent controllerEvent = _events.remove(0);
+ return controllerEvent;
+ } else {
+ return endOfData();
+ }
+ }
+ }
} \ No newline at end of file
diff --git a/ardor3d-lwjgl/src/main/java/com/ardor3d/input/lwjgl/LwjglControllerWrapper.java b/ardor3d-lwjgl/src/main/java/com/ardor3d/input/lwjgl/LwjglControllerWrapper.java
index d92fdc3..fc4a2b4 100644
--- a/ardor3d-lwjgl/src/main/java/com/ardor3d/input/lwjgl/LwjglControllerWrapper.java
+++ b/ardor3d-lwjgl/src/main/java/com/ardor3d/input/lwjgl/LwjglControllerWrapper.java
@@ -1,124 +1,124 @@
-/**
- * Copyright (c) 2008-2012 Ardor Labs, Inc.
- *
- * This file is part of Ardor3D.
- *
- * Ardor3D is free software: you can redistribute it and/or modify it
- * under the terms of its license which may be found in the accompanying
- * LICENSE file or at <http://www.ardor3d.com/LICENSE>.
- */
-
-package com.ardor3d.input.lwjgl;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.lwjgl.input.Controller;
-import org.lwjgl.input.Controllers;
-
-import com.ardor3d.input.ControllerEvent;
-import com.ardor3d.input.ControllerInfo;
-import com.ardor3d.input.ControllerState;
-import com.ardor3d.input.ControllerWrapper;
-import com.google.common.collect.AbstractIterator;
-import com.google.common.collect.Lists;
-import com.google.common.collect.PeekingIterator;
-
-public class LwjglControllerWrapper implements ControllerWrapper {
-
- protected static boolean _inited = false;
- protected final List<ControllerEvent> _events = Collections.synchronizedList(new ArrayList<ControllerEvent>());
- protected LwjglControllerEventIterator _eventsIt = new LwjglControllerEventIterator();
- protected final List<ControllerInfo> _controllers = Lists.newArrayList();
-
- private class LwjglControllerEventIterator extends AbstractIterator<ControllerEvent> implements
- PeekingIterator<ControllerEvent> {
-
- @Override
- protected ControllerEvent computeNext() {
- if (_events.size() > 0) {
- return _events.remove(0);
- } else {
- return endOfData();
- }
- }
- }
-
- public PeekingIterator<ControllerEvent> getEvents() {
- init();
- if (!_eventsIt.hasNext()) {
- _eventsIt = new LwjglControllerEventIterator();
- }
-
- while (Controllers.next()) {
- final Controller source = Controllers.getEventSource();
- if (Controllers.isEventButton()) {
- _events.add(new ControllerEvent(Controllers.getEventNanoseconds(), source.getName(), source
- .getButtonName(Controllers.getEventControlIndex()), source.isButtonPressed(Controllers
- .getEventControlIndex()) ? 1f : 0f));
- } else if (Controllers.isEventAxis()) {
- _events.add(new ControllerEvent(Controllers.getEventNanoseconds(), source.getName(), source
- .getAxisName(Controllers.getEventControlIndex()), source.getAxisValue(Controllers
- .getEventControlIndex())));
- } else if (Controllers.isEventPovX()) {
- _events.add(new ControllerEvent(Controllers.getEventNanoseconds(), source.getName(), "Pov X", source
- .getPovX()));
- } else if (Controllers.isEventPovY()) {
- _events.add(new ControllerEvent(Controllers.getEventNanoseconds(), source.getName(), "Pov Y", source
- .getPovY()));
- }
- }
-
- return _eventsIt;
- }
-
- public synchronized void init() {
- if (_inited) {
- return;
- }
- try {
- Controllers.create();
- for (int i = 0, max = Controllers.getControllerCount(); i < max; i++) {
- final Controller controller = Controllers.getController(i);
- _controllers.add(getControllerInfo(controller));
- for (int j = 0; j < controller.getAxisCount(); j++) {
- ControllerState.NOTHING.set(controller.getName(), controller.getAxisName(j), 0);
- }
- for (int j = 0; j < controller.getButtonCount(); j++) {
- ControllerState.NOTHING.set(controller.getName(), controller.getButtonName(j), 0);
- }
- }
- } catch (final Exception e) {
- e.printStackTrace();
- } finally {
- _inited = true;
- }
- }
-
- protected ControllerInfo getControllerInfo(final Controller controller) {
- final List<String> axisNames = Lists.newArrayList();
- final List<String> buttonNames = Lists.newArrayList();
-
- for (int i = 0; i < controller.getAxisCount(); i++) {
- axisNames.add(controller.getAxisName(i));
- }
- for (int i = 0; i < controller.getButtonCount(); i++) {
- buttonNames.add(controller.getButtonName(i));
- }
-
- return new ControllerInfo(controller.getName(), axisNames, buttonNames);
- }
-
- @Override
- public int getControllerCount() {
- init();
- return Controllers.getControllerCount();
- }
-
- @Override
- public ControllerInfo getControllerInfo(final int controllerIndex) {
- init();
- return _controllers.get(controllerIndex);
- }
+/**
+ * Copyright (c) 2008-2012 Ardor Labs, Inc.
+ *
+ * This file is part of Ardor3D.
+ *
+ * Ardor3D is free software: you can redistribute it and/or modify it
+ * under the terms of its license which may be found in the accompanying
+ * LICENSE file or at <http://www.ardor3d.com/LICENSE>.
+ */
+
+package com.ardor3d.input.lwjgl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.lwjgl.input.Controller;
+import org.lwjgl.input.Controllers;
+
+import com.ardor3d.input.ControllerEvent;
+import com.ardor3d.input.ControllerInfo;
+import com.ardor3d.input.ControllerState;
+import com.ardor3d.input.ControllerWrapper;
+import com.google.common.collect.AbstractIterator;
+import com.google.common.collect.Lists;
+import com.google.common.collect.PeekingIterator;
+
+public class LwjglControllerWrapper implements ControllerWrapper {
+
+ protected static boolean _inited = false;
+ protected final List<ControllerEvent> _events = Collections.synchronizedList(new ArrayList<ControllerEvent>());
+ protected LwjglControllerEventIterator _eventsIt = new LwjglControllerEventIterator();
+ protected final List<ControllerInfo> _controllers = Lists.newArrayList();
+
+ private class LwjglControllerEventIterator extends AbstractIterator<ControllerEvent> implements
+ PeekingIterator<ControllerEvent> {
+
+ @Override
+ protected ControllerEvent computeNext() {
+ if (_events.size() > 0) {
+ return _events.remove(0);
+ } else {
+ return endOfData();
+ }
+ }
+ }
+
+ public PeekingIterator<ControllerEvent> getEvents() {
+ init();
+ if (!_eventsIt.hasNext()) {
+ _eventsIt = new LwjglControllerEventIterator();
+ }
+
+ while (Controllers.next()) {
+ final Controller source = Controllers.getEventSource();
+ if (Controllers.isEventButton()) {
+ _events.add(new ControllerEvent(Controllers.getEventNanoseconds(), source.getName(), source
+ .getButtonName(Controllers.getEventControlIndex()), source.isButtonPressed(Controllers
+ .getEventControlIndex()) ? 1f : 0f));
+ } else if (Controllers.isEventAxis()) {
+ _events.add(new ControllerEvent(Controllers.getEventNanoseconds(), source.getName(), source
+ .getAxisName(Controllers.getEventControlIndex()), source.getAxisValue(Controllers
+ .getEventControlIndex())));
+ } else if (Controllers.isEventPovX()) {
+ _events.add(new ControllerEvent(Controllers.getEventNanoseconds(), source.getName(), "Pov X", source
+ .getPovX()));
+ } else if (Controllers.isEventPovY()) {
+ _events.add(new ControllerEvent(Controllers.getEventNanoseconds(), source.getName(), "Pov Y", source
+ .getPovY()));
+ }
+ }
+
+ return _eventsIt;
+ }
+
+ public synchronized void init() {
+ if (_inited) {
+ return;
+ }
+ try {
+ Controllers.create();
+ for (int i = 0, max = Controllers.getControllerCount(); i < max; i++) {
+ final Controller controller = Controllers.getController(i);
+ _controllers.add(getControllerInfo(controller));
+ for (int j = 0; j < controller.getAxisCount(); j++) {
+ ControllerState.NOTHING.set(controller.getName(), controller.getAxisName(j), 0);
+ }
+ for (int j = 0; j < controller.getButtonCount(); j++) {
+ ControllerState.NOTHING.set(controller.getName(), controller.getButtonName(j), 0);
+ }
+ }
+ } catch (final Exception e) {
+ e.printStackTrace();
+ } finally {
+ _inited = true;
+ }
+ }
+
+ protected ControllerInfo getControllerInfo(final Controller controller) {
+ final List<String> axisNames = Lists.newArrayList();
+ final List<String> buttonNames = Lists.newArrayList();
+
+ for (int i = 0; i < controller.getAxisCount(); i++) {
+ axisNames.add(controller.getAxisName(i));
+ }
+ for (int i = 0; i < controller.getButtonCount(); i++) {
+ buttonNames.add(controller.getButtonName(i));
+ }
+
+ return new ControllerInfo(controller.getName(), axisNames, buttonNames);
+ }
+
+ @Override
+ public int getControllerCount() {
+ init();
+ return Controllers.getControllerCount();
+ }
+
+ @Override
+ public ControllerInfo getControllerInfo(final int controllerIndex) {
+ init();
+ return _controllers.get(controllerIndex);
+ }
} \ No newline at end of file
diff --git a/ardor3d-lwjgl/src/main/java/com/ardor3d/renderer/lwjgl/LwjglTextureRendererProvider.java b/ardor3d-lwjgl/src/main/java/com/ardor3d/renderer/lwjgl/LwjglTextureRendererProvider.java
index a491fe5..594d4bc 100644
--- a/ardor3d-lwjgl/src/main/java/com/ardor3d/renderer/lwjgl/LwjglTextureRendererProvider.java
+++ b/ardor3d-lwjgl/src/main/java/com/ardor3d/renderer/lwjgl/LwjglTextureRendererProvider.java
@@ -1,48 +1,48 @@
-/**
- * Copyright (c) 2008-2012 Ardor Labs, Inc.
- *
- * This file is part of Ardor3D.
- *
- * Ardor3D is free software: you can redistribute it and/or modify it
- * under the terms of its license which may be found in the accompanying
- * LICENSE file or at <http://www.ardor3d.com/LICENSE>.
- */
-
-package com.ardor3d.renderer.lwjgl;
-
-import java.util.logging.Logger;
-
-import com.ardor3d.framework.DisplaySettings;
-import com.ardor3d.renderer.ContextCapabilities;
-import com.ardor3d.renderer.Renderer;
-import com.ardor3d.renderer.TextureRenderer;
-import com.ardor3d.renderer.TextureRendererProvider;
-
-public class LwjglTextureRendererProvider implements TextureRendererProvider {
-
- private static final Logger logger = Logger.getLogger(LwjglTextureRendererProvider.class.getName());
-
- public TextureRenderer createTextureRenderer(final int width, final int height, final Renderer renderer,
- final ContextCapabilities caps) {
- return createTextureRenderer(width, height, 0, 0, renderer, caps);
- }
-
- public TextureRenderer createTextureRenderer(final int width, final int height, final int depthBits,
- final int samples, final Renderer renderer, final ContextCapabilities caps) {
- return createTextureRenderer(new DisplaySettings(width, height, depthBits, samples), false, renderer, caps);
- }
-
- public TextureRenderer createTextureRenderer(final DisplaySettings settings, final boolean forcePbuffer,
- final Renderer renderer, final ContextCapabilities caps) {
- if (!forcePbuffer && caps.isFBOSupported()) {
- return new LwjglTextureRenderer(settings.getWidth(), settings.getHeight(), settings.getDepthBits(),
- settings.getSamples(), renderer, caps);
- } else if (caps.isPbufferSupported()) {
- return new LwjglPbufferTextureRenderer(settings, renderer, caps);
- } else {
- logger.severe("No texture renderer support (FBO or Pbuffer).");
- return null;
- }
-
- }
-}
+/**
+ * Copyright (c) 2008-2012 Ardor Labs, Inc.
+ *
+ * This file is part of Ardor3D.
+ *
+ * Ardor3D is free software: you can redistribute it and/or modify it
+ * under the terms of its license which may be found in the accompanying
+ * LICENSE file or at <http://www.ardor3d.com/LICENSE>.
+ */
+
+package com.ardor3d.renderer.lwjgl;
+
+import java.util.logging.Logger;
+
+import com.ardor3d.framework.DisplaySettings;
+import com.ardor3d.renderer.ContextCapabilities;
+import com.ardor3d.renderer.Renderer;
+import com.ardor3d.renderer.TextureRenderer;
+import com.ardor3d.renderer.TextureRendererProvider;
+
+public class LwjglTextureRendererProvider implements TextureRendererProvider {
+
+ private static final Logger logger = Logger.getLogger(LwjglTextureRendererProvider.class.getName());
+
+ public TextureRenderer createTextureRenderer(final int width, final int height, final Renderer renderer,
+ final ContextCapabilities caps) {
+ return createTextureRenderer(width, height, 0, 0, renderer, caps);
+ }
+
+ public TextureRenderer createTextureRenderer(final int width, final int height, final int depthBits,
+ final int samples, final Renderer renderer, final ContextCapabilities caps) {
+ return createTextureRenderer(new DisplaySettings(width, height, depthBits, samples), false, renderer, caps);
+ }
+
+ public TextureRenderer createTextureRenderer(final DisplaySettings settings, final boolean forcePbuffer,
+ final Renderer renderer, final ContextCapabilities caps) {
+ if (!forcePbuffer && caps.isFBOSupported()) {
+ return new LwjglTextureRenderer(settings.getWidth(), settings.getHeight(), settings.getDepthBits(),
+ settings.getSamples(), renderer, caps);
+ } else if (caps.isPbufferSupported()) {
+ return new LwjglPbufferTextureRenderer(settings, renderer, caps);
+ } else {
+ logger.severe("No texture renderer support (FBO or Pbuffer).");
+ return null;
+ }
+
+ }
+}
diff --git a/ardor3d-lwjgl/src/test/java/com/ardor3d/input/lwjgl/TestKey.java b/ardor3d-lwjgl/src/test/java/com/ardor3d/input/lwjgl/TestKey.java
index 63ced02..abfb8d4 100644
--- a/ardor3d-lwjgl/src/test/java/com/ardor3d/input/lwjgl/TestKey.java
+++ b/ardor3d-lwjgl/src/test/java/com/ardor3d/input/lwjgl/TestKey.java
@@ -1,33 +1,33 @@
-/**
- * Copyright (c) 2008-2012 Ardor Labs, Inc.
- *
- * This file is part of Ardor3D.
- *
- * Ardor3D is free software: you can redistribute it and/or modify it
- * under the terms of its license which may be found in the accompanying
- * LICENSE file or at <http://www.ardor3d.com/LICENSE>.
- */
-
-package com.ardor3d.input.lwjgl;
-
-import static org.junit.Assert.assertEquals;
-
-import org.junit.Test;
-
-import com.ardor3d.input.Key;
-
-public class TestKey {
- @Test
- public void testFindByCode1() throws Exception {
- final Key a = LwjglKey.findByCode(LwjglKey.A.getLwjglCode());
-
- assertEquals("a found", Key.A, a);
- }
-
- @Test
- public void testFindByCode2() throws Exception {
- final Key unknown = LwjglKey.findByCode(-14);
-
- assertEquals("unknown found", Key.UNKNOWN, unknown);
- }
-}
+/**
+ * Copyright (c) 2008-2012 Ardor Labs, Inc.
+ *
+ * This file is part of Ardor3D.
+ *
+ * Ardor3D is free software: you can redistribute it and/or modify it
+ * under the terms of its license which may be found in the accompanying
+ * LICENSE file or at <http://www.ardor3d.com/LICENSE>.
+ */
+
+package com.ardor3d.input.lwjgl;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+import com.ardor3d.input.Key;
+
+public class TestKey {
+ @Test
+ public void testFindByCode1() throws Exception {
+ final Key a = LwjglKey.findByCode(LwjglKey.A.getLwjglCode());
+
+ assertEquals("a found", Key.A, a);
+ }
+
+ @Test
+ public void testFindByCode2() throws Exception {
+ final Key unknown = LwjglKey.findByCode(-14);
+
+ assertEquals("unknown found", Key.UNKNOWN, unknown);
+ }
+}