Compare commits

..

No commits in common. "dev" and "main" have entirely different histories.
dev ... main

710 changed files with 4524 additions and 8591 deletions

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
<fileset name="all" enabled="true" check-config-name="Google Checks" local="false">
<fileset name="all" enabled="true" check-config-name="Ewol" local="false">
<file-match-pattern match-pattern="." include-pattern="true"/>
</fileset>
</fileset-config>

56
.classpath Normal file
View File

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding="**/*.java__|**/__*.java" kind="src" path="src">
<attributes>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="resources"/>
<classpathentry including="**/*.java" kind="src" output="out/eclipse/classes-test" path="test/src">
<attributes>
<attribute name="test" value="true"/>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-14">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/5">
<attributes>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/atriasoft-ewol">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/atriasoft-gale">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/atriasoft-etk">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/scenarium-logger">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/atriasoft-ephysics">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry combineaccessrules="false" kind="src" path="/loader3d">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="out/eclipse/classes"/>
</classpath>

14
.gitignore vendored
View File

@ -1,5 +1,3 @@
/__pycache__/
/bin/
/Operator/
/DrawerProperties/
@ -17,15 +15,3 @@ build.number
/.settings/
/junit/
/target/
*.blend1
*.blend2
*.blend3
*.blend4
*.blend5
*.pyc
__pycache__
*.log

18
.project Normal file
View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>atriasoft-ege</name>
<comment></comment>
<projects>
<project>atriasoft-ege</project>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@ -1,44 +1,8 @@
Atria-soft ege (JAVA)
=====================
Atria-soft ege
==============
`Ege` (Ewol Game Engine) is a FREE software.
[MPL-2] Mozilla public licence (V 2.0)
Install blender exporter emf file
=================================
Game engine.
get blender version
blender --version | grep "Blender "
create user addon directory: (replace 2.xx with the blender version)
mkdir -p ~/.config/blender/2.xx/scripts/addons/
ln -s $(pwd)/blender/io_scene_emf ~/.config/blender/2.xx/scripts/addons/
- Launch Blender
- File -> User Preferences
- Select "Addons" tab
- Enable "Import-export: Ewol Mesh file format emf"
Some error classile with awesome and blender
============================================
- file -> user preferences -> system -> Windows draw methode: triple bufferings
License (MPL v2.0)
=====================
Copyright ege Edouard DUPIN
Licensed under the Mozilla Public License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.mozilla.org/MPL/2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -84,7 +84,7 @@ class ExportEMF(bpy.types.Operator, ExportHelper):
use_selection = BoolProperty(
name="Selection Only",
description="Export selected objects only",
default=False,
default=True,
)
# generate binary file
use_binary = BoolProperty(
@ -125,7 +125,7 @@ class ExportEMF(bpy.types.Operator, ExportHelper):
global_matrix[0][0] = \
global_matrix[1][1] = \
global_matrix[2][2] = 1.0 #self.global_scale
global_matrix[2][2] = self.global_scale
return export_emf.save(self, context, **keywords)

View File

@ -1,24 +1,9 @@
import bpy
#bpy.ops.wm.open_mainfile(filepath="/home/heero/dev/workspace-game/atriasoft/ege/blender/io_scene_emf/../../samples/resources/emf/tree1.blend")
#bpy.ops.export_scene.emf(filepath="/home/heero/dev/workspace-game/atriasoft/ege/samples/resources/emf/tree1.emf")
bpy.ops.wm.open_mainfile(filepath="/home/heero/dev/workspace-game/atriasoft/ege/blender/io_scene_emf/../../samples/resources/emf/tree1.blend")
bpy.ops.export_scene.emf(filepath="/home/heero/dev/workspace-game/atriasoft/ege/blender/io_scene_emf/../../samples/resources/emf/tree1.emf")
#bpy.ops.wm.open_mainfile(filepath="/home/heero/dev/workspace-game/atriasoft/ewol/resources/resources/ewol/theme/shape/Entry.blend")
#bpy.ops.export_scene.emf(filepath="/home/heero/dev/workspace-game/atriasoft/ewol/resources/resources/ewol/theme/shape/Entry.emf")
#bpy.ops.export_scene.emf(filepath="/home/heero/dev/workspace-game/atriasoft/ege/samples/resources/emf/Entry.emf")
bpy.ops.wm.open_mainfile(filepath="/home/heero/dev/WORKSPACE-game/Edouard-DUPIN/zleep/resources/lowPoly/truck1.blend")
bpy.ops.export_scene.emf(filepath="/home/heero/dev/WORKSPACE-game/Edouard-DUPIN/zleep/resources/lowPoly/truck_001.emf")
bpy.ops.wm.open_mainfile(filepath="/home/heero/dev/WORKSPACE-game/Edouard-DUPIN/zleep/resources/lowPoly/truck2.blend")
bpy.ops.export_scene.emf(filepath="/home/heero/dev/WORKSPACE-game/Edouard-DUPIN/zleep/resources/lowPoly/truck_002.emf")
bpy.ops.wm.open_mainfile(filepath="/home/heero/dev/WORKSPACE-game/Edouard-DUPIN/zleep/resources/lowPoly/truck3.blend")
bpy.ops.export_scene.emf(filepath="/home/heero/dev/WORKSPACE-game/Edouard-DUPIN/zleep/resources/lowPoly/truck_003.emf")
bpy.ops.wm.open_mainfile(filepath="/home/heero/dev/WORKSPACE-game/Edouard-DUPIN/zleep/resources/lowPoly/car1.blend")
bpy.ops.export_scene.emf(filepath="/home/heero/dev/WORKSPACE-game/Edouard-DUPIN/zleep/resources/lowPoly/car_001.emf")
bpy.ops.wm.open_mainfile(filepath="/home/heero/dev/WORKSPACE-game/Edouard-DUPIN/zleep/resources/lowPoly/map_2.blend")
bpy.ops.export_scene.emf(filepath="/home/heero/dev/WORKSPACE-game/Edouard-DUPIN/zleep/resources/lowPoly/map_002.emf")

View File

@ -59,7 +59,7 @@ def out_quaternion( q ):
return "%g %g %g %g" % ( q.x, q.y, q.z, q.w )
def get_physics_shape(obj):
def get_physics_shape(obj, mainObjScale):
shape = ""
props = { }
name = obj.name.lower()
@ -73,7 +73,7 @@ def get_physics_shape(obj):
# SPHERE
elif name.startswith('sph'):
shape = "Sphere"
props["radius"] = obj.scale.x
props["radius"] = obj.scale.x * mainObjScale.x
# CONE
elif name.startswith('cone'):
shape = "Cone"
@ -116,21 +116,21 @@ def get_physics_shape(obj):
return (shape, props)
def write_collision_shape(objects, file, offset):
def write_collision_shape(object, file, mainObjScale, offset):
fw = file.write
if len(objects)==0:
if len(getChildren(object))==0:
# no phisical shape ...
return
string_offset = ""
for iii in range(offset):
string_offset += "\t"
fw(string_offset + 'Physics:\n')
for subObj in objects:
for subObj in getChildren(object):
print(" element='" + subObj.name + "' type '" + str(subObj.type) + "'")
if subObj.type != 'MESH' \
and subObj.type != 'EMPTY':
continue
(shape, props) = get_physics_shape(subObj)
(shape, props) = get_physics_shape(subObj, mainObjScale)
if shape=="":
print("error of shape detection type ...");
continue
@ -179,11 +179,7 @@ def write_mtl(scene, file, filepath, path_mode, copy_set, mtl_dict):
#print(" mat: ");
#for elem in dir(mat):
# print(" - " + elem);
if mtl_mat_name.lower().startswith("palette_"):
fw('# Just for information:\nPalettes:%s\n' % mtl_mat_name[8:]) # Define a new material: matname_imgname
else:
fw('Materials:%s\n' % mtl_mat_name) # Define a new material: matname_imgname
fw('Materials:%s\n' % mtl_mat_name) # Define a new material: matname_imgname
mat_wrap = node_shader_utils.PrincipledBSDFWrapper(mat) if mat else None
if mat_wrap:
@ -260,9 +256,9 @@ def write_mtl(scene, file, filepath, path_mode, copy_set, mtl_dict):
if tex_wrap.scale != Vector((1.0, 1.0, 1.0)):
options.append('-s %.6f %.6f %.6f' % tex_wrap.scale[:])
if options:
fw('\t%s %s %s\n' % (key, " ".join(options), repr(filepath)[1:-1]))
fw('%s %s %s\n' % (key, " ".join(options), repr(filepath)[1:-1]))
else:
fw('\t%s %s\n' % (key, repr(filepath)[1:-1]))
fw('%s %s\n' % (key, repr(filepath)[1:-1]))
else:
# Write a dummy material here?
@ -299,7 +295,7 @@ def write_mesh(scene, file, object, mtl_dict):
print(object.name + 'is not a mesh type - ignoring type=' + object.type)
fw('# can not export:"%s":type="%s"\n' % (object.name, str(object.type)))
return
print("generate Object name:'%s'" % object.name)
#print("name:'%s'" % object.name)
#for plop in object.child:
# print(" child:'%s'" % plop.name)
# ignore dupli children
@ -334,10 +330,8 @@ def write_mesh(scene, file, object, mtl_dict):
mesh_triangulate(me)
# calculated normals:
me.calc_normals()
#print("nb UB layers: " + str(len(me.uv_layers)) + " " + str(dir(me.uv_layers)));
# export UV mapping:
faceuv = len(me.uv_layers) > 0
# TODO: This does not work with V facing ==> need to rework it ... designed for Low poly then we use Palette
if faceuv:
uv_texture = me.uv_layers.active.data[:]
uv_layer = me.uv_layers.active.data[:]
@ -359,27 +353,13 @@ def write_mesh(scene, file, object, mtl_dict):
material_names = [name_compat(None)]
# Sort by Material, then images
# so we dont over context switch in the obj file.
if False:
if len(materials) > 1:
if smooth_groups:
sort_func = lambda a: (a[0].material_index,
smooth_groups[a[1]] if a[0].use_smooth else False)
else:
sort_func = lambda a: (a[0].material_index,
a[0].use_smooth)
else:
# no materials
if smooth_groups:
sort_func = lambda a: smooth_groups[a[1] if a[0].use_smooth else False]
else:
sort_func = lambda a: a[0].use_smooth
face_index_pairs.sort(key=sort_func)
del sort_func
if faceuv:
face_index_pairs.sort(key=lambda a: (a[0].material_index, hash(uv_texture[a[1]].image), a[0].use_smooth))
elif len(materials) > 1:
face_index_pairs.sort(key=lambda a: (a[0].material_index, a[0].use_smooth))
else:
face_index_pairs.sort(key=lambda a: (a[0].material_index))
# no materials
face_index_pairs.sort(key=lambda a: a[0].use_smooth)
# Set the default mat to no material and no image.
contextMat = 0, 0 # Can never be this, so we will label a new material the first chance we get.
contextSmooth = None # Will either be true or false, set bad to force initialization switch.
@ -460,21 +440,13 @@ def write_mesh(scene, file, object, mtl_dict):
###########################################################
fw('\tFace:%d' % len(face_index_pairs))
for f, f_index in face_index_pairs:
f_image = None
f_smooth = f.use_smooth
f_mat = min(f.material_index, len(materials) - 1)
tmp_faceuv = faceuv
if tmp_faceuv:
if faceuv:
tface = uv_texture[f_index]
#print("mesh_uvloop:" + str(dir(tface.uv)))
if 'image' in dir(uv_texture[f_index]):
f_image = tface.image
else:
# TODO: remove export of UV when no UV needed...
#tmp_faceuv = False
pass
f_image = tface.image
# MAKE KEY
if tmp_faceuv and f_image: # Object is always true.
if faceuv and f_image: # Object is always true.
key = material_names[f_mat], f_image.name
else:
key = material_names[f_mat], None # No image, use None instead.
@ -509,10 +481,10 @@ def write_mesh(scene, file, object, mtl_dict):
mat_data = mtl_dict[key] = mtl_name, materials[f_mat], f_image
mtl_rev_dict[mtl_name] = key
# set the use of a material:
fw("\n\t\t%s\n\t\t\t" % mat_data[0].replace("palette_", "palette:")) # can be mat_image or (null)
fw("\n\t\t%s\n\t\t\t" % mat_data[0]) # can be mat_image or (null)
contextMat = key
f_v = [(vi, me_verts[v_idx]) for vi, v_idx in enumerate(f.vertices)]
if tmp_faceuv:
if faceuv:
# export the normals:
if f_smooth: # Smoothed, use vertex normals
for vi, v in f_v:
@ -574,7 +546,7 @@ def write_mesh(scene, file, object, mtl_dict):
" @brief Basic write function. The context and options must be already set.
"""
def write_file(filepath,
collection,
objects,
scene,
EXPORT_PATH_MODE='AUTO',
EXPORT_BINARY_MODE=False,
@ -620,18 +592,25 @@ def write_file(filepath,
print("nb_total_physic: " + str(nb_total_physic))
"""
print("Find Mesh in collection: '" + str(collection.name) + "'")
# Get all meshes
for ob_main in collection.objects:
for ob_main in objects:
if ob_main.type == 'MESH':
write_mesh(scene, file, ob_main, mtl_dict)
print("Find Physics in collection: '" + str(collection.name) + "'")
for col in collection.children:
print(" - name: " + str(col.name) + "/" + str(col.name_full) )
if col.name.lower().startswith("physic"):
write_collision_shape(col.objects, file, 0)
elif ob_main.type == 'EMPTY':
for sub_obj in getChildren(ob_main):
print(" child:'" + str(sub_obj.name) + "' type=" + sub_obj.type)
if sub_obj.type == 'MESH':
write_mesh(scene, file, sub_obj, mtl_dict)
elif sub_obj.type == 'EMPTY' \
and sub_obj.name.lower().startswith("physic"):
print(" child:'" + str(sub_obj.name) + "' type=" + sub_obj.type)
#####################################################################
## Save collision shapes (for one all):
#####################################################################
write_collision_shape(sub_obj, file, sub_obj.scale, 0)
else:
print(" child:'" + str(sub_obj.name) + "' type=" + sub_obj.type + " not parsed ...")
#####################################################################
## Now we have all our materials, save them in the material section
#####################################################################
@ -674,27 +653,14 @@ def _write(context,
scene.frame_set(frame, subframe=0.0)
# get only the object that are selected or all...
if EXPORT_SEL_ONLY:
collection = bpy.context.collection
objects = context.selected_objects
else:
print("collection auto detect 'root': ")
collection = scene.collection
if collection.name != "root":
for col in collection.children:
if col.name == "root":
collection = col
break
if collection.name != "root":
raise "Can not detect collection 'root'"
#print("* collection name: " + str(collection.name) + "/" + str(collection.name_full) )
print("============================================================================================");
draw_tree(scene.collection, 0, collection);
print("============================================================================================");
objects = scene.objects
full_path = ''.join(context_name)
write_file(full_path,
collection,
objects,
scene,
EXPORT_PATH_MODE,
EXPORT_BINARY_MODE,
@ -703,24 +669,6 @@ def _write(context,
##
## Display all the element in the collection tree (for help debug exporting)
##
def draw_tree(collection, offset, export_collection):
string_offset = ""
for iii in range(offset):
string_offset += "\t"
if export_collection == collection:
print(string_offset + "- collection: '" + str(collection.name) + "' !!!! exported node !!!!")
else:
print(string_offset + "- collection: '" + str(collection.name) + "'")
for col in collection.children:
draw_tree(col, offset+1, export_collection);
if 'objects' in dir(collection):
for obj in collection.objects:
print(string_offset + "\t- objects: '" + str(obj.name) + "' type '" + str(obj.type) + "'")
"""
" @brief Save the current element in the file requested.
"

View File

@ -460,7 +460,9 @@ def write_file(filepath, objects, depsgraph, scene,
if faceuv:
# in case removing some of these dont get defined.
uv = f_index = uv_index = uv_key = uv_val = uv_ls = None
uv_face_mapping = [None] * len(face_index_pairs)
uv_dict = {}
uv_get = uv_dict.get
for f, f_index in face_index_pairs:
@ -469,17 +471,21 @@ def write_file(filepath, objects, depsgraph, scene,
uv = uv_layer[l_index].uv
# include the vertex index in the key so we don't share UV's between vertices,
# allowed by the OBJ spec but can cause issues for other importers, see: T47010.
# this works too, shared UV's for all verts
#~ uv_key = veckey2d(uv)
uv_key = loops[l_index].vertex_index, veckey2d(uv)
uv_val = uv_get(uv_key)
if uv_val is None:
uv_val = uv_dict[uv_key] = uv_unique_count
fw('vt %.6f %.6f\n' % uv[:])
uv_unique_count += 1
uv_ls.append(uv_val)
del uv_dict, uv, f_index, uv_index, uv_ls, uv_get, uv_key, uv_val
# Only need uv_unique_count and uv_face_mapping
subprogress2.step()
# NORMAL, Smooth/Non smoothed.

View File

@ -1,167 +0,0 @@
#!/usr/bin/python
import realog.debug as debug
import lutin.tools as tools
import realog.debug as debug
import lutin.image as image
import os
import lutin.multiprocess as lutinMultiprocess
def get_type():
return "LIBRARY_DYNAMIC"
def get_desc():
return "Ewol Tool Kit"
def get_licence():
return "MPL-2"
def get_compagny_type():
return "org"
def get_compagny_name():
return "atria-soft"
#def get_maintainer():
# return "authors.txt"
#def get_version():
# return "version.txt"
def configure(target, my_module):
my_module.add_src_file([
'src/entities/Light.java',
'src/entities/Player.java',
'src/entities/Entity.java',
'src/entities/Camera.java',
'src/shaders/ShaderProgram.java',
'src/shaders/StaticShader.java',
'src/shaders/TerrainShader.java',
'src/renderEngine/DisplayManagerDraw.java',
'src/renderEngine/DisplayManager.java',
'src/renderEngine/TerrainRenderer.java',
'src/renderEngine/EntityRenderer.java',
'src/renderEngine/MasterRenderer.java',
'src/renderEngine/Loader.java',
'src/renderEngine/OBJLoader.java',
'src/module-info.java',
'src/org/atriasoft/ege/physics/shape/Sphere.java',
'src/org/atriasoft/ege/physics/shape/Box.java',
'src/org/atriasoft/ege/physics/shape/Capsule.java',
'src/org/atriasoft/ege/physics/shape/ConvexHull.java',
'src/org/atriasoft/ege/physics/shape/Concave.java',
'src/org/atriasoft/ege/physics/shape/Shape.java',
'src/org/atriasoft/ege/physics/shape/Cone.java',
'src/org/atriasoft/ege/physics/shape/Cylinder.java',
'src/org/atriasoft/ege/Ege.java',
'src/org/atriasoft/ege/CreatorEntity.java',
'src/org/atriasoft/ege/Light.java',
'src/org/atriasoft/ege/EntityInteraction.java',
'src/org/atriasoft/ege/engines/EngineParticle.java',
'src/org/atriasoft/ege/engines/EngineDynamicMeshs.java',
'src/org/atriasoft/ege/engines/EngineMap.java',
'src/org/atriasoft/ege/engines/EngineAI.java',
'src/org/atriasoft/ege/engines/EnginePhysics.java',
'src/org/atriasoft/ege/engines/EnginePlayer.java',
'src/org/atriasoft/ege/engines/EngineGravity.java',
'src/org/atriasoft/ege/engines/EngineRender.java',
'src/org/atriasoft/ege/engines/EngineLight.java',
'src/org/atriasoft/ege/ControlCameraPlayerFPS.java',
'src/org/atriasoft/ege/internal/LOGGER.java',
'src/org/atriasoft/ege/geometry/AABB.java',
'src/org/atriasoft/ege/geometry/Sphere.java',
'src/org/atriasoft/ege/geometry/Ray.java',
'src/org/atriasoft/ege/geometry/Plane.java',
'src/org/atriasoft/ege/geometry/OBB.java',
'src/org/atriasoft/ege/geometry/Geometry3D.java',
'src/org/atriasoft/ege/geometry/Line.java',
'src/org/atriasoft/ege/geometry/Triangle.java',
'src/org/atriasoft/ege/ControlCameraPlayer.java',
'src/org/atriasoft/ege/Material.java',
'src/org/atriasoft/ege/ResultNearestEntity.java',
'src/org/atriasoft/ege/Component.java',
'src/org/atriasoft/ege/Environement.java',
'src/org/atriasoft/ege/Signal.java',
'src/org/atriasoft/ege/map/MapVoxel.java',
'src/org/atriasoft/ege/map/VoxelType.java',
'src/org/atriasoft/ege/map/VoxelChunk.java',
'src/org/atriasoft/ege/map/ComponentDynamicMeshsVoxelMap.java',
'src/org/atriasoft/ege/map/Voxel.java',
'src/org/atriasoft/ege/map/ComponentRenderVoxelMesh.java',
'src/org/atriasoft/ege/camera/Camera.java',
'src/org/atriasoft/ege/Entity.java',
'src/org/atriasoft/ege/Engine.java',
'src/org/atriasoft/ege/components/ComponentTextures.java',
'src/org/atriasoft/ege/components/ComponentMaterials.java',
'src/org/atriasoft/ege/components/ComponentRender.java',
'src/org/atriasoft/ege/components/ComponentMaterial.java',
'src/org/atriasoft/ege/components/ComponentTexturePalette.java',
'src/org/atriasoft/ege/components/ComponentRenderTexturedStaticMesh.java',
'src/org/atriasoft/ege/components/ComponentLightSun.java',
'src/org/atriasoft/ege/components/ComponentTexturePack.java',
'src/org/atriasoft/ege/components/ComponentRenderColoredStaticMesh.java',
'src/org/atriasoft/ege/components/ComponentMap.java',
'src/org/atriasoft/ege/components/ComponentRenderTexturedMaterialsStaticMesh.java',
'src/org/atriasoft/ege/components/ComponentPhysics.java',
'src/org/atriasoft/ege/components/ComponentDynamicMeshs.java',
'src/org/atriasoft/ege/components/ComponentMesh.java',
'src/org/atriasoft/ege/components/ComponentPlayer.java',
'src/org/atriasoft/ege/components/ComponentRenderMeshPalette.java',
'src/org/atriasoft/ege/components/ComponentGravityStatic.java',
'src/org/atriasoft/ege/components/ComponentRenderTexturedMaterialsStaticMeshs.java',
'src/org/atriasoft/ege/components/ComponentGravity.java',
'src/org/atriasoft/ege/components/ComponentPositionPlayer.java',
'src/org/atriasoft/ege/components/ComponentLight.java',
'src/org/atriasoft/ege/components/part/LightRender.java',
'src/org/atriasoft/ege/components/part/MaterialRenderBase.java',
'src/org/atriasoft/ege/components/part/MaterialsRender.java',
'src/org/atriasoft/ege/components/part/PartRenderInterface.java',
'src/org/atriasoft/ege/components/part/TransformRender.java',
'src/org/atriasoft/ege/components/part/MaterialRender.java',
'src/org/atriasoft/ege/components/part/PositionningInterface.java',
'src/org/atriasoft/ege/components/GlLightIndex.java',
'src/org/atriasoft/ege/components/ComponentStaticMeshs.java',
'src/org/atriasoft/ege/components/ComponentPosition.java',
'src/org/atriasoft/ege/components/ComponentAI.java',
'src/org/atriasoft/ege/components/PhysicBodyType.java',
'src/org/atriasoft/ege/components/ComponentRenderTexturedMaterialsDynamicMeshs.java',
'src/org/atriasoft/ege/components/ComponentTexture.java',
'src/org/atriasoft/ege/components/ComponentStaticMesh.java',
'src/org/atriasoft/ege/components/ComponentParticle.java',
'src/org/atriasoft/ege/tools/MeshGenerator.java',
'src/org/atriasoft/ege/ControlCameraSimple.java',
'src/org/atriasoft/ege/ControlInterface.java',
'src/org/atriasoft/ege/GameStatus.java',
'src/skybox/SkyboxShader.java',
'src/skybox/SkyboxRenderer.java',
'src/terrains/TerrainTexture.java',
'src/terrains/TerrainTexturePack.java',
'src/terrains/Terrain.java',
'src/guis/GuiTexture.java',
'src/guis/GuiRenderer.java',
'src/guis/GuiShader.java',
'src/textures/ModelTexture.java',
'src/textures/TextureData.java',
'src/toolbox/Maths.java',
'src/models/RawModel.java',
'src/models/TexturedModel.java',
])
my_module.add_path('src/', type='java')
my_module.add_depend([
'org-atriasoft-ewol',
'org-atriasoft-ephysics',
'org-atriasoft-loader3d',
])
#my_module.add_path([
# 'lib/spotbugs-annotations-4.2.2.jar'
# ],
# type='java',
# export=True
#);
my_module.add_flag('java', "RELEASE_15_PREVIEW");
return True

160
pom.xml
View File

@ -1,160 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.atriasoft</groupId>
<artifactId>ege</artifactId>
<version>0.1.0</version>
<licenses>
<license>
<name>Mozilla Public License 2.0</name>
<url>https://opensource.org/licenses/MPL-2.0</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<id>dev1</id>
<name>Edouard DUPIN</name>
<email>edouard.dupin@proton.me</email>
<roles>
<role>Lead Developer</role>
</roles>
</developer>
</developers>
<repositories>
<repository>
<id>gitea</id>
<url>https://gitea.atria-soft.org/api/packages/org.atriasoft/maven</url>
</repository>
</repositories>
<distributionManagement>
<repository>
<id>gitea</id>
<url>https://gitea.atria-soft.org/api/packages/org.atriasoft/maven</url>
</repository>
<snapshotRepository>
<id>gitea</id>
<url>https://gitea.atria-soft.org/api/packages/org.atriasoft/maven</url>
</snapshotRepository>
</distributionManagement>
<dependencies>
<dependency>
<groupId>org.atriasoft</groupId>
<artifactId>ewol</artifactId>
<version>0.1.0</version>
</dependency>
<dependency>
<groupId>org.atriasoft</groupId>
<artifactId>ephysics</artifactId>
<version>0.1.0</version>
</dependency>
<dependency>
<groupId>org.atriasoft</groupId>
<artifactId>loader3d</artifactId>
<version>0.1.0</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.11.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.11.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>2.1.0-alpha1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<sourceDirectory>src/main</sourceDirectory>
<resources>
<resource>
<directory>${basedir}/src/resources</directory>
</resource>
</resources>
<testSourceDirectory>src/test</testSourceDirectory>
<testResources>
<testResource>
<directory>${basedir}/src/testResources</directory>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.14.0</version>
<configuration>
<source>21</source>
<target>21</target>
</configuration>
</plugin>
<!-- Create the source bundle -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- junit results -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.5</version>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>fully.qualified.MainClass</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
<!-- Java-doc generation for stand-alone site -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<show>private</show>
<nohelp>true</nohelp>
</configuration>
</plugin>
</plugins>
</build>
<!-- Generate Java-docs As Part Of Project Reports -->
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<show>public</show>
</configuration>
</plugin>
</plugins>
</reporting>
</project>

View File

@ -0,0 +1,16 @@
#version 400 core
#ifdef GL_ES
precision mediump float;
precision mediump int;
#endif
in vec4 io_color;
// output:
out vec4 out_Color;
void main(void) {
out_Color = io_color;
}

View File

@ -0,0 +1,21 @@
#version 400 core
#ifdef GL_ES
precision mediump float;
precision mediump int;
#endif
// Input :
in vec3 in_position;
uniform vec4 in_colors;
uniform mat4 in_matrixTransformation;
uniform mat4 in_matrixProjection;
uniform mat4 in_matrixView;
// output :
out vec4 io_color;
void main(void) {
gl_Position = in_matrixProjection * in_matrixView * in_matrixTransformation * vec4(in_position, 1.0);
io_color = vec4(in_colors.xyz, 0.3);
}

View File

@ -0,0 +1,16 @@
#version 400 core
#ifdef GL_ES
precision mediump float;
precision mediump int;
#endif
in vec4 io_color;
// output:
out vec4 out_Color;
void main(void) {
out_Color = vec4(1.0,0.0,0.0,1.0);
// io_color;
}

View File

@ -0,0 +1,21 @@
#version 400 core
#ifdef GL_ES
precision mediump float;
precision mediump int;
#endif
// Input:
in vec3 in_position;
in vec4 in_colors;
uniform mat4 in_matrixTransformation;
uniform mat4 in_matrixProjection;
uniform mat4 in_matrixView;
// output:
out vec4 io_color;
void main(void) {
gl_Position = in_matrixProjection * in_matrixView * in_matrixTransformation * vec4(in_position, 1.0);
io_color = in_colors;
}

21
samples/.classpath Normal file
View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry combineaccessrules="false" kind="src" path="/atriasoft-ege">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry combineaccessrules="false" kind="src" path="/atriasoft-etk">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="bin"/>
</classpath>

3
samples/.gitignore vendored
View File

@ -1,4 +1 @@
/__pycache__/
/bin/
/target/

17
samples/.project Normal file
View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>atriasoft-ege-samples</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,2 @@
eclipse.preferences.version=1
org.eclipse.jdt.ui.text.custom_code_templates=

View File

@ -0,0 +1,2 @@
eclipse.preferences.version=1
org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false

File diff suppressed because it is too large Load Diff

View File

@ -1,120 +0,0 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.atriasoft</groupId>
<artifactId>ege-sample</artifactId>
<version>0.1.0</version>
<properties>
<maven.compiler.version>3.13.0</maven.compiler.version>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<maven.dependency.version>3.1.1</maven.dependency.version>
</properties>
<repositories>
<repository>
<id>gitea</id>
<url>https://gitea.atria-soft.org/api/packages/org.atriasoft/maven</url>
</repository>
</repositories>
<distributionManagement>
<repository>
<id>gitea</id>
<url>https://gitea.atria-soft.org/api/packages/org.atriasoft/maven</url>
</repository>
<snapshotRepository>
<id>gitea</id>
<url>https://gitea.atria-soft.org/api/packages/org.atriasoft/maven</url>
</snapshotRepository>
</distributionManagement>
<dependencies>
<dependency>
<groupId>org.atriasoft</groupId>
<artifactId>ege</artifactId>
<version>0.1.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>2.1.0-alpha1</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>src/main</sourceDirectory>
<resources>
<resource>
<directory>${basedir}/src/resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.version}</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<!--<encoding>${project.build.sourceEncoding}</encoding>-->
</configuration>
</plugin>
<!-- Create the source bundle -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- junit results -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>fully.qualified.MainClass</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
<!-- Java-doc generation for stand-alone site -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<show>private</show>
<nohelp>true</nohelp>
</configuration>
</plugin>
</plugins>
</build>
<!-- Generate Java-docs As Part Of Project Reports -->
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<show>public</show>
</configuration>
</plugin>
</plugins>
</reporting>
</project>

View File

@ -0,0 +1,3 @@
EMF(STRING)
# Blender v2.92.0 EMF File: 'tree1.blend'

View File

Before

Width:  |  Height:  |  Size: 517 KiB

After

Width:  |  Height:  |  Size: 517 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

View File

@ -2,14 +2,14 @@
# www.blender.org
mtllib cube.mtl
o Cube
v 0.5 0.5 -0.5
v 0.5 -0.5 -0.5
v 0.5 0.5 0.5
v 0.5 -0.5 0.5
v -0.5 0.5 -0.5
v -0.5 -0.5 -0.5
v -0.5 0.5 0.5
v -0.5 -0.5 0.5
v 0.499999 0.499999 -0.499999
v 0.499999 -0.499999 -0.499999
v 0.499999 0.499999 0.499999
v 0.499999 -0.499999 0.499999
v -0.499999 0.499999 -0.499999
v -0.499999 -0.499999 -0.499999
v -0.499999 0.499999 0.499999
v -0.499999 -0.499999 0.499999
vt 0.875000 0.500000
vt 0.625000 0.750000
vt 0.625000 0.500000

View File

Before

Width:  |  Height:  |  Size: 122 KiB

After

Width:  |  Height:  |  Size: 122 KiB

View File

Before

Width:  |  Height:  |  Size: 162 KiB

After

Width:  |  Height:  |  Size: 162 KiB

View File

Before

Width:  |  Height:  |  Size: 577 KiB

After

Width:  |  Height:  |  Size: 577 KiB

View File

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

Before

Width:  |  Height:  |  Size: 182 KiB

After

Width:  |  Height:  |  Size: 182 KiB

View File

Before

Width:  |  Height:  |  Size: 159 KiB

After

Width:  |  Height:  |  Size: 159 KiB

View File

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

View File

Before

Width:  |  Height:  |  Size: 154 KiB

After

Width:  |  Height:  |  Size: 154 KiB

View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 45 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 296 B

After

Width:  |  Height:  |  Size: 296 B

View File

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 60 KiB

View File

Before

Width:  |  Height:  |  Size: 426 KiB

After

Width:  |  Height:  |  Size: 426 KiB

Binary file not shown.

View File

Before

Width:  |  Height:  |  Size: 474 KiB

After

Width:  |  Height:  |  Size: 474 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 991 KiB

After

Width:  |  Height:  |  Size: 991 KiB

View File

Before

Width:  |  Height:  |  Size: 938 KiB

After

Width:  |  Height:  |  Size: 938 KiB

View File

Before

Width:  |  Height:  |  Size: 1003 KiB

After

Width:  |  Height:  |  Size: 1003 KiB

View File

Before

Width:  |  Height:  |  Size: 342 KiB

After

Width:  |  Height:  |  Size: 342 KiB

View File

Before

Width:  |  Height:  |  Size: 126 KiB

After

Width:  |  Height:  |  Size: 126 KiB

View File

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View File

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View File

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 57 KiB

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

Before

Width:  |  Height:  |  Size: 193 KiB

After

Width:  |  Height:  |  Size: 193 KiB

View File

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

View File

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 98 KiB

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -6,8 +6,8 @@ precision mediump int;
#endif
// Input:
layout (location = 0) in vec3 in_position;
layout (location = 1) in vec2 in_textureCoords;
in vec3 in_position;
in vec2 in_textureCoords;
uniform mat4 in_matrixTransformation;
uniform mat4 in_matrixProjection;
uniform mat4 in_matrixView;

View File

@ -13,9 +13,9 @@ struct Light {
const int MAX_LIGHT_NUMBER = 8;
// Input:
layout (location = 0) in vec3 in_position;
layout (location = 1) in vec2 in_textureCoords;
layout (location = 2) in vec3 in_normal;
in vec3 in_position;
in vec3 in_normal;
in vec2 in_textureCoords;
// 2 light for suns and other for locals ...
uniform Light in_lights[MAX_LIGHT_NUMBER];

Some files were not shown because too many files have changed in this diff Show More