lol there are merge conflicts
commit
a72bb2d2cc
|
@ -80,7 +80,7 @@
|
|||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="150"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.use_on_off_tags" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.use_on_off_tags" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_method_body_on_one_line" value="one_line_if_single_item"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line" value="one_line_if_single_item"/>
|
||||
|
@ -362,366 +362,4 @@
|
|||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
|
||||
</profile>
|
||||
<profile kind="CodeFormatterProfile" name="Eclipse 2.1 Wide" version="18">
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_logical_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.align_with_spaces" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_before_code_block" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_switch_case_expressions" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_method_body" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="@formatter:on"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_logical_operator" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_annotation_declaration_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="80"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.use_on_off_tags" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_method_body_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_abstract_method" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_enum_constant_declaration_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_additive_operator" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_relational_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_anonymous_type_declaration_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_switch_case_expressions" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_shift_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_lambda_body" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_code_block" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_type_parameters" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_loops" value="52"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_relational_operator" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_additive_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.text_block_indentation" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_module_statements" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_after_code_block" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="64"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_if_then_body_block_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="48"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_between_different_tags" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression_chain" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_additive_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_conditional_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_shift_operator" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines" value="2147483647"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="80"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_code_block_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="64"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="64"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_assignment_operator" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_not_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="52"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_lambda_body_block_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_type_arguments" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_label" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_case" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_logical_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_relational_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.indent_tag_description" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_string_concatenation" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_last_class_body_declaration" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_logical_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_shift_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_statement_group_in_switch" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_shift_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_enum_declaration_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_additive_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_simple_getter_setter_on_one_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_code_block" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="tab"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_relational_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_string_concatenation" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="200"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
|
|
@ -7,18 +7,19 @@ import com.github.halotroop.litecraft.screens.*;
|
|||
import com.github.halotroop.litecraft.types.block.Blocks;
|
||||
import com.github.halotroop.litecraft.util.RelativeDirection;
|
||||
import com.github.halotroop.litecraft.world.World;
|
||||
import com.github.hydos.ginger.engine.api.*;
|
||||
import com.github.hydos.ginger.engine.api.game.*;
|
||||
import com.github.hydos.ginger.engine.cameras.*;
|
||||
import com.github.hydos.ginger.engine.elements.objects.*;
|
||||
import com.github.hydos.ginger.engine.font.FontType;
|
||||
import com.github.hydos.ginger.engine.io.Window;
|
||||
import com.github.hydos.ginger.engine.obj.ModelLoader;
|
||||
import com.github.hydos.ginger.engine.obj.shapes.StaticCube;
|
||||
import com.github.hydos.ginger.engine.render.MasterRenderer;
|
||||
import com.github.hydos.ginger.engine.render.models.TexturedModel;
|
||||
import com.github.hydos.ginger.engine.utils.Loader;
|
||||
import com.github.hydos.ginger.main.settings.Constants;
|
||||
import com.github.hydos.ginger.engine.common.Constants;
|
||||
import com.github.hydos.ginger.engine.common.api.GingerRegister;
|
||||
import com.github.hydos.ginger.engine.common.api.game.*;
|
||||
import com.github.hydos.ginger.engine.common.cameras.*;
|
||||
import com.github.hydos.ginger.engine.common.elements.objects.*;
|
||||
import com.github.hydos.ginger.engine.common.font.FontType;
|
||||
import com.github.hydos.ginger.engine.common.io.Window;
|
||||
import com.github.hydos.ginger.engine.common.obj.ModelLoader;
|
||||
import com.github.hydos.ginger.engine.common.obj.shapes.StaticCube;
|
||||
import com.github.hydos.ginger.engine.opengl.api.*;
|
||||
import com.github.hydos.ginger.engine.opengl.render.MasterRenderer;
|
||||
import com.github.hydos.ginger.engine.opengl.render.models.TexturedModel;
|
||||
import com.github.hydos.ginger.engine.opengl.utils.GlLoader;
|
||||
|
||||
import tk.valoeghese.gateways.client.io.*;
|
||||
|
||||
|
@ -27,7 +28,7 @@ public class Litecraft extends Game
|
|||
private static Litecraft INSTANCE;
|
||||
private World world;
|
||||
private LitecraftSave save;
|
||||
private Ginger engine;
|
||||
private GingerGL engine;
|
||||
public Player player;
|
||||
private Camera camera;
|
||||
public int fps, ups, tps;
|
||||
|
@ -119,8 +120,8 @@ public class Litecraft extends Game
|
|||
TexturedModel playerModel = ModelLoader.loadGenericCube("block/cubes/stone/brick/stonebrick.png");
|
||||
StaticCube.scaleCube(1f);
|
||||
Light sun = new Light(new Vector3f(0, 105, 0), new Vector3f(0.9765625f, 0.98828125f, 0.05859375f), new Vector3f(0.002f, 0.002f, 0.002f));
|
||||
FontType font = new FontType(Loader.loadFontAtlas("candara.png"), "candara.fnt");
|
||||
this.engine = new Ginger();
|
||||
FontType font = new FontType(GlLoader.loadFontAtlas("candara.png"), "candara.fnt");
|
||||
this.engine = new GingerGL();
|
||||
this.player = new Player(playerModel, new Vector3f(0, 0, -3), 0, 180f, 0, new Vector3f(0.2f, 0.2f, 0.2f));
|
||||
this.camera = new FirstPersonCamera(player);
|
||||
this.player.setVisible(false);
|
||||
|
|
|
@ -8,8 +8,8 @@ import org.joml.Vector3f;
|
|||
import com.github.halotroop.litecraft.Litecraft;
|
||||
import com.github.halotroop.litecraft.world.*;
|
||||
import com.github.halotroop.litecraft.world.dimension.Dimension;
|
||||
import com.github.hydos.ginger.engine.cameras.Camera;
|
||||
import com.github.hydos.ginger.engine.elements.objects.Player;
|
||||
import com.github.hydos.ginger.engine.common.cameras.Camera;
|
||||
import com.github.hydos.ginger.engine.common.elements.objects.Player;
|
||||
|
||||
import tk.valoeghese.sod.*;
|
||||
|
||||
|
|
|
@ -2,15 +2,15 @@ package com.github.halotroop.litecraft.screens;
|
|||
|
||||
import org.joml.*;
|
||||
|
||||
import com.github.hydos.ginger.engine.api.*;
|
||||
import com.github.hydos.ginger.engine.font.GUIText;
|
||||
import com.github.hydos.ginger.engine.io.Window;
|
||||
import com.github.hydos.ginger.engine.screen.Screen;
|
||||
import com.github.hydos.ginger.engine.common.font.GUIText;
|
||||
import com.github.hydos.ginger.engine.common.io.Window;
|
||||
import com.github.hydos.ginger.engine.common.screen.Screen;
|
||||
import com.github.hydos.ginger.engine.opengl.api.*;
|
||||
|
||||
public class ExitGameScreen extends Screen
|
||||
{
|
||||
private GUIText infoText;
|
||||
private Ginger ginger3D = Ginger.getInstance();
|
||||
private GingerGL ginger3D = GingerGL.getInstance();
|
||||
|
||||
public ExitGameScreen()
|
||||
{
|
||||
|
|
|
@ -3,15 +3,16 @@ package com.github.halotroop.litecraft.screens;
|
|||
import org.joml.*;
|
||||
|
||||
import com.github.halotroop.litecraft.Litecraft;
|
||||
import com.github.hydos.ginger.engine.api.*;
|
||||
import com.github.hydos.ginger.engine.font.GUIText;
|
||||
import com.github.hydos.ginger.engine.screen.Screen;
|
||||
import com.github.hydos.ginger.engine.common.api.GingerRegister;
|
||||
import com.github.hydos.ginger.engine.common.font.GUIText;
|
||||
import com.github.hydos.ginger.engine.common.screen.Screen;
|
||||
import com.github.hydos.ginger.engine.opengl.api.*;
|
||||
|
||||
public class IngameHUD extends Screen
|
||||
{
|
||||
private GUIText debugText;
|
||||
private GUIText positionText;
|
||||
private Ginger ginger3D = Ginger.getInstance();
|
||||
private GingerGL ginger3D = GingerGL.getInstance();
|
||||
private Litecraft litecraft = Litecraft.getInstance();
|
||||
|
||||
public IngameHUD()
|
||||
|
|
|
@ -7,12 +7,12 @@ import org.joml.*;
|
|||
import com.github.halotroop.litecraft.Litecraft;
|
||||
import com.github.halotroop.litecraft.save.LitecraftSave;
|
||||
import com.github.halotroop.litecraft.world.dimension.Dimensions;
|
||||
import com.github.hydos.ginger.engine.api.Ginger;
|
||||
import com.github.hydos.ginger.engine.elements.GuiTexture;
|
||||
import com.github.hydos.ginger.engine.elements.buttons.TextureButton;
|
||||
import com.github.hydos.ginger.engine.font.GUIText;
|
||||
import com.github.hydos.ginger.engine.io.Window;
|
||||
import com.github.hydos.ginger.engine.screen.Screen;
|
||||
import com.github.hydos.ginger.engine.common.elements.GuiTexture;
|
||||
import com.github.hydos.ginger.engine.common.elements.buttons.TextureButton;
|
||||
import com.github.hydos.ginger.engine.common.font.GUIText;
|
||||
import com.github.hydos.ginger.engine.common.io.Window;
|
||||
import com.github.hydos.ginger.engine.common.screen.Screen;
|
||||
import com.github.hydos.ginger.engine.opengl.api.GingerGL;
|
||||
|
||||
/**
|
||||
* YeS
|
||||
|
@ -20,7 +20,7 @@ import com.github.hydos.ginger.engine.screen.Screen;
|
|||
public class TitleScreen extends Screen
|
||||
{
|
||||
private GUIText debugText;
|
||||
private Ginger ginger3D = Ginger.getInstance();
|
||||
private GingerGL ginger3D = GingerGL.getInstance();
|
||||
private TextureButton playButton;
|
||||
private Litecraft litecraft = Litecraft.getInstance();
|
||||
|
||||
|
|
|
@ -2,8 +2,8 @@ package com.github.halotroop.litecraft.types.block;
|
|||
|
||||
import java.util.*;
|
||||
|
||||
import com.github.hydos.ginger.engine.obj.ModelLoader;
|
||||
import com.github.hydos.ginger.engine.render.models.TexturedModel;
|
||||
import com.github.hydos.ginger.engine.common.obj.ModelLoader;
|
||||
import com.github.hydos.ginger.engine.opengl.render.models.TexturedModel;
|
||||
|
||||
public class Block
|
||||
{
|
||||
|
@ -13,7 +13,7 @@ public class Block
|
|||
private boolean fullCube = true;
|
||||
private float caveCarveThreshold = -1f; // cannot carve
|
||||
private final String identifier;
|
||||
|
||||
|
||||
public Properties(String identifier)
|
||||
{ this.identifier = identifier; }
|
||||
|
||||
|
@ -36,10 +36,11 @@ public class Block
|
|||
}
|
||||
}
|
||||
|
||||
public final TexturedModel model;
|
||||
public TexturedModel model;
|
||||
private final boolean visible, fullCube;
|
||||
private final float caveCarveThreshold;
|
||||
public final String identifier;
|
||||
public String texture;
|
||||
|
||||
public boolean isFullCube()
|
||||
{ return this.fullCube; }
|
||||
|
@ -54,7 +55,10 @@ public class Block
|
|||
{ this((TexturedModel) null, properties); }
|
||||
|
||||
protected Block(String texture, Properties properties)
|
||||
{ this(ModelLoader.loadGenericCube(texture), properties); }
|
||||
{
|
||||
this(ModelLoader.loadGenericCube("block/"+texture), properties);
|
||||
this.texture = texture;
|
||||
}
|
||||
|
||||
protected Block(TexturedModel model, Properties properties)
|
||||
{
|
||||
|
@ -63,9 +67,20 @@ public class Block
|
|||
this.fullCube = properties.fullCube;
|
||||
this.identifier = properties.identifier;
|
||||
this.caveCarveThreshold = properties.caveCarveThreshold;
|
||||
if(model != null) {
|
||||
this.texture = model.getTexture().getTexture().getLocation();
|
||||
}else {
|
||||
this.texture = "DONTLOAD";
|
||||
}
|
||||
IDENTIFIER_TO_BLOCK.put(this.identifier, this);
|
||||
Blocks.blocks.add(this);
|
||||
}
|
||||
|
||||
|
||||
public void updateBlockModelData() {
|
||||
System.out.println("Updating block with texture at block/"+texture);
|
||||
this.model = ModelLoader.loadGenericCube("block/"+texture);
|
||||
}
|
||||
|
||||
public static final Block getBlock(String identifier)
|
||||
{ return IDENTIFIER_TO_BLOCK.get(identifier); }
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.github.halotroop.litecraft.types.block;
|
|||
import org.joml.Vector3f;
|
||||
|
||||
import com.github.halotroop.litecraft.world.Chunk;
|
||||
import com.github.hydos.ginger.engine.elements.objects.RenderObject;
|
||||
import com.github.hydos.ginger.engine.common.elements.objects.RenderObject;
|
||||
|
||||
public class BlockInstance extends RenderObject
|
||||
{
|
||||
|
|
|
@ -1,16 +1,21 @@
|
|||
package com.github.halotroop.litecraft.types.block;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.github.halotroop.litecraft.types.block.Block.Properties;
|
||||
|
||||
public final class Blocks
|
||||
{
|
||||
|
||||
public static ArrayList<Block> blocks = new ArrayList<Block>();
|
||||
|
||||
public static final Block AIR = new Block(new Properties("air").visible(false).fullCube(false));
|
||||
public static final Block GRASS = new Block(new Properties("block/cubes/soil/grass/grass_top.png").caveCarveThreshold(0.04f));
|
||||
public static final Block DIRT = new Block("block/cubes/soil/dirt.png", new Properties("dirt").caveCarveThreshold(0.04f));
|
||||
public static final Block ANDESITE = new Block("block/cubes/stone/basic/andesite.png", new Properties("andesite").caveCarveThreshold(0.08f));
|
||||
public static final Block DIORITE = new Block("block/cubes/stone/basic/diorite.png", new Properties("diorite").caveCarveThreshold(0.05f));
|
||||
public static final Block GRANITE = new Block("block/cubes/stone/basic/granite.png", new Properties("granite").caveCarveThreshold(0.06f));
|
||||
public static final Block GNEISS = new Block("block/cubes/stone/basic/gneiss.png", new Properties("gneiss").caveCarveThreshold(0.09f));
|
||||
public static final Block GRASS = new Block(new Properties("cubes/soil/grass/grass_top.png").caveCarveThreshold(0.04f));
|
||||
public static final Block DIRT = new Block("cubes/soil/dirt.png", new Properties("dirt").caveCarveThreshold(0.04f));
|
||||
public static final Block ANDESITE = new Block("cubes/stone/basic/andesite.png", new Properties("andesite").caveCarveThreshold(0.08f));
|
||||
public static final Block DIORITE = new Block("cubes/stone/basic/diorite.png", new Properties("diorite").caveCarveThreshold(0.05f));
|
||||
public static final Block GRANITE = new Block("cubes/stone/basic/granite.png", new Properties("granite").caveCarveThreshold(0.06f));
|
||||
public static final Block GNEISS = new Block("cubes/stone/basic/gneiss.png", new Properties("gneiss").caveCarveThreshold(0.09f));
|
||||
|
||||
public static Block init()
|
||||
{
|
||||
|
|
|
@ -2,8 +2,8 @@ package com.github.halotroop.litecraft.types.entity;
|
|||
|
||||
import org.joml.Vector3f;
|
||||
|
||||
import com.github.hydos.ginger.engine.elements.objects.RenderObject;
|
||||
import com.github.hydos.ginger.engine.render.models.TexturedModel;
|
||||
import com.github.hydos.ginger.engine.common.elements.objects.RenderObject;
|
||||
import com.github.hydos.ginger.engine.opengl.render.models.TexturedModel;
|
||||
|
||||
public abstract class Entity extends RenderObject
|
||||
{
|
||||
|
|
|
@ -35,11 +35,14 @@ public class Chunk implements BlockAccess, WorldGenConstants, SODSerializable
|
|||
private boolean fullyGenerated = false;
|
||||
public final int dimension;
|
||||
private boolean dirty = true;
|
||||
<<<<<<< HEAD
|
||||
private World world;
|
||||
/**
|
||||
* A holder for the rendered blocks in this chunk. This array is *NOT* safe to use for getting BIs at a position!
|
||||
* It can vary in size from 0 to 512 elements long and must only be read linearly.
|
||||
*/
|
||||
=======
|
||||
>>>>>>> liteCraft
|
||||
private BlockInstance[] renderedBlocks = new BlockInstance[CHUNK_SIZE * CHUNK_SIZE * CHUNK_SIZE];
|
||||
|
||||
public Chunk(World world, int chunkX, int chunkY, int chunkZ, int dimension)
|
||||
|
@ -51,7 +54,6 @@ public class Chunk implements BlockAccess, WorldGenConstants, SODSerializable
|
|||
this.chunkStartY = chunkY << POS_SHIFT;
|
||||
this.chunkStartZ = chunkZ << POS_SHIFT;
|
||||
this.dimension = dimension;
|
||||
this.world = world;
|
||||
}
|
||||
|
||||
public boolean doRender()
|
||||
|
|
|
@ -16,9 +16,9 @@ import com.github.halotroop.litecraft.world.block.BlockRenderer;
|
|||
import com.github.halotroop.litecraft.world.dimension.Dimension;
|
||||
import com.github.halotroop.litecraft.world.gen.*;
|
||||
import com.github.halotroop.litecraft.world.gen.modifier.WorldModifier;
|
||||
import com.github.hydos.ginger.engine.elements.objects.Player;
|
||||
import com.github.hydos.ginger.engine.obj.ModelLoader;
|
||||
import com.github.hydos.ginger.engine.render.models.TexturedModel;
|
||||
import com.github.hydos.ginger.engine.common.elements.objects.Player;
|
||||
import com.github.hydos.ginger.engine.common.obj.ModelLoader;
|
||||
import com.github.hydos.ginger.engine.opengl.render.models.TexturedModel;
|
||||
|
||||
import it.unimi.dsi.fastutil.longs.*;
|
||||
|
||||
|
|
|
@ -6,18 +6,24 @@ import org.lwjgl.opengl.*;
|
|||
import com.github.halotroop.litecraft.types.block.BlockInstance;
|
||||
import com.github.halotroop.litecraft.world.Chunk;
|
||||
import com.github.halotroop.litecraft.world.gen.WorldGenConstants;
|
||||
import com.github.hydos.ginger.engine.api.GingerRegister;
|
||||
import com.github.hydos.ginger.engine.elements.objects.RenderObject;
|
||||
import com.github.hydos.ginger.engine.io.Window;
|
||||
import com.github.hydos.ginger.engine.math.Maths;
|
||||
import com.github.hydos.ginger.engine.render.Renderer;
|
||||
import com.github.hydos.ginger.engine.render.models.TexturedModel;
|
||||
import com.github.hydos.ginger.engine.render.shaders.StaticShader;
|
||||
import com.github.hydos.ginger.engine.common.api.GingerRegister;
|
||||
import com.github.hydos.ginger.engine.common.elements.objects.RenderObject;
|
||||
import com.github.hydos.ginger.engine.common.io.Window;
|
||||
import com.github.hydos.ginger.engine.common.math.Maths;
|
||||
import com.github.hydos.ginger.engine.opengl.render.Renderer;
|
||||
import com.github.hydos.ginger.engine.opengl.render.models.TexturedModel;
|
||||
import com.github.hydos.ginger.engine.opengl.render.shaders.StaticShader;
|
||||
import com.github.hydos.ginger.engine.opengl.utils.GlLoader;
|
||||
|
||||
public class BlockRenderer extends Renderer implements WorldGenConstants
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
|
||||
public StaticShader shader;
|
||||
=======
|
||||
private StaticShader shader;
|
||||
public int atlasID;
|
||||
>>>>>>> liteCraft
|
||||
|
||||
public BlockRenderer(StaticShader shader, Matrix4f projectionMatrix)
|
||||
{
|
||||
|
@ -25,11 +31,13 @@ public class BlockRenderer extends Renderer implements WorldGenConstants
|
|||
shader.start();
|
||||
shader.loadProjectionMatrix(projectionMatrix);
|
||||
shader.stop();
|
||||
this.atlasID = GlLoader.createBlockAtlas();
|
||||
}
|
||||
|
||||
private void prepBlockInstance(RenderObject entity)
|
||||
{
|
||||
Matrix4f transformationMatrix = Maths.createTransformationMatrix(entity.getPosition(), entity.getRotX(), entity.getRotY(), entity.getRotZ(), entity.getScale());
|
||||
Matrix4f transformationMatrix = Maths.createTransformationMatrix(entity.getPosition(), entity.getRotX(),
|
||||
entity.getRotY(), entity.getRotZ(), entity.getScale());
|
||||
shader.loadTransformationMatrix(transformationMatrix);
|
||||
}
|
||||
|
||||
|
@ -48,30 +56,35 @@ public class BlockRenderer extends Renderer implements WorldGenConstants
|
|||
GL20.glDisableVertexAttribArray(2);
|
||||
GL30.glBindVertexArray(0);
|
||||
}
|
||||
|
||||
public void enableWireframe() {
|
||||
if (GingerRegister.getInstance().wireframe)
|
||||
GL11.glPolygonMode(GL11.GL_FRONT_AND_BACK, GL11.GL_LINE);
|
||||
}
|
||||
|
||||
public void disableWireframe() {
|
||||
if (GingerRegister.getInstance().wireframe)
|
||||
GL11.glPolygonMode(GL11.GL_FRONT_AND_BACK, GL11.GL_FILL);
|
||||
}
|
||||
|
||||
public void prepareRender() {
|
||||
//TODO: combine VBOS
|
||||
|
||||
public void enableWireframe()
|
||||
{ if (GingerRegister.getInstance().wireframe)
|
||||
GL11.glPolygonMode(GL11.GL_FRONT_AND_BACK, GL11.GL_LINE); }
|
||||
|
||||
public void disableWireframe()
|
||||
{ if (GingerRegister.getInstance().wireframe)
|
||||
GL11.glPolygonMode(GL11.GL_FRONT_AND_BACK, GL11.GL_FILL); }
|
||||
|
||||
public void prepareRender()
|
||||
{
|
||||
// TODO: combine VBOS
|
||||
shader.start();
|
||||
shader.loadSkyColour(Window.getColour());
|
||||
shader.loadViewMatrix(GingerRegister.getInstance().game.data.camera);
|
||||
shader.loadFakeLightingVariable(true);
|
||||
shader.loadShine(1, 1);
|
||||
GL13.glActiveTexture(GL13.GL_TEXTURE0);
|
||||
<<<<<<< HEAD
|
||||
// enableWireframe();
|
||||
=======
|
||||
GL11.glBindTexture(GL11.GL_TEXTURE_2D, atlasID);
|
||||
enableWireframe();
|
||||
>>>>>>> liteCraft
|
||||
}
|
||||
|
||||
public void render(BlockInstance[] renderList)
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
// prepareRender();
|
||||
|
||||
for (BlockInstance entity : renderList) {
|
||||
|
@ -86,5 +99,24 @@ public class BlockRenderer extends Renderer implements WorldGenConstants
|
|||
// disableWireframe();
|
||||
// shader.stop();
|
||||
|
||||
=======
|
||||
prepareRender();
|
||||
for (int x = 0; x < CHUNK_SIZE; x++)
|
||||
for (int y = 0; y < CHUNK_SIZE; y++)
|
||||
for (int z = 0; z < CHUNK_SIZE; z++)
|
||||
{
|
||||
BlockInstance entity = renderList[Chunk.index(x, y, z)];
|
||||
if (entity != null && entity.getModel() != null)
|
||||
{
|
||||
TexturedModel blockModel = entity.getModel();
|
||||
GL11.glBindTexture(GL11.GL_TEXTURE_2D, blockModel.getTexture().getTextureID());
|
||||
prepBlockInstance(entity);
|
||||
GL11.glDrawElements(GL11.GL_TRIANGLES, blockModel.getRawModel().getVertexCount(),
|
||||
GL11.GL_UNSIGNED_INT, 0);
|
||||
}
|
||||
}
|
||||
disableWireframe();
|
||||
shader.stop();
|
||||
>>>>>>> liteCraft
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package com.github.hydos.ginger.main.settings;
|
||||
package com.github.hydos.ginger.engine.common;
|
||||
|
||||
import org.joml.Vector3f;
|
||||
|
|
@ -1,13 +1,23 @@
|
|||
package com.github.hydos.ginger.engine.api;
|
||||
package com.github.hydos.ginger.engine.common.api;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
<<<<<<< HEAD:src/main/java/com/github/hydos/ginger/engine/api/GingerRegister.java
|
||||
import com.github.hydos.ginger.engine.api.game.Game;
|
||||
import com.github.hydos.ginger.engine.elements.buttons.TextureButton;
|
||||
import com.github.hydos.ginger.engine.font.GUIText;
|
||||
import com.github.hydos.ginger.engine.postprocessing.Fbo;
|
||||
import com.github.hydos.ginger.engine.render.MasterRenderer;
|
||||
import com.github.hydos.ginger.engine.screen.Screen;
|
||||
=======
|
||||
import com.github.hydos.ginger.engine.common.api.game.Game;
|
||||
import com.github.hydos.ginger.engine.common.elements.buttons.TextureButton;
|
||||
import com.github.hydos.ginger.engine.common.font.GUIText;
|
||||
import com.github.hydos.ginger.engine.common.screen.Screen;
|
||||
import com.github.hydos.ginger.engine.opengl.postprocessing.Fbo;
|
||||
import com.github.hydos.ginger.engine.opengl.render.MasterRenderer;
|
||||
import com.github.hydos.multithreading.GingerThreading;
|
||||
>>>>>>> liteCraft:src/main/java/com/github/hydos/ginger/engine/common/api/GingerRegister.java
|
||||
|
||||
/** Used if a game wants to access engine variables safely */
|
||||
public class GingerRegister
|
|
@ -1,4 +1,4 @@
|
|||
package com.github.hydos.ginger.engine.api.game;
|
||||
package com.github.hydos.ginger.engine.common.api.game;
|
||||
|
||||
public abstract class Game
|
||||
{
|
|
@ -1,12 +1,12 @@
|
|||
package com.github.hydos.ginger.engine.api.game;
|
||||
package com.github.hydos.ginger.engine.common.api.game;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import org.joml.Vector4f;
|
||||
|
||||
import com.github.hydos.ginger.engine.cameras.Camera;
|
||||
import com.github.hydos.ginger.engine.elements.GuiTexture;
|
||||
import com.github.hydos.ginger.engine.elements.objects.*;
|
||||
import com.github.hydos.ginger.engine.common.cameras.Camera;
|
||||
import com.github.hydos.ginger.engine.common.elements.GuiTexture;
|
||||
import com.github.hydos.ginger.engine.common.elements.objects.*;
|
||||
|
||||
/**
|
||||
* Used for storing essential engine game data so main class isn't messy
|
|
@ -1,10 +1,10 @@
|
|||
package com.github.hydos.ginger.engine.cameras;
|
||||
package com.github.hydos.ginger.engine.common.cameras;
|
||||
|
||||
import org.joml.Vector3f;
|
||||
import org.lwjgl.glfw.*;
|
||||
|
||||
import com.github.hydos.ginger.engine.elements.objects.Player;
|
||||
import com.github.hydos.ginger.engine.io.Window;
|
||||
import com.github.hydos.ginger.engine.common.elements.objects.Player;
|
||||
import com.github.hydos.ginger.engine.common.io.Window;
|
||||
|
||||
public class Camera
|
||||
{
|
|
@ -1,9 +1,9 @@
|
|||
package com.github.hydos.ginger.engine.cameras;
|
||||
package com.github.hydos.ginger.engine.common.cameras;
|
||||
|
||||
import org.joml.Vector3f;
|
||||
|
||||
import com.github.hydos.ginger.engine.elements.objects.Player;
|
||||
import com.github.hydos.ginger.engine.io.Window;
|
||||
import com.github.hydos.ginger.engine.common.elements.objects.Player;
|
||||
import com.github.hydos.ginger.engine.common.io.Window;
|
||||
|
||||
public class FirstPersonCamera extends Camera
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
package com.github.hydos.ginger.engine.elements;
|
||||
package com.github.hydos.ginger.engine.common.elements;
|
||||
|
||||
import org.joml.Vector2f;
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
package com.github.hydos.ginger.engine.elements.buttons;
|
||||
package com.github.hydos.ginger.engine.common.elements.buttons;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.joml.Vector2f;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
|
||||
import com.github.hydos.ginger.engine.elements.GuiTexture;
|
||||
import com.github.hydos.ginger.engine.io.Window;
|
||||
import com.github.hydos.ginger.engine.utils.Loader;
|
||||
import com.github.hydos.ginger.engine.common.elements.GuiTexture;
|
||||
import com.github.hydos.ginger.engine.common.io.Window;
|
||||
import com.github.hydos.ginger.engine.opengl.utils.GlLoader;
|
||||
|
||||
public class TextureButton
|
||||
{
|
||||
|
@ -20,7 +20,7 @@ public class TextureButton
|
|||
public TextureButton(String texture, Vector2f position, Vector2f scale)
|
||||
{
|
||||
resourceLocation = texture;
|
||||
guiTexture = new GuiTexture(Loader.loadTextureDirectly(texture), position, scale);
|
||||
guiTexture = new GuiTexture(GlLoader.loadTextureDirectly(texture), position, scale);
|
||||
}
|
||||
|
||||
public void hide(List<GuiTexture> guiTextureList)
|
|
@ -1,4 +1,4 @@
|
|||
package com.github.hydos.ginger.engine.elements.objects;
|
||||
package com.github.hydos.ginger.engine.common.elements.objects;
|
||||
|
||||
import org.joml.Vector3f;
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
package com.github.hydos.ginger.engine.elements.objects;
|
||||
package com.github.hydos.ginger.engine.common.elements.objects;
|
||||
|
||||
import org.joml.Vector3f;
|
||||
|
||||
import com.github.halotroop.litecraft.Litecraft;
|
||||
import com.github.halotroop.litecraft.util.RelativeDirection;
|
||||
import com.github.halotroop.litecraft.world.gen.WorldGenConstants;
|
||||
import com.github.hydos.ginger.engine.api.GingerRegister;
|
||||
import com.github.hydos.ginger.engine.io.Window;
|
||||
import com.github.hydos.ginger.engine.render.models.TexturedModel;
|
||||
import com.github.hydos.ginger.main.settings.Constants;
|
||||
import com.github.hydos.ginger.engine.common.Constants;
|
||||
import com.github.hydos.ginger.engine.common.api.GingerRegister;
|
||||
import com.github.hydos.ginger.engine.common.io.Window;
|
||||
import com.github.hydos.ginger.engine.opengl.render.models.TexturedModel;
|
||||
|
||||
public class Player extends RenderObject implements WorldGenConstants
|
||||
{
|
|
@ -1,8 +1,8 @@
|
|||
package com.github.hydos.ginger.engine.elements.objects;
|
||||
package com.github.hydos.ginger.engine.common.elements.objects;
|
||||
|
||||
import org.joml.Vector3f;
|
||||
|
||||
import com.github.hydos.ginger.engine.render.models.TexturedModel;
|
||||
import com.github.hydos.ginger.engine.opengl.render.models.TexturedModel;
|
||||
|
||||
public class RenderObject
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
package com.github.hydos.ginger.engine.fbo;
|
||||
package com.github.hydos.ginger.engine.common.fbo;
|
||||
|
||||
public abstract class FboCallbackHandler
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
package com.github.hydos.ginger.engine.font;
|
||||
package com.github.hydos.ginger.engine.common.font;
|
||||
|
||||
/** Simple data structure class holding information about a certain glyph in the
|
||||
* font texture atlas. All sizes are for a font-size of 1. */
|
|
@ -1,4 +1,4 @@
|
|||
package com.github.hydos.ginger.engine.font;
|
||||
package com.github.hydos.ginger.engine.common.font;
|
||||
|
||||
/** Represents a font. It holds the font's texture atlas as well as having the
|
||||
* ability to create the quad vertices for any text using this font. */
|
|
@ -1,4 +1,4 @@
|
|||
package com.github.hydos.ginger.engine.font;
|
||||
package com.github.hydos.ginger.engine.common.font;
|
||||
|
||||
import org.joml.*;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.github.hydos.ginger.engine.font;
|
||||
package com.github.hydos.ginger.engine.common.font;
|
||||
|
||||
import java.util.*;
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
package com.github.hydos.ginger.engine.font;
|
||||
package com.github.hydos.ginger.engine.common.font;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import com.github.hydos.ginger.engine.io.Window;
|
||||
import com.github.hydos.ginger.engine.common.io.Window;
|
||||
|
||||
/** Provides functionality for getting the values from a font file. */
|
||||
public class MetaFile
|
|
@ -1,10 +1,10 @@
|
|||
package com.github.hydos.ginger.engine.font;
|
||||
package com.github.hydos.ginger.engine.common.font;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.github.hydos.ginger.engine.api.Ginger;
|
||||
import com.github.hydos.ginger.engine.render.renderers.FontRenderer;
|
||||
import com.github.hydos.ginger.engine.utils.Loader;
|
||||
import com.github.hydos.ginger.engine.opengl.api.GingerGL;
|
||||
import com.github.hydos.ginger.engine.opengl.render.renderers.FontRenderer;
|
||||
import com.github.hydos.ginger.engine.opengl.utils.GlLoader;
|
||||
|
||||
public class TextMaster
|
||||
{
|
||||
|
@ -21,7 +21,7 @@ public class TextMaster
|
|||
{
|
||||
FontType font = text.getFont();
|
||||
TextMeshData data = font.loadText(text);
|
||||
int vao = Loader.loadToVAO(data.getVertexPositions(), data.getTextureCoords());
|
||||
int vao = GlLoader.loadToVAO(data.getVertexPositions(), data.getTextureCoords());
|
||||
text.setMeshInfo(vao, data.getVertexCount());
|
||||
List<GUIText> textBatch = texts.get(font);
|
||||
if (textBatch == null)
|
||||
|
@ -46,10 +46,10 @@ public class TextMaster
|
|||
public static void render(GUIText buildText)
|
||||
{
|
||||
Map<FontType, List<GUIText>> oldTexts = texts;
|
||||
List<GUIText> oldFontText = texts.get(Ginger.getInstance().globalFont);
|
||||
List<GUIText> oldFontText = texts.get(GingerGL.getInstance().globalFont);
|
||||
oldFontText.add(buildText);
|
||||
texts.clear();
|
||||
texts.put(Ginger.getInstance().globalFont, oldFontText);
|
||||
texts.put(GingerGL.getInstance().globalFont, oldFontText);
|
||||
texts = oldTexts;
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.github.hydos.ginger.engine.font;
|
||||
package com.github.hydos.ginger.engine.common.font;
|
||||
|
||||
import java.util.*;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.github.hydos.ginger.engine.font;
|
||||
package com.github.hydos.ginger.engine.common.font;
|
||||
|
||||
/** Stores the vertex data for all the quads on which a text will be rendered. */
|
||||
public class TextMeshData
|
|
@ -1,4 +1,4 @@
|
|||
package com.github.hydos.ginger.engine.font;
|
||||
package com.github.hydos.ginger.engine.common.font;
|
||||
|
||||
import java.util.*;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.github.hydos.ginger.engine.io;
|
||||
package com.github.hydos.ginger.engine.common.io;
|
||||
|
||||
import java.nio.*;
|
||||
|
||||
|
@ -7,8 +7,8 @@ import org.lwjgl.BufferUtils;
|
|||
import org.lwjgl.glfw.*;
|
||||
import org.lwjgl.opengl.*;
|
||||
|
||||
import com.github.hydos.ginger.engine.api.Ginger;
|
||||
import com.github.hydos.ginger.engine.render.texture.Image;
|
||||
import com.github.hydos.ginger.engine.opengl.api.GingerGL;
|
||||
import com.github.hydos.ginger.engine.opengl.render.texture.Image;
|
||||
|
||||
public class Window
|
||||
{
|
||||
|
@ -189,7 +189,7 @@ public class Window
|
|||
// Hack to make the FBO update when the screen size is changed
|
||||
if ((oldWindowHeight != Window.getHeight() || oldWindowWidth != Window.getWidth()) && Window.getHeight() > 10 && Window.getWidth() > 10)
|
||||
{
|
||||
Ginger.getInstance().contrastFbo.resizeFBOs();
|
||||
GingerGL.getInstance().contrastFbo.resizeFBOs();
|
||||
oldWindowWidth = Window.getWidth();
|
||||
oldWindowHeight = Window.getHeight();
|
||||
}
|
|
@ -1,10 +1,10 @@
|
|||
package com.github.hydos.ginger.engine.math;
|
||||
package com.github.hydos.ginger.engine.common.math;
|
||||
|
||||
import java.lang.Math;
|
||||
|
||||
import org.joml.*;
|
||||
|
||||
import com.github.hydos.ginger.engine.cameras.Camera;
|
||||
import com.github.hydos.ginger.engine.common.cameras.Camera;
|
||||
|
||||
public class Maths
|
||||
{
|
|
@ -0,0 +1,5 @@
|
|||
package com.github.hydos.ginger.engine.common.obj;
|
||||
|
||||
public class Material
|
||||
{
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.github.hydos.ginger.engine.obj;
|
||||
package com.github.hydos.ginger.engine.common.obj;
|
||||
|
||||
public class Mesh
|
||||
{
|
|
@ -0,0 +1,22 @@
|
|||
package com.github.hydos.ginger.engine.common.obj;
|
||||
|
||||
import com.github.hydos.ginger.engine.common.obj.shapes.StaticCube;
|
||||
import com.github.hydos.ginger.engine.opengl.render.models.TexturedModel;
|
||||
import com.github.hydos.ginger.engine.opengl.render.texture.ModelTexture;
|
||||
import com.github.hydos.ginger.engine.opengl.utils.GlLoader;
|
||||
|
||||
public class ModelLoader
|
||||
{
|
||||
public static TexturedModel loadGenericCube(String cubeTexture)
|
||||
{
|
||||
Mesh data = StaticCube.getCube();
|
||||
TexturedModel tm = new TexturedModel(GlLoader.loadToVAO(data.getVertices(), data.getIndices(), data.getNormals(), data.getTextureCoords()), new ModelTexture(cubeTexture));
|
||||
return tm;
|
||||
}
|
||||
|
||||
public static TexturedModel loadModel(String objPath, String texturePath)
|
||||
{
|
||||
Mesh data = OBJFileLoader.loadModel(objPath);
|
||||
return new TexturedModel(GlLoader.loadToVAO(data.getVertices(), data.getIndices(), data.getNormals(), data.getTextureCoords()), new ModelTexture(texturePath));
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.github.hydos.ginger.engine.obj;
|
||||
package com.github.hydos.ginger.engine.common.obj;
|
||||
|
||||
import org.joml.*;
|
||||
import org.lwjgl.assimp.*;
|
|
@ -1,4 +1,4 @@
|
|||
package com.github.hydos.ginger.engine.obj;
|
||||
package com.github.hydos.ginger.engine.common.obj;
|
||||
|
||||
import org.joml.*;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.github.hydos.ginger.engine.obj.normals;
|
||||
package com.github.hydos.ginger.engine.common.obj.normals;
|
||||
|
||||
public class ModelDataNM
|
||||
{
|
|
@ -1,12 +1,12 @@
|
|||
package com.github.hydos.ginger.engine.obj.normals;
|
||||
package com.github.hydos.ginger.engine.common.obj.normals;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import org.joml.*;
|
||||
|
||||
import com.github.hydos.ginger.engine.render.models.RawModel;
|
||||
import com.github.hydos.ginger.engine.utils.Loader;
|
||||
import com.github.hydos.ginger.engine.opengl.render.models.RawModel;
|
||||
import com.github.hydos.ginger.engine.opengl.utils.GlLoader;
|
||||
|
||||
public class NormalMappedObjLoader
|
||||
{
|
||||
|
@ -166,7 +166,7 @@ public class NormalMappedObjLoader
|
|||
float furthest = convertDataToArrays(vertices, textures, normals, verticesArray,
|
||||
texturesArray, normalsArray, tangentsArray);
|
||||
int[] indicesArray = convertIndicesListToArray(indices);
|
||||
return Loader.loadToVAO(verticesArray, indicesArray, normalsArray, tangentsArray, texturesArray);
|
||||
return GlLoader.loadToVAO(verticesArray, indicesArray, normalsArray, tangentsArray, texturesArray);
|
||||
}
|
||||
|
||||
private static VertexNM processVertex(String[] vertex, List<VertexNM> vertices,
|
|
@ -1,4 +1,4 @@
|
|||
package com.github.hydos.ginger.engine.obj.normals;
|
||||
package com.github.hydos.ginger.engine.common.obj.normals;
|
||||
|
||||
import java.util.*;
|
||||
|
|
@ -0,0 +1 @@
|
|||
package com.github.hydos.ginger.engine.common.obj.shapes;
|
|
@ -1,6 +1,6 @@
|
|||
package com.github.hydos.ginger.engine.obj.shapes;
|
||||
package com.github.hydos.ginger.engine.common.obj.shapes;
|
||||
|
||||
import com.github.hydos.ginger.engine.obj.Mesh;
|
||||
import com.github.hydos.ginger.engine.common.obj.Mesh;
|
||||
|
||||
public class StaticCube
|
||||
{
|
|
@ -1,8 +1,8 @@
|
|||
package com.github.hydos.ginger.engine.screen;
|
||||
package com.github.hydos.ginger.engine.common.screen;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.github.hydos.ginger.engine.elements.GuiTexture;
|
||||
import com.github.hydos.ginger.engine.common.elements.GuiTexture;
|
||||
|
||||
public abstract class Screen
|
||||
{
|
|
@ -1,5 +0,0 @@
|
|||
package com.github.hydos.ginger.engine.obj;
|
||||
|
||||
public class Material
|
||||
{
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
package com.github.hydos.ginger.engine.obj;
|
||||
|
||||
import com.github.hydos.ginger.engine.obj.shapes.StaticCube;
|
||||
import com.github.hydos.ginger.engine.render.models.TexturedModel;
|
||||
import com.github.hydos.ginger.engine.render.texture.ModelTexture;
|
||||
import com.github.hydos.ginger.engine.utils.Loader;
|
||||
|
||||
public class ModelLoader
|
||||
{
|
||||
public static TexturedModel loadGenericCube(String cubeTexture)
|
||||
{
|
||||
Mesh data = StaticCube.getCube();
|
||||
TexturedModel tm = new TexturedModel(Loader.loadToVAO(data.getVertices(), data.getIndices(), data.getNormals(), data.getTextureCoords()), new ModelTexture(cubeTexture));
|
||||
return tm;
|
||||
}
|
||||
|
||||
public static TexturedModel loadModel(String objPath, String texturePath)
|
||||
{
|
||||
Mesh data = OBJFileLoader.loadModel(objPath);
|
||||
return new TexturedModel(Loader.loadToVAO(data.getVertices(), data.getIndices(), data.getNormals(), data.getTextureCoords()), new ModelTexture(texturePath));
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
package com.github.hydos.ginger.engine.obj.shapes;
|
|
@ -1,10 +1,11 @@
|
|||
package com.github.hydos.ginger.engine.api;
|
||||
package com.github.hydos.ginger.engine.opengl.api;
|
||||
|
||||
import org.joml.Vector2f;
|
||||
|
||||
import com.github.halotroop.litecraft.Litecraft;
|
||||
import com.github.halotroop.litecraft.logic.Timer;
|
||||
import com.github.halotroop.litecraft.logic.Timer.TickListener;
|
||||
<<<<<<< HEAD:src/main/java/com/github/hydos/ginger/engine/api/Ginger.java
|
||||
import com.github.hydos.ginger.engine.api.game.*;
|
||||
import com.github.hydos.ginger.engine.elements.buttons.TextureButton;
|
||||
import com.github.hydos.ginger.engine.elements.objects.Player;
|
||||
|
@ -16,10 +17,24 @@ import com.github.hydos.ginger.engine.render.MasterRenderer;
|
|||
import com.github.hydos.ginger.engine.render.tools.MousePicker;
|
||||
import com.github.hydos.ginger.engine.screen.Screen;
|
||||
import com.github.hydos.ginger.engine.utils.Loader;
|
||||
=======
|
||||
import com.github.hydos.ginger.engine.common.api.GingerRegister;
|
||||
import com.github.hydos.ginger.engine.common.api.game.*;
|
||||
import com.github.hydos.ginger.engine.common.elements.buttons.TextureButton;
|
||||
import com.github.hydos.ginger.engine.common.elements.objects.Player;
|
||||
import com.github.hydos.ginger.engine.common.font.*;
|
||||
import com.github.hydos.ginger.engine.common.io.Window;
|
||||
import com.github.hydos.ginger.engine.common.screen.Screen;
|
||||
import com.github.hydos.ginger.engine.opengl.postprocessing.*;
|
||||
import com.github.hydos.ginger.engine.opengl.render.MasterRenderer;
|
||||
import com.github.hydos.ginger.engine.opengl.render.tools.MousePicker;
|
||||
import com.github.hydos.ginger.engine.opengl.utils.GlLoader;
|
||||
import com.github.hydos.multithreading.GingerThreading;
|
||||
>>>>>>> liteCraft:src/main/java/com/github/hydos/ginger/engine/opengl/api/GingerGL.java
|
||||
|
||||
public class Ginger
|
||||
public class GingerGL
|
||||
{
|
||||
private static Ginger INSTANCE;
|
||||
private static GingerGL INSTANCE;
|
||||
private GingerRegister registry;
|
||||
public MousePicker picker;
|
||||
public FontType globalFont;
|
||||
|
@ -40,10 +55,9 @@ public class Ginger
|
|||
{
|
||||
Window.stop();
|
||||
PostProcessing.cleanUp();
|
||||
ParticleMaster.cleanUp();
|
||||
registry.masterRenderer.cleanUp();
|
||||
TextMaster.cleanUp();
|
||||
Loader.cleanUp();
|
||||
GlLoader.cleanUp();
|
||||
}
|
||||
|
||||
public void openScreen(Screen screen)
|
||||
|
@ -89,7 +103,6 @@ public class Ginger
|
|||
GingerUtils.preRenderScene(registry.masterRenderer);
|
||||
contrastFbo.bindFBO();
|
||||
registry.masterRenderer.renderScene(data.entities, data.normalMapEntities, data.lights, data.camera, data.clippingPlane, game.getWorld());
|
||||
ParticleMaster.renderParticles(data.camera);
|
||||
contrastFbo.unbindFBO();
|
||||
PostProcessing.doPostProcessing(contrastFbo.colorTexture);
|
||||
if (data.handleGuis) renderOverlays(game);
|
||||
|
@ -109,7 +122,6 @@ public class Ginger
|
|||
registry.masterRenderer = masterRenderer;
|
||||
picker = new MousePicker(game.data.camera, masterRenderer.getProjectionMatrix());
|
||||
PostProcessing.init();
|
||||
ParticleMaster.init(masterRenderer.getProjectionMatrix());
|
||||
}
|
||||
|
||||
public void startGameLoop()
|
||||
|
@ -129,11 +141,10 @@ public class Ginger
|
|||
registry.game.update();
|
||||
picker.update();
|
||||
GingerUtils.update();
|
||||
ParticleMaster.update(data.camera);
|
||||
Window.update();
|
||||
Litecraft.getInstance().ups += 1;
|
||||
}
|
||||
|
||||
public static Ginger getInstance()
|
||||
public static GingerGL getInstance()
|
||||
{ return INSTANCE; }
|
||||
}
|
|
@ -1,11 +1,11 @@
|
|||
package com.github.hydos.ginger.engine.api;
|
||||
package com.github.hydos.ginger.engine.opengl.api;
|
||||
|
||||
import com.github.hydos.ginger.engine.font.TextMaster;
|
||||
import com.github.hydos.ginger.engine.obj.ModelLoader;
|
||||
import com.github.hydos.ginger.engine.obj.normals.NormalMappedObjLoader;
|
||||
import com.github.hydos.ginger.engine.render.MasterRenderer;
|
||||
import com.github.hydos.ginger.engine.render.models.*;
|
||||
import com.github.hydos.ginger.engine.render.texture.ModelTexture;
|
||||
import com.github.hydos.ginger.engine.common.font.TextMaster;
|
||||
import com.github.hydos.ginger.engine.common.obj.ModelLoader;
|
||||
import com.github.hydos.ginger.engine.common.obj.normals.NormalMappedObjLoader;
|
||||
import com.github.hydos.ginger.engine.opengl.render.MasterRenderer;
|
||||
import com.github.hydos.ginger.engine.opengl.render.models.*;
|
||||
import com.github.hydos.ginger.engine.opengl.render.texture.ModelTexture;
|
||||
|
||||
public class GingerUtils
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
package com.github.hydos.ginger.engine.api;
|
||||
package com.github.hydos.ginger.engine.opengl.api;
|
||||
|
||||
/**
|
||||
* make your own resource manager if you want!
|
|
@ -1,8 +1,8 @@
|
|||
package com.github.hydos.ginger.engine.postprocessing;
|
||||
package com.github.hydos.ginger.engine.opengl.postprocessing;
|
||||
|
||||
import org.lwjgl.opengl.*;
|
||||
|
||||
import com.github.hydos.ginger.engine.fbo.FboCallbackHandler;
|
||||
import com.github.hydos.ginger.engine.common.fbo.FboCallbackHandler;
|
||||
|
||||
public class ContrastChanger extends FboCallbackHandler
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
package com.github.hydos.ginger.engine.postprocessing;
|
||||
package com.github.hydos.ginger.engine.opengl.postprocessing;
|
||||
|
||||
import com.github.hydos.ginger.engine.render.shaders.ShaderProgram;
|
||||
import com.github.hydos.ginger.engine.opengl.render.shaders.ShaderProgram;
|
||||
|
||||
public class ContrastShader extends ShaderProgram
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
package com.github.hydos.ginger.engine.postprocessing;
|
||||
package com.github.hydos.ginger.engine.opengl.postprocessing;
|
||||
|
||||
import static org.lwjgl.opengl.ARBFramebufferObject.*;
|
||||
import static org.lwjgl.opengl.GL11.*;
|
||||
|
@ -8,8 +8,8 @@ import java.nio.ByteBuffer;
|
|||
import org.lwjgl.glfw.*;
|
||||
import org.lwjgl.system.Callback;
|
||||
|
||||
import com.github.hydos.ginger.engine.fbo.FboCallbackHandler;
|
||||
import com.github.hydos.ginger.engine.io.Window;
|
||||
import com.github.hydos.ginger.engine.common.fbo.FboCallbackHandler;
|
||||
import com.github.hydos.ginger.engine.common.io.Window;
|
||||
|
||||
public class Fbo
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
package com.github.hydos.ginger.engine.postprocessing;
|
||||
package com.github.hydos.ginger.engine.opengl.postprocessing;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
package com.github.hydos.ginger.engine.postprocessing;
|
||||
package com.github.hydos.ginger.engine.opengl.postprocessing;
|
||||
|
||||
import org.lwjgl.opengl.*;
|
||||
|
||||
import com.github.hydos.ginger.engine.render.models.RawModel;
|
||||
import com.github.hydos.ginger.engine.utils.Loader;
|
||||
import com.github.hydos.ginger.engine.opengl.render.models.RawModel;
|
||||
import com.github.hydos.ginger.engine.opengl.utils.GlLoader;
|
||||
|
||||
public class PostProcessing
|
||||
{
|
||||
|
@ -33,7 +33,7 @@ public class PostProcessing
|
|||
|
||||
public static void init()
|
||||
{
|
||||
quad = Loader.loadToVAO(POSITIONS, 2);
|
||||
quad = GlLoader.loadToVAO(POSITIONS, 2);
|
||||
contrastChanger = new ContrastChanger();
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.github.hydos.ginger.engine.render;
|
||||
package com.github.hydos.ginger.engine.opengl.render;
|
||||
|
||||
import java.lang.Math;
|
||||
import java.util.*;
|
||||
|
@ -8,14 +8,14 @@ import org.lwjgl.opengl.*;
|
|||
|
||||
import com.github.halotroop.litecraft.world.World;
|
||||
import com.github.halotroop.litecraft.world.block.BlockRenderer;
|
||||
import com.github.hydos.ginger.engine.cameras.Camera;
|
||||
import com.github.hydos.ginger.engine.elements.GuiTexture;
|
||||
import com.github.hydos.ginger.engine.elements.objects.*;
|
||||
import com.github.hydos.ginger.engine.io.Window;
|
||||
import com.github.hydos.ginger.engine.render.models.TexturedModel;
|
||||
import com.github.hydos.ginger.engine.render.renderers.*;
|
||||
import com.github.hydos.ginger.engine.render.shaders.*;
|
||||
import com.github.hydos.ginger.engine.shadow.ShadowMapMasterRenderer;
|
||||
import com.github.hydos.ginger.engine.common.cameras.Camera;
|
||||
import com.github.hydos.ginger.engine.common.elements.GuiTexture;
|
||||
import com.github.hydos.ginger.engine.common.elements.objects.*;
|
||||
import com.github.hydos.ginger.engine.common.io.Window;
|
||||
import com.github.hydos.ginger.engine.opengl.render.models.TexturedModel;
|
||||
import com.github.hydos.ginger.engine.opengl.render.renderers.*;
|
||||
import com.github.hydos.ginger.engine.opengl.render.shaders.*;
|
||||
import com.github.hydos.ginger.engine.opengl.shadow.ShadowMapMasterRenderer;
|
||||
|
||||
public class MasterRenderer
|
||||
{
|
|
@ -0,0 +1,5 @@
|
|||
package com.github.hydos.ginger.engine.opengl.render;
|
||||
|
||||
public abstract class Renderer
|
||||
{
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.github.hydos.ginger.engine.render.models;
|
||||
package com.github.hydos.ginger.engine.opengl.render.models;
|
||||
|
||||
public class RawModel
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
package com.github.hydos.ginger.engine.render.models;
|
||||
package com.github.hydos.ginger.engine.opengl.render.models;
|
||||
|
||||
import com.github.hydos.ginger.engine.render.texture.ModelTexture;
|
||||
import com.github.hydos.ginger.engine.opengl.render.texture.ModelTexture;
|
||||
|
||||
public class TexturedModel
|
||||
{
|
|
@ -1,12 +1,12 @@
|
|||
package com.github.hydos.ginger.engine.render.renderers;
|
||||
package com.github.hydos.ginger.engine.opengl.render.renderers;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import org.lwjgl.opengl.*;
|
||||
|
||||
import com.github.hydos.ginger.engine.font.*;
|
||||
import com.github.hydos.ginger.engine.render.Renderer;
|
||||
import com.github.hydos.ginger.engine.render.shaders.FontShader;
|
||||
import com.github.hydos.ginger.engine.common.font.*;
|
||||
import com.github.hydos.ginger.engine.opengl.render.Renderer;
|
||||
import com.github.hydos.ginger.engine.opengl.render.shaders.FontShader;
|
||||
|
||||
public class FontRenderer extends Renderer
|
||||
{
|
|
@ -1,16 +1,16 @@
|
|||
package com.github.hydos.ginger.engine.render.renderers;
|
||||
package com.github.hydos.ginger.engine.opengl.render.renderers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.joml.Matrix4f;
|
||||
import org.lwjgl.opengl.*;
|
||||
|
||||
import com.github.hydos.ginger.engine.elements.GuiTexture;
|
||||
import com.github.hydos.ginger.engine.math.Maths;
|
||||
import com.github.hydos.ginger.engine.render.Renderer;
|
||||
import com.github.hydos.ginger.engine.render.models.RawModel;
|
||||
import com.github.hydos.ginger.engine.render.shaders.GuiShader;
|
||||
import com.github.hydos.ginger.engine.utils.Loader;
|
||||
import com.github.hydos.ginger.engine.common.elements.GuiTexture;
|
||||
import com.github.hydos.ginger.engine.common.math.Maths;
|
||||
import com.github.hydos.ginger.engine.opengl.render.Renderer;
|
||||
import com.github.hydos.ginger.engine.opengl.render.models.RawModel;
|
||||
import com.github.hydos.ginger.engine.opengl.render.shaders.GuiShader;
|
||||
import com.github.hydos.ginger.engine.opengl.utils.GlLoader;
|
||||
|
||||
public class GuiRenderer extends Renderer
|
||||
{
|
||||
|
@ -24,7 +24,7 @@ public class GuiRenderer extends Renderer
|
|||
{
|
||||
-1, 1, -1, -1, 1, 1, 1, -1
|
||||
};
|
||||
quad = Loader.loadToVAO(positions, 2);
|
||||
quad = GlLoader.loadToVAO(positions, 2);
|
||||
}
|
||||
|
||||
public void cleanUp()
|
|
@ -1,18 +1,18 @@
|
|||
package com.github.hydos.ginger.engine.render.renderers;
|
||||
package com.github.hydos.ginger.engine.opengl.render.renderers;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import org.joml.*;
|
||||
import org.lwjgl.opengl.*;
|
||||
|
||||
import com.github.hydos.ginger.engine.cameras.Camera;
|
||||
import com.github.hydos.ginger.engine.elements.objects.*;
|
||||
import com.github.hydos.ginger.engine.io.Window;
|
||||
import com.github.hydos.ginger.engine.math.Maths;
|
||||
import com.github.hydos.ginger.engine.render.*;
|
||||
import com.github.hydos.ginger.engine.render.models.*;
|
||||
import com.github.hydos.ginger.engine.render.shaders.NormalMappingShader;
|
||||
import com.github.hydos.ginger.engine.render.texture.ModelTexture;
|
||||
import com.github.hydos.ginger.engine.common.cameras.Camera;
|
||||
import com.github.hydos.ginger.engine.common.elements.objects.*;
|
||||
import com.github.hydos.ginger.engine.common.io.Window;
|
||||
import com.github.hydos.ginger.engine.common.math.Maths;
|
||||
import com.github.hydos.ginger.engine.opengl.render.*;
|
||||
import com.github.hydos.ginger.engine.opengl.render.models.*;
|
||||
import com.github.hydos.ginger.engine.opengl.render.shaders.NormalMappingShader;
|
||||
import com.github.hydos.ginger.engine.opengl.render.texture.ModelTexture;
|
||||
|
||||
public class NormalMappingRenderer extends Renderer
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
package com.github.hydos.ginger.engine.render.renderers;
|
||||
package com.github.hydos.ginger.engine.opengl.render.renderers;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
@ -6,14 +6,14 @@ import org.joml.Matrix4f;
|
|||
import org.lwjgl.opengl.*;
|
||||
|
||||
import com.github.halotroop.litecraft.types.block.BlockInstance;
|
||||
import com.github.hydos.ginger.engine.api.GingerRegister;
|
||||
import com.github.hydos.ginger.engine.elements.objects.RenderObject;
|
||||
import com.github.hydos.ginger.engine.io.Window;
|
||||
import com.github.hydos.ginger.engine.math.Maths;
|
||||
import com.github.hydos.ginger.engine.render.*;
|
||||
import com.github.hydos.ginger.engine.render.models.*;
|
||||
import com.github.hydos.ginger.engine.render.shaders.StaticShader;
|
||||
import com.github.hydos.ginger.engine.render.texture.ModelTexture;
|
||||
import com.github.hydos.ginger.engine.common.api.GingerRegister;
|
||||
import com.github.hydos.ginger.engine.common.elements.objects.RenderObject;
|
||||
import com.github.hydos.ginger.engine.common.io.Window;
|
||||
import com.github.hydos.ginger.engine.common.math.Maths;
|
||||
import com.github.hydos.ginger.engine.opengl.render.*;
|
||||
import com.github.hydos.ginger.engine.opengl.render.models.*;
|
||||
import com.github.hydos.ginger.engine.opengl.render.shaders.StaticShader;
|
||||
import com.github.hydos.ginger.engine.opengl.render.texture.ModelTexture;
|
||||
|
||||
public class ObjectRenderer extends Renderer
|
||||
{
|
|
@ -1,13 +1,13 @@
|
|||
package com.github.hydos.ginger.engine.render.renderers;
|
||||
package com.github.hydos.ginger.engine.opengl.render.renderers;
|
||||
|
||||
import org.joml.Matrix4f;
|
||||
import org.lwjgl.opengl.*;
|
||||
|
||||
import com.github.hydos.ginger.engine.cameras.Camera;
|
||||
import com.github.hydos.ginger.engine.render.Renderer;
|
||||
import com.github.hydos.ginger.engine.render.models.RawModel;
|
||||
import com.github.hydos.ginger.engine.render.shaders.SkyboxShader;
|
||||
import com.github.hydos.ginger.engine.utils.Loader;
|
||||
import com.github.hydos.ginger.engine.common.cameras.Camera;
|
||||
import com.github.hydos.ginger.engine.opengl.render.Renderer;
|
||||
import com.github.hydos.ginger.engine.opengl.render.models.RawModel;
|
||||
import com.github.hydos.ginger.engine.opengl.render.shaders.SkyboxShader;
|
||||
import com.github.hydos.ginger.engine.opengl.utils.GlLoader;
|
||||
|
||||
public class SkyboxRenderer extends Renderer
|
||||
{
|
||||
|
@ -62,8 +62,8 @@ public class SkyboxRenderer extends Renderer
|
|||
|
||||
public SkyboxRenderer(Matrix4f projectionMatrix)
|
||||
{
|
||||
cube = Loader.loadToVAO(VERTICES, 3);
|
||||
texture = Loader.loadCubeMap(TEXTURE_FILES);
|
||||
cube = GlLoader.loadToVAO(VERTICES, 3);
|
||||
texture = GlLoader.loadCubeMap(TEXTURE_FILES);
|
||||
shader = new SkyboxShader();
|
||||
shader.start();
|
||||
shader.loadProjectionMatrix(projectionMatrix);
|
|
@ -1,8 +1,8 @@
|
|||
package com.github.hydos.ginger.engine.render.shaders;
|
||||
package com.github.hydos.ginger.engine.opengl.render.shaders;
|
||||
|
||||
import org.joml.*;
|
||||
|
||||
import com.github.hydos.ginger.engine.font.GUIText;
|
||||
import com.github.hydos.ginger.engine.common.font.GUIText;
|
||||
|
||||
public class FontShader extends ShaderProgram
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
package com.github.hydos.ginger.engine.render.shaders;
|
||||
package com.github.hydos.ginger.engine.opengl.render.shaders;
|
||||
|
||||
import org.joml.Matrix4f;
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
package com.github.hydos.ginger.engine.render.shaders;
|
||||
package com.github.hydos.ginger.engine.opengl.render.shaders;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.joml.*;
|
||||
|
||||
import com.github.hydos.ginger.engine.elements.objects.Light;
|
||||
import com.github.hydos.ginger.engine.common.elements.objects.Light;
|
||||
|
||||
public class NormalMappingShader extends ShaderProgram
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
package com.github.hydos.ginger.engine.render.shaders;
|
||||
package com.github.hydos.ginger.engine.opengl.render.shaders;
|
||||
|
||||
import org.joml.Matrix4f;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.github.hydos.ginger.engine.render.shaders;
|
||||
package com.github.hydos.ginger.engine.opengl.render.shaders;
|
||||
|
||||
import java.io.*;
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
package com.github.hydos.ginger.engine.render.shaders;
|
||||
package com.github.hydos.ginger.engine.opengl.render.shaders;
|
||||
|
||||
import org.joml.Matrix4f;
|
||||
|
||||
import com.github.hydos.ginger.engine.cameras.Camera;
|
||||
import com.github.hydos.ginger.engine.math.Maths;
|
||||
import com.github.hydos.ginger.engine.common.cameras.Camera;
|
||||
import com.github.hydos.ginger.engine.common.math.Maths;
|
||||
|
||||
public class SkyboxShader extends ShaderProgram
|
||||
{
|
|
@ -1,12 +1,12 @@
|
|||
package com.github.hydos.ginger.engine.render.shaders;
|
||||
package com.github.hydos.ginger.engine.opengl.render.shaders;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.joml.*;
|
||||
|
||||
import com.github.hydos.ginger.engine.cameras.Camera;
|
||||
import com.github.hydos.ginger.engine.elements.objects.Light;
|
||||
import com.github.hydos.ginger.engine.math.Maths;
|
||||
import com.github.hydos.ginger.engine.common.cameras.Camera;
|
||||
import com.github.hydos.ginger.engine.common.elements.objects.Light;
|
||||
import com.github.hydos.ginger.engine.common.math.Maths;
|
||||
|
||||
public class StaticShader extends ShaderProgram
|
||||
{
|
|
@ -1,12 +1,12 @@
|
|||
package com.github.hydos.ginger.engine.render.shaders;
|
||||
package com.github.hydos.ginger.engine.opengl.render.shaders;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.joml.*;
|
||||
|
||||
import com.github.hydos.ginger.engine.cameras.Camera;
|
||||
import com.github.hydos.ginger.engine.elements.objects.Light;
|
||||
import com.github.hydos.ginger.engine.math.Maths;
|
||||
import com.github.hydos.ginger.engine.common.cameras.Camera;
|
||||
import com.github.hydos.ginger.engine.common.elements.objects.Light;
|
||||
import com.github.hydos.ginger.engine.common.math.Maths;
|
||||
|
||||
public class TerrainShader extends ShaderProgram
|
||||
{
|
|
@ -0,0 +1,6 @@
|
|||
package com.github.hydos.ginger.engine.opengl.render.texture;
|
||||
|
||||
public enum ColorDepth
|
||||
{
|
||||
R, RG, RGB, RGBA
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.github.hydos.ginger.engine.render.texture;
|
||||
package com.github.hydos.ginger.engine.opengl.render.texture;
|
||||
|
||||
import static org.lwjgl.stb.STBImage.*;
|
||||
import static org.lwjgl.system.MemoryStack.stackPush;
|
||||
|
@ -8,7 +8,7 @@ import java.nio.*;
|
|||
|
||||
import org.lwjgl.system.MemoryStack;
|
||||
|
||||
import com.github.hydos.ginger.engine.render.tools.IOUtil;
|
||||
import com.github.hydos.ginger.engine.opengl.render.tools.IOUtil;
|
||||
|
||||
public class Image
|
||||
{
|
||||
|
@ -34,20 +34,22 @@ public class Image
|
|||
img = stbi_load_from_memory(imageBuffer, w, h, comp, 0);
|
||||
if (img == null)
|
||||
{ throw new RuntimeException("Failed to load image: " + stbi_failure_reason()); }
|
||||
return new Image(w.get(0), h.get(0), img, comp);
|
||||
return new Image(w.get(0), h.get(0), img, comp, imagePath);
|
||||
}
|
||||
}
|
||||
|
||||
private ByteBuffer image;
|
||||
private int width, height;
|
||||
private IntBuffer comp;
|
||||
private String location;
|
||||
|
||||
Image(int width, int heigh, ByteBuffer image, IntBuffer comp)
|
||||
Image(int width, int heigh, ByteBuffer image, IntBuffer comp, String location)
|
||||
{
|
||||
this.image = image;
|
||||
this.height = heigh;
|
||||
this.width = width;
|
||||
this.comp = comp;
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
public int getHeight()
|
||||
|
@ -61,4 +63,8 @@ public class Image
|
|||
|
||||
public IntBuffer getComp()
|
||||
{ return comp; }
|
||||
|
||||
public String getLocation() {
|
||||
return location;
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.github.hydos.ginger.engine.render.texture;
|
||||
package com.github.hydos.ginger.engine.opengl.render.texture;
|
||||
|
||||
import org.lwjgl.opengl.*;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.github.hydos.ginger.engine.render.tools;
|
||||
package com.github.hydos.ginger.engine.opengl.render.tools;
|
||||
|
||||
import static org.lwjgl.BufferUtils.createByteBuffer;
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
package com.github.hydos.ginger.engine.render.tools;
|
||||
package com.github.hydos.ginger.engine.opengl.render.tools;
|
||||
|
||||
import org.joml.*;
|
||||
|
||||
import com.github.hydos.ginger.engine.cameras.Camera;
|
||||
import com.github.hydos.ginger.engine.io.Window;
|
||||
import com.github.hydos.ginger.engine.math.Maths;
|
||||
import com.github.hydos.ginger.engine.common.cameras.Camera;
|
||||
import com.github.hydos.ginger.engine.common.io.Window;
|
||||
import com.github.hydos.ginger.engine.common.math.Maths;
|
||||
|
||||
public class MousePicker
|
||||
{
|
|
@ -1,12 +1,12 @@
|
|||
package com.github.hydos.ginger.engine.shadow;
|
||||
package com.github.hydos.ginger.engine.opengl.shadow;
|
||||
|
||||
import java.lang.Math;
|
||||
|
||||
import org.joml.*;
|
||||
|
||||
import com.github.hydos.ginger.engine.cameras.Camera;
|
||||
import com.github.hydos.ginger.engine.io.Window;
|
||||
import com.github.hydos.ginger.engine.render.MasterRenderer;
|
||||
import com.github.hydos.ginger.engine.common.cameras.Camera;
|
||||
import com.github.hydos.ginger.engine.common.io.Window;
|
||||
import com.github.hydos.ginger.engine.opengl.render.MasterRenderer;
|
||||
|
||||
/** Represents the 3D cuboidal area of the world in which objects will cast
|
||||
* shadows (basically represents the orthographic projection area for the shadow
|
|
@ -1,10 +1,10 @@
|
|||
package com.github.hydos.ginger.engine.shadow;
|
||||
package com.github.hydos.ginger.engine.opengl.shadow;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
import org.lwjgl.opengl.*;
|
||||
|
||||
import com.github.hydos.ginger.engine.io.Window;
|
||||
import com.github.hydos.ginger.engine.common.io.Window;
|
||||
|
||||
/** The frame buffer for the shadow pass. This class sets up the depth texture
|
||||
* which can be rendered to during the shadow render pass, producing a shadow
|
|
@ -1,14 +1,14 @@
|
|||
package com.github.hydos.ginger.engine.shadow;
|
||||
package com.github.hydos.ginger.engine.opengl.shadow;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import org.joml.Matrix4f;
|
||||
import org.lwjgl.opengl.*;
|
||||
|
||||
import com.github.hydos.ginger.engine.elements.objects.RenderObject;
|
||||
import com.github.hydos.ginger.engine.math.Maths;
|
||||
import com.github.hydos.ginger.engine.render.MasterRenderer;
|
||||
import com.github.hydos.ginger.engine.render.models.*;
|
||||
import com.github.hydos.ginger.engine.common.elements.objects.RenderObject;
|
||||
import com.github.hydos.ginger.engine.common.math.Maths;
|
||||
import com.github.hydos.ginger.engine.opengl.render.MasterRenderer;
|
||||
import com.github.hydos.ginger.engine.opengl.render.models.*;
|
||||
|
||||
public class ShadowMapEntityRenderer
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
package com.github.hydos.ginger.engine.shadow;
|
||||
package com.github.hydos.ginger.engine.opengl.shadow;
|
||||
|
||||
import java.lang.Math;
|
||||
import java.util.*;
|
||||
|
@ -6,9 +6,9 @@ import java.util.*;
|
|||
import org.joml.*;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.github.hydos.ginger.engine.cameras.Camera;
|
||||
import com.github.hydos.ginger.engine.elements.objects.*;
|
||||
import com.github.hydos.ginger.engine.render.models.TexturedModel;
|
||||
import com.github.hydos.ginger.engine.common.cameras.Camera;
|
||||
import com.github.hydos.ginger.engine.common.elements.objects.*;
|
||||
import com.github.hydos.ginger.engine.opengl.render.models.TexturedModel;
|
||||
|
||||
/** This class is in charge of using all of the classes in the shadows package to
|
||||
* carry out the shadow render pass, i.e. rendering the scene to the shadow map
|
|
@ -1,8 +1,8 @@
|
|||
package com.github.hydos.ginger.engine.shadow;
|
||||
package com.github.hydos.ginger.engine.opengl.shadow;
|
||||
|
||||
import org.joml.Matrix4f;
|
||||
|
||||
import com.github.hydos.ginger.engine.render.shaders.ShaderProgram;
|
||||
import com.github.hydos.ginger.engine.opengl.render.shaders.ShaderProgram;
|
||||
|
||||
public class ShadowShader extends ShaderProgram
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
package com.github.hydos.ginger.engine.utils;
|
||||
package com.github.hydos.ginger.engine.opengl.utils;
|
||||
|
||||
import java.nio.*;
|
||||
import java.util.*;
|
||||
|
@ -6,12 +6,12 @@ import java.util.*;
|
|||
import org.lwjgl.BufferUtils;
|
||||
import org.lwjgl.opengl.*;
|
||||
|
||||
import com.github.hydos.ginger.engine.io.Window;
|
||||
import com.github.hydos.ginger.engine.render.models.RawModel;
|
||||
import com.github.hydos.ginger.engine.render.texture.*;
|
||||
import com.github.hydos.ginger.engine.terrain.TerrainTexture;
|
||||
import com.github.halotroop.litecraft.types.block.*;
|
||||
import com.github.hydos.ginger.engine.common.io.Window;
|
||||
import com.github.hydos.ginger.engine.opengl.render.models.RawModel;
|
||||
import com.github.hydos.ginger.engine.opengl.render.texture.*;
|
||||
|
||||
public class Loader
|
||||
public class GlLoader
|
||||
{
|
||||
private static List<Integer> vaos = new ArrayList<Integer>();
|
||||
private static List<Integer> vbos = new ArrayList<Integer>();
|
||||
|
@ -99,12 +99,49 @@ public class Loader
|
|||
return textureID;
|
||||
}
|
||||
|
||||
public static TerrainTexture loadTerrainTexture(String string)
|
||||
{ return new TerrainTexture(new ModelTexture("terrain/" + string).getTextureID()); }
|
||||
|
||||
public static int loadTexture(String path)
|
||||
{ return loadTextureDirectly("/textures/" + path); }
|
||||
|
||||
public static int createBlockAtlas()
|
||||
{
|
||||
int width = 16;
|
||||
int height = 16;
|
||||
//Prepare the atlas texture and gen it
|
||||
int atlasId = GL40.glGenTextures();
|
||||
//Bind it to openGL
|
||||
GL40.glBindTexture(GL40.GL_TEXTURE_2D, atlasId);
|
||||
//Apply the settings for the texture
|
||||
GL40.glTexParameteri(GL40.GL_TEXTURE_2D, GL40.GL_TEXTURE_MIN_FILTER, GL40.GL_NEAREST);
|
||||
GL40.glTexParameteri(GL40.GL_TEXTURE_2D, GL40.GL_TEXTURE_MAG_FILTER, GL40.GL_NEAREST);
|
||||
//Fill the image with blank image data
|
||||
GL40.glTexImage2D(GL40.GL_TEXTURE_2D, 0, GL11.GL_RGBA, width*2, height*2, 0, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, (ByteBuffer) null);
|
||||
|
||||
long maxX = Math.round(Math.sqrt(Blocks.blocks.size()));
|
||||
int currentX = 0;
|
||||
int currentY = 0;
|
||||
for(Block block: Blocks.blocks) {
|
||||
//just in case
|
||||
|
||||
if(!block.texture.equals("DONTLOAD")) {
|
||||
System.out.println(block.texture);
|
||||
block.updateBlockModelData();
|
||||
if(currentX > maxX) {
|
||||
currentX = 0;
|
||||
currentY--;
|
||||
}
|
||||
GL11.glTexSubImage2D(GL11.GL_TEXTURE_2D, 0,
|
||||
currentX*width, currentY*height,
|
||||
width, height,
|
||||
GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE,
|
||||
block.model.getTexture().getTexture().getImage()
|
||||
);
|
||||
currentX++;
|
||||
}
|
||||
|
||||
}
|
||||
return atlasId;
|
||||
}
|
||||
|
||||
public static int loadTextureDirectly(String path)
|
||||
{
|
||||
int textureID = GL11.glGenTextures();
|
|
@ -1,32 +0,0 @@
|
|||
package com.github.hydos.ginger.engine.particle;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class InsertionSort
|
||||
{
|
||||
/** Sorts a list of particles so that the particles with the highest distance
|
||||
* from the camera are first, and the particles with the shortest distance
|
||||
* are last.
|
||||
*
|
||||
* @param list
|
||||
* - the list of particles needing sorting. */
|
||||
public static void sortHighToLow(List<Particle> list)
|
||||
{
|
||||
for (int i = 1; i < list.size(); i++)
|
||||
{
|
||||
Particle item = list.get(i);
|
||||
if (item.getDistance() > list.get(i - 1).getDistance())
|
||||
{ sortUpHighToLow(list, i); }
|
||||
}
|
||||
}
|
||||
|
||||
private static void sortUpHighToLow(List<Particle> list, int i)
|
||||
{
|
||||
Particle item = list.get(i);
|
||||
int attemptPos = i - 1;
|
||||
while (attemptPos != 0 && list.get(attemptPos - 1).getDistance() < item.getDistance())
|
||||
{ attemptPos--; }
|
||||
list.remove(i);
|
||||
list.add(attemptPos, item);
|
||||
}
|
||||
}
|
|
@ -1,96 +0,0 @@
|
|||
package com.github.hydos.ginger.engine.particle;
|
||||
|
||||
import java.lang.Math;
|
||||
|
||||
import org.joml.*;
|
||||
|
||||
import com.github.hydos.ginger.engine.cameras.Camera;
|
||||
import com.github.hydos.ginger.engine.io.Window;
|
||||
import com.github.hydos.ginger.main.settings.Constants;
|
||||
|
||||
public class Particle
|
||||
{
|
||||
private Vector3f position;
|
||||
private Vector3f velocity;
|
||||
private float gravityEffect;
|
||||
private float lifeLength;
|
||||
private float rotation;
|
||||
private Vector3f scale;
|
||||
private Vector2f texOffset1 = new Vector2f();
|
||||
private Vector2f texOffset2 = new Vector2f();
|
||||
private float blend;
|
||||
private ParticleTexture texture;
|
||||
private float elapsedTime = 0;
|
||||
private float distance;
|
||||
|
||||
public Particle(ParticleTexture texture, Vector3f position, Vector3f velocity, float gravityEffect, float lifeLength, float rotation,
|
||||
Vector3f scale)
|
||||
{
|
||||
super();
|
||||
this.position = position;
|
||||
this.velocity = velocity;
|
||||
this.gravityEffect = gravityEffect;
|
||||
this.lifeLength = lifeLength;
|
||||
this.rotation = rotation;
|
||||
this.scale = scale;
|
||||
this.texture = texture;
|
||||
ParticleMaster.addParticle(this);
|
||||
}
|
||||
|
||||
public float getBlend()
|
||||
{ return blend; }
|
||||
|
||||
public float getDistance()
|
||||
{ return distance; }
|
||||
|
||||
public Vector3f getPosition()
|
||||
{ return position; }
|
||||
|
||||
public float getRotation()
|
||||
{ return rotation; }
|
||||
|
||||
public Vector3f getScale()
|
||||
{ return scale; }
|
||||
|
||||
public Vector2f getTexOffset1()
|
||||
{ return texOffset1; }
|
||||
|
||||
public Vector2f getTexOffset2()
|
||||
{ return texOffset2; }
|
||||
|
||||
public ParticleTexture getTexture()
|
||||
{ return texture; }
|
||||
|
||||
private void setTextureOffset(Vector2f offset, int index)
|
||||
{
|
||||
int column = index % texture.getNumberOfRows();
|
||||
int row = index / texture.getNumberOfRows();
|
||||
offset.x = (float) column / texture.getNumberOfRows();
|
||||
offset.y = (float) row / texture.getNumberOfRows();
|
||||
}
|
||||
|
||||
public boolean update(Camera camera)
|
||||
{
|
||||
float time = (float) Window.getTime() / 1000000;
|
||||
velocity.y += Constants.gravity.y() * gravityEffect * time;
|
||||
Vector3f change = new Vector3f(velocity);
|
||||
change.mul(time);
|
||||
position.add(change, position);
|
||||
distance = camera.getPosition().sub(position).lengthSquared();
|
||||
elapsedTime += time;
|
||||
updateTextureCoordInfo();
|
||||
return elapsedTime < lifeLength;
|
||||
}
|
||||
|
||||
private void updateTextureCoordInfo()
|
||||
{
|
||||
float lifeFactor = elapsedTime / lifeLength;
|
||||
int stageCount = texture.getNumberOfRows() * texture.getNumberOfRows();
|
||||
float atlasProgression = lifeFactor * stageCount;
|
||||
int index1 = (int) Math.floor(atlasProgression);
|
||||
int index2 = index1 < stageCount - 1 ? index1 + 1 : index1;
|
||||
this.blend = atlasProgression % 1;
|
||||
setTextureOffset(texOffset1, index1);
|
||||
setTextureOffset(texOffset2, index2);
|
||||
}
|
||||
}
|
|
@ -1,57 +0,0 @@
|
|||
package com.github.hydos.ginger.engine.particle;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import org.joml.Matrix4f;
|
||||
|
||||
import com.github.hydos.ginger.engine.cameras.Camera;
|
||||
import com.github.hydos.ginger.engine.render.renderers.ParticleRenderer;
|
||||
|
||||
public class ParticleMaster
|
||||
{
|
||||
private static Map<ParticleTexture, List<Particle>> particles = new HashMap<ParticleTexture, List<Particle>>();
|
||||
private static ParticleRenderer particleRenderer;
|
||||
|
||||
public static void addParticle(Particle particle)
|
||||
{
|
||||
List<Particle> list = particles.get(particle.getTexture());
|
||||
if (list == null)
|
||||
{
|
||||
list = new ArrayList<Particle>();
|
||||
particles.put(particle.getTexture(), list);
|
||||
}
|
||||
list.add(particle);
|
||||
}
|
||||
|
||||
public static void cleanUp()
|
||||
{ particleRenderer.cleanUp(); }
|
||||
|
||||
public static void init(Matrix4f projectionMatrix)
|
||||
{ particleRenderer = new ParticleRenderer(projectionMatrix); }
|
||||
|
||||
public static void renderParticles(Camera camera)
|
||||
{ particleRenderer.render(particles, camera); }
|
||||
|
||||
public static void update(Camera camera)
|
||||
{
|
||||
Iterator<Entry<ParticleTexture, List<Particle>>> mapIterator = particles.entrySet().iterator();
|
||||
while (mapIterator.hasNext())
|
||||
{
|
||||
List<Particle> list = mapIterator.next().getValue();
|
||||
Iterator<Particle> iterator = list.iterator();
|
||||
while (iterator.hasNext())
|
||||
{
|
||||
Particle p = iterator.next();
|
||||
boolean stillAlive = p.update(camera);
|
||||
if (!stillAlive)
|
||||
{
|
||||
iterator.remove();
|
||||
if (list.isEmpty())
|
||||
{ mapIterator.remove(); }
|
||||
}
|
||||
}
|
||||
InsertionSort.sortHighToLow(list);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,137 +0,0 @@
|
|||
package com.github.hydos.ginger.engine.particle;
|
||||
|
||||
import java.lang.Math;
|
||||
import java.util.Random;
|
||||
|
||||
import org.joml.*;
|
||||
|
||||
import com.github.hydos.ginger.engine.io.Window;
|
||||
|
||||
public class ParticleSystem
|
||||
{
|
||||
private static Vector3f generateRandomUnitVectorWithinCone(Vector3f coneDirection, float angle)
|
||||
{
|
||||
float cosAngle = (float) Math.cos(angle);
|
||||
Random random = new Random();
|
||||
float theta = (float) (random.nextFloat() * 2f * Math.PI);
|
||||
float z = cosAngle + (random.nextFloat() * (1 - cosAngle));
|
||||
float rootOneMinusZSquared = (float) Math.sqrt(1 - z * z);
|
||||
float x = (float) (rootOneMinusZSquared * Math.cos(theta));
|
||||
float y = (float) (rootOneMinusZSquared * Math.sin(theta));
|
||||
Vector4f direction = new Vector4f(x, y, z, 1);
|
||||
if (coneDirection.x != 0 || coneDirection.y != 0 || (coneDirection.z != 1 && coneDirection.z != -1))
|
||||
{
|
||||
Vector3f rotateAxis = coneDirection.cross(new Vector3f(0, 0, 1));
|
||||
rotateAxis.normalize();
|
||||
float rotateAngle = (float) Math.acos(coneDirection.dot(new Vector3f(0, 0, 1)));
|
||||
Matrix4f rotationMatrix = new Matrix4f();
|
||||
rotationMatrix.rotate(-rotateAngle, rotateAxis);
|
||||
rotationMatrix.transform(direction);
|
||||
}
|
||||
else if (coneDirection.z == -1)
|
||||
{ direction.z *= -1; }
|
||||
return new Vector3f(direction.x, direction.y, direction.z);
|
||||
}
|
||||
|
||||
private float pps, averageSpeed, gravityComplient, averageLifeLength, averageScale;
|
||||
private float speedError, lifeError, scaleError = 0;
|
||||
private boolean randomRotation = false;
|
||||
private Vector3f direction;
|
||||
private float directionDeviation = 0;
|
||||
private ParticleTexture texture;
|
||||
private Random random = new Random();
|
||||
|
||||
public ParticleSystem(ParticleTexture texture, float pps, float speed, float gravityComplient, float lifeLength, float scale)
|
||||
{
|
||||
this.pps = pps / 100000;
|
||||
this.averageSpeed = speed;
|
||||
this.gravityComplient = gravityComplient;
|
||||
this.averageLifeLength = lifeLength;
|
||||
this.averageScale = scale;
|
||||
this.texture = texture;
|
||||
}
|
||||
|
||||
private void emitParticle(Vector3f center)
|
||||
{
|
||||
Vector3f velocity = null;
|
||||
if (direction != null)
|
||||
{
|
||||
velocity = generateRandomUnitVectorWithinCone(direction, directionDeviation);
|
||||
}
|
||||
else
|
||||
{
|
||||
velocity = generateRandomUnitVector();
|
||||
}
|
||||
velocity.normalize();
|
||||
velocity.mul(generateValue(averageSpeed, speedError));
|
||||
float scale = generateValue(averageScale, scaleError);
|
||||
float lifeLength = generateValue(averageLifeLength, lifeError);
|
||||
new Particle(texture, new Vector3f(center), velocity, gravityComplient, lifeLength, generateRotation(), new Vector3f(scale, scale, scale));
|
||||
}
|
||||
|
||||
public void generateParticles(Vector3f systemCenter)
|
||||
{
|
||||
float delta = (float) Window.getTime();
|
||||
float particlesToCreate = pps * delta;
|
||||
int count = (int) Math.floor(particlesToCreate);
|
||||
float partialParticle = particlesToCreate % 1;
|
||||
for (int i = 0; i < count; i++)
|
||||
{ emitParticle(systemCenter); }
|
||||
if (Math.random() < partialParticle)
|
||||
{ emitParticle(systemCenter); }
|
||||
}
|
||||
|
||||
private Vector3f generateRandomUnitVector()
|
||||
{
|
||||
float theta = (float) (random.nextFloat() * 2f * Math.PI);
|
||||
float z = (random.nextFloat() * 2) - 1;
|
||||
float rootOneMinusZSquared = (float) Math.sqrt(1 - z * z);
|
||||
float x = (float) (rootOneMinusZSquared * Math.cos(theta));
|
||||
float y = (float) (rootOneMinusZSquared * Math.sin(theta));
|
||||
return new Vector3f(x, y, z);
|
||||
}
|
||||
|
||||
private float generateRotation()
|
||||
{
|
||||
if (randomRotation)
|
||||
{
|
||||
return random.nextFloat() * 360f;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
private float generateValue(float average, float errorMargin)
|
||||
{
|
||||
float offset = (random.nextFloat() - 0.5f) * 2f * errorMargin;
|
||||
return average + offset;
|
||||
}
|
||||
|
||||
public void randomizeRotation()
|
||||
{ randomRotation = true; }
|
||||
|
||||
/** @param direction - The average direction in which particles are emitted.
|
||||
* @param deviation - A value between 0 and 1 indicating how far from the chosen direction particles can deviate. */
|
||||
public void setDirection(Vector3f direction, float deviation)
|
||||
{
|
||||
this.direction = new Vector3f(direction);
|
||||
this.directionDeviation = (float) (deviation * Math.PI);
|
||||
}
|
||||
|
||||
/** @param error
|
||||
* - A number between 0 and 1, where 0 means no error margin. */
|
||||
public void setLifeError(float error)
|
||||
{ this.lifeError = error * averageLifeLength; }
|
||||
|
||||
/** @param error
|
||||
* - A number between 0 and 1, where 0 means no error margin. */
|
||||
public void setScaleError(float error)
|
||||
{ this.scaleError = error * averageScale; }
|
||||
|
||||
/** @param error
|
||||
* - A number between 0 and 1, where 0 means no error margin. */
|
||||
public void setSpeedError(float error)
|
||||
{ this.speedError = error * averageSpeed; }
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
package com.github.hydos.ginger.engine.particle;
|
||||
|
||||
public class ParticleTexture
|
||||
{
|
||||
private int textureID;
|
||||
private int numberOfRows;
|
||||
|
||||
public ParticleTexture(int textureID, int numberOfRows)
|
||||
{
|
||||
super();
|
||||
this.textureID = textureID;
|
||||
this.numberOfRows = numberOfRows;
|
||||
}
|
||||
|
||||
public int getNumberOfRows()
|
||||
{ return numberOfRows; }
|
||||
|
||||
public int getTextureID()
|
||||
{ return textureID; }
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
package com.github.hydos.ginger.engine.render;
|
||||
|
||||
public abstract class Renderer
|
||||
{
|
||||
}
|
|
@ -1,156 +0,0 @@
|
|||
package com.github.hydos.ginger.engine.render.renderers;
|
||||
|
||||
import java.lang.Math;
|
||||
import java.nio.FloatBuffer;
|
||||
import java.util.*;
|
||||
|
||||
import org.joml.*;
|
||||
import org.lwjgl.BufferUtils;
|
||||
import org.lwjgl.opengl.*;
|
||||
|
||||
import com.github.hydos.ginger.engine.cameras.Camera;
|
||||
import com.github.hydos.ginger.engine.math.Maths;
|
||||
import com.github.hydos.ginger.engine.particle.*;
|
||||
import com.github.hydos.ginger.engine.render.Renderer;
|
||||
import com.github.hydos.ginger.engine.render.models.RawModel;
|
||||
import com.github.hydos.ginger.engine.render.shaders.ParticleShader;
|
||||
import com.github.hydos.ginger.engine.utils.Loader;
|
||||
|
||||
public class ParticleRenderer extends Renderer
|
||||
{
|
||||
private static final float[] VERTICES =
|
||||
{
|
||||
-0.5f, 0.5f, -0.5f, -0.5f, 0.5f, 0.5f, 0.5f, -0.5f
|
||||
};
|
||||
private static final int MAX_INSTANCES = 10000;
|
||||
private static final int INSTANCE_DATA_LENGTH = 21;
|
||||
private static final FloatBuffer buffer = BufferUtils.createFloatBuffer(MAX_INSTANCES * INSTANCE_DATA_LENGTH);
|
||||
private RawModel quad;
|
||||
private ParticleShader shader;
|
||||
private int vbo;
|
||||
private int pointer;
|
||||
|
||||
public ParticleRenderer(Matrix4f projectionMatrix)
|
||||
{
|
||||
quad = Loader.loadToVAO(VERTICES, 2);
|
||||
this.vbo = Loader.createEmptyVbo(INSTANCE_DATA_LENGTH * MAX_INSTANCES);
|
||||
Loader.addInstancedAttribute(quad.getVaoID(), vbo, 1, 4, INSTANCE_DATA_LENGTH, 0);
|
||||
Loader.addInstancedAttribute(quad.getVaoID(), vbo, 2, 4, INSTANCE_DATA_LENGTH, 4);
|
||||
Loader.addInstancedAttribute(quad.getVaoID(), vbo, 3, 4, INSTANCE_DATA_LENGTH, 8);
|
||||
Loader.addInstancedAttribute(quad.getVaoID(), vbo, 4, 4, INSTANCE_DATA_LENGTH, 12);
|
||||
Loader.addInstancedAttribute(quad.getVaoID(), vbo, 5, 4, INSTANCE_DATA_LENGTH, 16);
|
||||
Loader.addInstancedAttribute(quad.getVaoID(), vbo, 6, 1, INSTANCE_DATA_LENGTH, 20);
|
||||
shader = new ParticleShader();
|
||||
shader.start();
|
||||
shader.loadProjectionMatrix(projectionMatrix);
|
||||
shader.stop();
|
||||
}
|
||||
|
||||
private void bindTexture(ParticleTexture texture)
|
||||
{
|
||||
GL13.glActiveTexture(GL13.GL_TEXTURE0);
|
||||
GL11.glBindTexture(GL11.GL_TEXTURE_2D, texture.getTextureID());
|
||||
shader.loadNumberOfRows(texture.getNumberOfRows());
|
||||
}
|
||||
|
||||
public void cleanUp()
|
||||
{ shader.cleanUp(); }
|
||||
|
||||
private void finishRendering()
|
||||
{
|
||||
shader.stop();
|
||||
GL30.glBindVertexArray(0);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL20.glDisableVertexAttribArray(0);
|
||||
GL20.glDisableVertexAttribArray(1);
|
||||
GL20.glDisableVertexAttribArray(2);
|
||||
GL20.glDisableVertexAttribArray(3);
|
||||
GL20.glDisableVertexAttribArray(4);
|
||||
GL20.glDisableVertexAttribArray(5);
|
||||
GL20.glDisableVertexAttribArray(6);
|
||||
}
|
||||
|
||||
private void prepare()
|
||||
{
|
||||
shader.start();
|
||||
GL30.glBindVertexArray(quad.getVaoID());
|
||||
GL20.glEnableVertexAttribArray(0);
|
||||
GL20.glEnableVertexAttribArray(1);
|
||||
GL20.glEnableVertexAttribArray(2);
|
||||
GL20.glEnableVertexAttribArray(3);
|
||||
GL20.glEnableVertexAttribArray(4);
|
||||
GL20.glEnableVertexAttribArray(5);
|
||||
GL20.glEnableVertexAttribArray(6);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);//TODO: add all particle effects into 1 texture to fix overlapping
|
||||
}
|
||||
|
||||
public void render(Map<ParticleTexture, List<Particle>> particles, Camera camera)
|
||||
{
|
||||
Matrix4f viewMatrix = Maths.createViewMatrix(camera);
|
||||
prepare();
|
||||
for (ParticleTexture texture : particles.keySet())
|
||||
{
|
||||
bindTexture(texture);
|
||||
List<Particle> particleList = particles.get(texture);
|
||||
pointer = 0;
|
||||
float[] vboData = new float[particleList.size() * INSTANCE_DATA_LENGTH];
|
||||
for (Particle particle : particleList)
|
||||
{
|
||||
updateModelViewMatrix(particle.getPosition(), particle.getRotation(), particle.getScale().x, viewMatrix, vboData);
|
||||
updateTexCoordInfo(particle, vboData);
|
||||
}
|
||||
Loader.updateVbo(vbo, vboData, buffer);
|
||||
GL31.glDrawArraysInstanced(GL11.GL_TRIANGLE_STRIP, 0, quad.getVertexCount(), particleList.size());
|
||||
}
|
||||
finishRendering();
|
||||
}
|
||||
|
||||
private void storeMatrixData(Matrix4f matrix, float[] vboData)
|
||||
{
|
||||
vboData[pointer++] = matrix.m00();
|
||||
vboData[pointer++] = matrix.m01();
|
||||
vboData[pointer++] = matrix.m02();
|
||||
vboData[pointer++] = matrix.m03();
|
||||
vboData[pointer++] = matrix.m10();
|
||||
vboData[pointer++] = matrix.m11();
|
||||
vboData[pointer++] = matrix.m12();
|
||||
vboData[pointer++] = matrix.m13();
|
||||
vboData[pointer++] = matrix.m20();
|
||||
vboData[pointer++] = matrix.m21();
|
||||
vboData[pointer++] = matrix.m22();
|
||||
vboData[pointer++] = matrix.m23();
|
||||
vboData[pointer++] = matrix.m30();
|
||||
vboData[pointer++] = matrix.m31();
|
||||
vboData[pointer++] = matrix.m32();
|
||||
vboData[pointer++] = matrix.m33();
|
||||
}
|
||||
|
||||
private void updateModelViewMatrix(Vector3f position, float rotation, float scale, Matrix4f viewMatrix, float[] vboData)
|
||||
{
|
||||
Matrix4f modelMatrix = new Matrix4f();
|
||||
modelMatrix.translate(position, modelMatrix);
|
||||
modelMatrix._m00(viewMatrix.m00());
|
||||
modelMatrix._m01(viewMatrix.m10());
|
||||
modelMatrix._m02(viewMatrix.m20());
|
||||
modelMatrix._m10(viewMatrix.m01());
|
||||
modelMatrix._m11(viewMatrix.m11());
|
||||
modelMatrix._m12(viewMatrix.m21());
|
||||
modelMatrix._m20(viewMatrix.m02());
|
||||
modelMatrix._m21(viewMatrix.m12());
|
||||
modelMatrix._m22(viewMatrix.m22());
|
||||
modelMatrix.rotate((float) Math.toRadians(rotation), new Vector3f(0, 0, 1), modelMatrix);
|
||||
modelMatrix.scale(new Vector3f(scale, scale, scale), modelMatrix);
|
||||
Matrix4f modelViewMatrix = viewMatrix.mul(modelMatrix);
|
||||
storeMatrixData(modelViewMatrix, vboData);
|
||||
}
|
||||
|
||||
private void updateTexCoordInfo(Particle particle, float[] data)
|
||||
{
|
||||
data[pointer++] = particle.getTexOffset1().x;
|
||||
data[pointer++] = particle.getTexOffset1().y;
|
||||
data[pointer++] = particle.getTexOffset2().x;
|
||||
data[pointer++] = particle.getTexOffset2().y;
|
||||
data[pointer++] = particle.getBlend();
|
||||
}
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
package com.github.hydos.ginger.engine.render.texture;
|
||||
|
||||
public enum ColorDepth
|
||||
{
|
||||
R, RG, RGB, RGBA
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
package com.github.hydos.ginger.engine.terrain;
|
||||
|
||||
public class TerrainTexture
|
||||
{
|
||||
private int textureID;
|
||||
|
||||
public TerrainTexture(int textureID)
|
||||
{
|
||||
super();
|
||||
this.textureID = textureID;
|
||||
}
|
||||
|
||||
public int getTextureID()
|
||||
{ return textureID; }
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
package com.github.hydos.ginger.engine.terrain;
|
||||
|
||||
public class TerrainTexturePack
|
||||
{
|
||||
private TerrainTexture backgroundTexture;
|
||||
private TerrainTexture rTexture;
|
||||
private TerrainTexture gTexture;
|
||||
private TerrainTexture bTexture;
|
||||
|
||||
public TerrainTexturePack(TerrainTexture backgroundTexture, TerrainTexture rTexture, TerrainTexture gTexture,
|
||||
TerrainTexture bTexture)
|
||||
{
|
||||
this.backgroundTexture = backgroundTexture;
|
||||
this.rTexture = rTexture;
|
||||
this.gTexture = gTexture;
|
||||
this.bTexture = bTexture;
|
||||
}
|
||||
|
||||
public TerrainTexture getBackgroundTexture()
|
||||
{ return backgroundTexture; }
|
||||
|
||||
public TerrainTexture getbTexture()
|
||||
{ return bTexture; }
|
||||
|
||||
public TerrainTexture getgTexture()
|
||||
{ return gTexture; }
|
||||
|
||||
public TerrainTexture getrTexture()
|
||||
{ return rTexture; }
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
package com.github.hydos.ginger.engine.vulkan.api;
|
||||
|
||||
public class GingerV {
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
package com.github.hydos.ginger.engine.vulkan.utils;
|
||||
/**
|
||||
*
|
||||
* @author hayden
|
||||
* used to load vulkan related objects such as textures
|
||||
*
|
||||
*/
|
||||
public class VLoader {
|
||||
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
package com.github.hydos.ginger.main.tools;
|
||||
|
||||
public class GSceneBuilder
|
||||
{
|
||||
/** The class for turning GScene files into the engine parts in java */
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
package com.github.hydos.ginger.voxelutils;
|
||||
|
||||
public class BlockMesher
|
||||
{
|
||||
//TODO: supercoder i ask you that you figure a way to cull inner faces and not just whole blocks :)
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue