framebufferBugHunt #3
@ -1,3 +1,3 @@
 | 
				
			|||||||
#maven.buildNumber.plugin properties file
 | 
					#maven.buildNumber.plugin properties file
 | 
				
			||||||
#Wed Sep 04 09:33:29 EDT 2024
 | 
					#Sat Sep 07 08:28:40 EDT 2024
 | 
				
			||||||
buildNumber=320
 | 
					buildNumber=324
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										14
									
								
								pom.xml
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								pom.xml
									
									
									
									
									
								
							@ -126,6 +126,20 @@
 | 
				
			|||||||
            <classifier>${lwjgl.natives}</classifier>
 | 
					            <classifier>${lwjgl.natives}</classifier>
 | 
				
			||||||
        </dependency>
 | 
					        </dependency>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <!--par_shapes-->
 | 
				
			||||||
 | 
					        <!--License: MIT-->
 | 
				
			||||||
 | 
					        <dependency>
 | 
				
			||||||
 | 
					            <groupId>org.lwjgl</groupId>
 | 
				
			||||||
 | 
					            <artifactId>lwjgl-par</artifactId>
 | 
				
			||||||
 | 
					            <version>${lwjgl.version}</version>
 | 
				
			||||||
 | 
					        </dependency>
 | 
				
			||||||
 | 
					        <dependency>
 | 
				
			||||||
 | 
					            <groupId>org.lwjgl</groupId>
 | 
				
			||||||
 | 
					            <artifactId>lwjgl-par</artifactId>
 | 
				
			||||||
 | 
					            <version>${lwjgl.version}</version>
 | 
				
			||||||
 | 
					            <classifier>${lwjgl.natives}</classifier>
 | 
				
			||||||
 | 
					        </dependency>
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
        <!--JOML-->
 | 
					        <!--JOML-->
 | 
				
			||||||
        <!--License: MIT-->
 | 
					        <!--License: MIT-->
 | 
				
			||||||
        <dependency>
 | 
					        <dependency>
 | 
				
			||||||
 | 
				
			|||||||
@ -602,13 +602,9 @@ public class Globals {
 | 
				
			|||||||
        //init fluid shader program
 | 
					        //init fluid shader program
 | 
				
			||||||
        FluidChunkModelGeneration.fluidChunkShaderProgram = ShaderProgram.loadSpecificShader("/Shaders/entities/fluid2/fluid2.vs", "/Shaders/entities/fluid2/fluid2.fs");
 | 
					        FluidChunkModelGeneration.fluidChunkShaderProgram = ShaderProgram.loadSpecificShader("/Shaders/entities/fluid2/fluid2.vs", "/Shaders/entities/fluid2/fluid2.fs");
 | 
				
			||||||
        //init models
 | 
					        //init models
 | 
				
			||||||
        assetManager.addModelPathToQueue("Models/basic/geometry/unitsphere.glb");
 | 
					        assetManager.registerModelToSpecificString(RenderUtils.createUnitsphere(), AssetDataStrings.UNITSPHERE);
 | 
				
			||||||
        assetManager.addModelPathToQueue("Models/basic/geometry/unitsphere.fbx");
 | 
					        assetManager.registerModelToSpecificString(RenderUtils.createUnitCylinder(), AssetDataStrings.UNITCYLINDER);
 | 
				
			||||||
        assetManager.addModelPathToQueue("Models/basic/geometry/unitsphere_1.fbx");
 | 
					 | 
				
			||||||
        assetManager.addModelPathToQueue("Models/basic/geometry/unitsphere_grey.fbx");
 | 
					 | 
				
			||||||
        assetManager.addModelPathToQueue("Models/basic/geometry/SmallCube.fbx");
 | 
					        assetManager.addModelPathToQueue("Models/basic/geometry/SmallCube.fbx");
 | 
				
			||||||
        assetManager.addModelPathToQueue("Models/basic/geometry/unitcylinder.fbx");
 | 
					 | 
				
			||||||
        assetManager.addModelPathToQueue("Models/basic/geometry/unitcylinder.glb");
 | 
					 | 
				
			||||||
        assetManager.addModelPathToQueue("Models/basic/geometry/unitcapsule.glb");
 | 
					        assetManager.addModelPathToQueue("Models/basic/geometry/unitcapsule.glb");
 | 
				
			||||||
        assetManager.addModelPathToQueue("Models/basic/geometry/unitplane.fbx");
 | 
					        assetManager.addModelPathToQueue("Models/basic/geometry/unitplane.fbx");
 | 
				
			||||||
        assetManager.addModelPathToQueue("Models/basic/geometry/unitcube.fbx");
 | 
					        assetManager.addModelPathToQueue("Models/basic/geometry/unitcube.fbx");
 | 
				
			||||||
 | 
				
			|||||||
@ -8,4 +8,12 @@ public class AssetDataStrings {
 | 
				
			|||||||
    public static final String ASSET_STRING_SKYBOX_BASIC = "skyboxBasic";
 | 
					    public static final String ASSET_STRING_SKYBOX_BASIC = "skyboxBasic";
 | 
				
			||||||
    public static final String BITMAP_CHARACTER_MODEL = "bitmapCharacterModel";
 | 
					    public static final String BITMAP_CHARACTER_MODEL = "bitmapCharacterModel";
 | 
				
			||||||
    public static final String LEAVES_MODEL = "leaves";
 | 
					    public static final String LEAVES_MODEL = "leaves";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * The basic geometry of the engine
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static final String UNITSPHERE = "unitSphere";
 | 
				
			||||||
 | 
					    public static final String UNITCYLINDER = "unitCylinder";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -11,6 +11,7 @@ import electrosphere.client.targeting.crosshair.Crosshair;
 | 
				
			|||||||
import electrosphere.client.terrain.cells.DrawCellManager;
 | 
					import electrosphere.client.terrain.cells.DrawCellManager;
 | 
				
			||||||
import electrosphere.controls.ControlHandler;
 | 
					import electrosphere.controls.ControlHandler;
 | 
				
			||||||
import electrosphere.engine.Globals;
 | 
					import electrosphere.engine.Globals;
 | 
				
			||||||
 | 
					import electrosphere.engine.assetmanager.AssetDataStrings;
 | 
				
			||||||
import electrosphere.engine.signal.Signal.SignalType;
 | 
					import electrosphere.engine.signal.Signal.SignalType;
 | 
				
			||||||
import electrosphere.engine.threads.LabeledThread.ThreadLabel;
 | 
					import electrosphere.engine.threads.LabeledThread.ThreadLabel;
 | 
				
			||||||
import electrosphere.entity.DrawableUtils;
 | 
					import electrosphere.entity.DrawableUtils;
 | 
				
			||||||
@ -244,7 +245,7 @@ public class ClientLoading {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        //player's cursor
 | 
					        //player's cursor
 | 
				
			||||||
        Globals.playerCursor = EntityCreationUtils.createClientSpatialEntity();
 | 
					        Globals.playerCursor = EntityCreationUtils.createClientSpatialEntity();
 | 
				
			||||||
        EntityCreationUtils.makeEntityDrawable(Globals.playerCursor, "Models/basic/geometry/unitsphere_1.fbx");
 | 
					        EntityCreationUtils.makeEntityDrawable(Globals.playerCursor, AssetDataStrings.UNITSPHERE);
 | 
				
			||||||
        DrawableUtils.makeEntityTransparent(Globals.playerCursor);
 | 
					        DrawableUtils.makeEntityTransparent(Globals.playerCursor);
 | 
				
			||||||
        EntityUtils.getScale(Globals.playerCursor).set(30f);
 | 
					        EntityUtils.getScale(Globals.playerCursor).set(30f);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
@ -20,6 +20,8 @@ import org.lwjgl.BufferUtils;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import static org.lwjgl.opengl.GL11.GL_FLOAT;
 | 
					import static org.lwjgl.opengl.GL11.GL_FLOAT;
 | 
				
			||||||
import org.lwjgl.opengl.GL40;
 | 
					import org.lwjgl.opengl.GL40;
 | 
				
			||||||
 | 
					import org.lwjgl.util.par.ParShapes;
 | 
				
			||||||
 | 
					import org.lwjgl.util.par.ParShapesMesh;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * Utilities to assist with rendering
 | 
					 * Utilities to assist with rendering
 | 
				
			||||||
@ -339,6 +341,64 @@ public class RenderUtils {
 | 
				
			|||||||
        return rVal;
 | 
					        return rVal;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Generates a unit sphere model
 | 
				
			||||||
 | 
					     * @return The model
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static Model createUnitsphere(){
 | 
				
			||||||
 | 
					        Model model = new Model();
 | 
				
			||||||
 | 
					        Mesh sphereMesh = new Mesh("sphere");
 | 
				
			||||||
 | 
					        sphereMesh.generateVAO();
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        //buffer coords
 | 
				
			||||||
 | 
					        ParShapesMesh data = ParShapes.par_shapes_create_parametric_sphere(10, 5);
 | 
				
			||||||
 | 
					        int numPoints = data.npoints();
 | 
				
			||||||
 | 
					        FloatBuffer verts = data.points(numPoints * 3);
 | 
				
			||||||
 | 
					        sphereMesh.bufferVertices(verts, 3);
 | 
				
			||||||
 | 
					        FloatBuffer texCoords = data.tcoords(numPoints * 3);
 | 
				
			||||||
 | 
					        sphereMesh.bufferTextureCoords(texCoords, 2);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //setup extra structures
 | 
				
			||||||
 | 
					        Material mat = new Material();
 | 
				
			||||||
 | 
					        mat.set_diffuse("Textures/color/transparent_teal.png");
 | 
				
			||||||
 | 
					        sphereMesh.setMaterial(mat);
 | 
				
			||||||
 | 
					        sphereMesh.setShader(ShaderProgram.smart_assemble_shader(false, true));
 | 
				
			||||||
 | 
					        GL40.glBindVertexArray(0);
 | 
				
			||||||
 | 
					        sphereMesh.setParent(model);
 | 
				
			||||||
 | 
					        model.getMeshes().add(sphereMesh);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return model;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Creates a unit cylinder model
 | 
				
			||||||
 | 
					     * @return The model
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static Model createUnitCylinder(){
 | 
				
			||||||
 | 
					        Model model = new Model();
 | 
				
			||||||
 | 
					        Mesh sphereMesh = new Mesh("cylinder");
 | 
				
			||||||
 | 
					        sphereMesh.generateVAO();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //buffer coords
 | 
				
			||||||
 | 
					        ParShapesMesh data = ParShapes.par_shapes_create_cylinder(10, 2);
 | 
				
			||||||
 | 
					        int numPoints = data.npoints();
 | 
				
			||||||
 | 
					        FloatBuffer verts = data.points(numPoints * 3);
 | 
				
			||||||
 | 
					        sphereMesh.bufferVertices(verts, 3);
 | 
				
			||||||
 | 
					        FloatBuffer texCoords = data.tcoords(numPoints * 2);
 | 
				
			||||||
 | 
					        sphereMesh.bufferTextureCoords(texCoords, 2);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //setup extra structures
 | 
				
			||||||
 | 
					        Material mat = new Material();
 | 
				
			||||||
 | 
					        mat.set_diffuse("Textures/color/transparent_teal.png");
 | 
				
			||||||
 | 
					        sphereMesh.setMaterial(mat);
 | 
				
			||||||
 | 
					        sphereMesh.setShader(ShaderProgram.smart_assemble_shader(false, true));
 | 
				
			||||||
 | 
					        GL40.glBindVertexArray(0);
 | 
				
			||||||
 | 
					        sphereMesh.setParent(model);
 | 
				
			||||||
 | 
					        model.getMeshes().add(sphereMesh);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return model;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Deprecated
 | 
					    @Deprecated
 | 
				
			||||||
    public static Model createBitmapDisplay(){
 | 
					    public static Model createBitmapDisplay(){
 | 
				
			||||||
 | 
				
			|||||||
@ -7,6 +7,7 @@ import org.joml.Vector3f;
 | 
				
			|||||||
import org.lwjgl.opengl.GL40;
 | 
					import org.lwjgl.opengl.GL40;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import electrosphere.engine.Globals;
 | 
					import electrosphere.engine.Globals;
 | 
				
			||||||
 | 
					import electrosphere.engine.assetmanager.AssetDataStrings;
 | 
				
			||||||
import electrosphere.entity.Entity;
 | 
					import electrosphere.entity.Entity;
 | 
				
			||||||
import electrosphere.entity.EntityUtils;
 | 
					import electrosphere.entity.EntityUtils;
 | 
				
			||||||
import electrosphere.entity.types.camera.CameraEntityUtils;
 | 
					import electrosphere.entity.types.camera.CameraEntityUtils;
 | 
				
			||||||
@ -68,7 +69,7 @@ public class DebugBonesPipeline implements RenderPipeline {
 | 
				
			|||||||
            //Get target data
 | 
					            //Get target data
 | 
				
			||||||
            //
 | 
					            //
 | 
				
			||||||
            Actor targetActor = EntityUtils.getActor(targetEntity);
 | 
					            Actor targetActor = EntityUtils.getActor(targetEntity);
 | 
				
			||||||
            Model boneModel = Globals.assetManager.fetchModel("Models/basic/geometry/unitcylinder.fbx");
 | 
					            Model boneModel = Globals.assetManager.fetchModel(AssetDataStrings.UNITCYLINDER);
 | 
				
			||||||
            boneModel.getMaterials().get(0).set_diffuse(Globals.textureDiffuseDefault);
 | 
					            boneModel.getMaterials().get(0).set_diffuse(Globals.textureDiffuseDefault);
 | 
				
			||||||
            for(Bone bone : targetActor.getBoneValues()){
 | 
					            for(Bone bone : targetActor.getBoneValues()){
 | 
				
			||||||
                Vector3d bonePos = MathBones.getBoneWorldPosition(targetEntity, bone.boneID);
 | 
					                Vector3d bonePos = MathBones.getBoneWorldPosition(targetEntity, bone.boneID);
 | 
				
			||||||
 | 
				
			|||||||
@ -13,6 +13,7 @@ import org.ode4j.ode.DSphere;
 | 
				
			|||||||
import electrosphere.collision.PhysicsUtils;
 | 
					import electrosphere.collision.PhysicsUtils;
 | 
				
			||||||
import electrosphere.collision.collidable.Collidable;
 | 
					import electrosphere.collision.collidable.Collidable;
 | 
				
			||||||
import electrosphere.engine.Globals;
 | 
					import electrosphere.engine.Globals;
 | 
				
			||||||
 | 
					import electrosphere.engine.assetmanager.AssetDataStrings;
 | 
				
			||||||
import electrosphere.entity.Entity;
 | 
					import electrosphere.entity.Entity;
 | 
				
			||||||
import electrosphere.entity.EntityDataStrings;
 | 
					import electrosphere.entity.EntityDataStrings;
 | 
				
			||||||
import electrosphere.entity.EntityUtils;
 | 
					import electrosphere.entity.EntityUtils;
 | 
				
			||||||
@ -78,7 +79,7 @@ public class DebugContentPipeline implements RenderPipeline {
 | 
				
			|||||||
                    if(geom instanceof DSphere){
 | 
					                    if(geom instanceof DSphere){
 | 
				
			||||||
                        DSphere sphereView = (DSphere)geom;
 | 
					                        DSphere sphereView = (DSphere)geom;
 | 
				
			||||||
                        HitboxState shapeStatus = hitboxState.getShapeStatus(geom);
 | 
					                        HitboxState shapeStatus = hitboxState.getShapeStatus(geom);
 | 
				
			||||||
                        if((hitboxModel = Globals.assetManager.fetchModel("Models/basic/geometry/unitsphere.glb")) != null){
 | 
					                        if((hitboxModel = Globals.assetManager.fetchModel(AssetDataStrings.UNITSPHERE)) != null){
 | 
				
			||||||
                            //set color based on collision status, type, etc
 | 
					                            //set color based on collision status, type, etc
 | 
				
			||||||
                            Texture texture = Globals.assetManager.fetchTexture(getHitboxColor(shapeStatus,shapeStatus.getHitboxData()));
 | 
					                            Texture texture = Globals.assetManager.fetchTexture(getHitboxColor(shapeStatus,shapeStatus.getHitboxData()));
 | 
				
			||||||
                            if(texture != null){
 | 
					                            if(texture != null){
 | 
				
			||||||
@ -133,7 +134,7 @@ public class DebugContentPipeline implements RenderPipeline {
 | 
				
			|||||||
                    if(geom instanceof DSphere){
 | 
					                    if(geom instanceof DSphere){
 | 
				
			||||||
                        DSphere sphereView = (DSphere)geom;
 | 
					                        DSphere sphereView = (DSphere)geom;
 | 
				
			||||||
                        HitboxState shapeStatus = hitboxState.getShapeStatus(geom);
 | 
					                        HitboxState shapeStatus = hitboxState.getShapeStatus(geom);
 | 
				
			||||||
                        if((hitboxModel = Globals.assetManager.fetchModel("Models/basic/geometry/unitsphere.glb")) != null){
 | 
					                        if((hitboxModel = Globals.assetManager.fetchModel(AssetDataStrings.UNITSPHERE)) != null){
 | 
				
			||||||
                            //set color based on collision status, type, etc
 | 
					                            //set color based on collision status, type, etc
 | 
				
			||||||
                            Texture texture = Globals.assetManager.fetchTexture(getHitboxColor(shapeStatus,shapeStatus.getHitboxData()));
 | 
					                            Texture texture = Globals.assetManager.fetchTexture(getHitboxColor(shapeStatus,shapeStatus.getHitboxData()));
 | 
				
			||||||
                            if(texture != null){
 | 
					                            if(texture != null){
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user