[DEV] commit all with new insland

This commit is contained in:
Edouard DUPIN 2022-03-20 23:39:27 +01:00
parent f7345bcfb2
commit 548188c24a
5 changed files with 29 additions and 10 deletions

2
.gitignore vendored
View File

@ -1,3 +1,5 @@
/__pycache__/
/bin/ /bin/
/Operator/ /Operator/
/DrawerProperties/ /DrawerProperties/

View File

@ -21,4 +21,15 @@
<nature>org.eclipse.jdt.core.javanature</nature> <nature>org.eclipse.jdt.core.javanature</nature>
<nature>net.sf.eclipsecs.core.CheckstyleNature</nature> <nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
</natures> </natures>
<filteredResources>
<filter>
<id>1646149232195</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription> </projectDescription>

View File

@ -324,6 +324,11 @@ public class ResourceColored3DObject extends Resource {
} }
public void drawCylinder(final float radius, final float size, final int lats, final int longs, final Matrix4f transformationMatrix, final Color tmpColor) { public void drawCylinder(final float radius, final float size, final int lats, final int longs, final Matrix4f transformationMatrix, final Color tmpColor) {
drawCylinder(radius, size, lats, longs, transformationMatrix, tmpColor, true, true);
}
public void drawCylinder(final float radius, final float size, final int lats, final int longs, final Matrix4f transformationMatrix, final Color tmpColor, final boolean updateDepthBuffer,
final boolean depthtest) {
final List<Vector3f> tmpVertices = new ArrayList<>(); final List<Vector3f> tmpVertices = new ArrayList<>();
// center to border (TOP) // center to border (TOP)
@ -390,7 +395,7 @@ public class ResourceColored3DObject extends Resource {
tmpVertices.add(v2); tmpVertices.add(v2);
tmpVertices.add(v3); tmpVertices.add(v3);
} }
draw(tmpVertices, tmpColor, transformationMatrix, true, true); draw(tmpVertices, tmpColor, transformationMatrix, updateDepthBuffer, depthtest);
} }
public void drawLine(final List<Vector3f> vertices, final Color color, final Matrix4f transformationMatrix, final boolean updateDepthBuffer, final boolean depthtest) { public void drawLine(final List<Vector3f> vertices, final Color color, final Matrix4f transformationMatrix, final boolean updateDepthBuffer, final boolean depthtest) {

View File

@ -13,7 +13,6 @@ import org.atriasoft.gale.backend3d.OpenGL;
import org.atriasoft.gale.backend3d.OpenGL.RenderMode; import org.atriasoft.gale.backend3d.OpenGL.RenderMode;
import org.atriasoft.gale.backend3d.OpenGL.Usage; import org.atriasoft.gale.backend3d.OpenGL.Usage;
import org.atriasoft.gale.internal.Log; import org.atriasoft.gale.internal.Log;
import org.lwjgl.BufferUtils; import org.lwjgl.BufferUtils;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL15; import org.lwjgl.opengl.GL15;
@ -285,14 +284,14 @@ public class ResourceVirtualArrayObject extends Resource {
OpenGL.drawElements(mode, this.vertexCount); OpenGL.drawElements(mode, this.vertexCount);
} }
public void render(final RenderMode mode, final int start, final int stop) {
OpenGL.drawArrays(mode, start, stop);
}
public void renderArrays(final RenderMode mode) { public void renderArrays(final RenderMode mode) {
Log.verbose("request rendering direct : " + this.vertexCount); Log.verbose("request rendering direct : " + this.vertexCount);
OpenGL.drawArrays(mode, 0, this.vertexCount); OpenGL.drawArrays(mode, 0, this.vertexCount);
} }
public void render(final RenderMode mode, final int start, final int stop) {
OpenGL.drawArrays(mode, start, stop);
}
public void setColors(final Color[] colors) { public void setColors(final Color[] colors) {
this.colors = colors; this.colors = colors;
@ -368,13 +367,13 @@ public class ResourceVirtualArrayObject extends Resource {
// select the buffer to set data inside it ... // select the buffer to set data inside it ...
if (data instanceof float[] buffer) { if (data instanceof float[] buffer) {
OpenGL.bufferData(buffer, usage); OpenGL.bufferData(buffer, usage);
} else if (data instanceof int[]buffer) { } else if (data instanceof int[] buffer) {
OpenGL.bufferData(buffer, usage); OpenGL.bufferData(buffer, usage);
} else if (data instanceof Vector2f[]buffer) { } else if (data instanceof Vector2f[] buffer) {
OpenGL.bufferData(buffer, usage); OpenGL.bufferData(buffer, usage);
} else if (data instanceof Vector3f[]buffer) { } else if (data instanceof Vector3f[] buffer) {
OpenGL.bufferData(buffer, usage); OpenGL.bufferData(buffer, usage);
} else if (data instanceof Color[]buffer) { } else if (data instanceof Color[] buffer) {
OpenGL.bufferData(buffer, usage); OpenGL.bufferData(buffer, usage);
} else { } else {
Log.error("Not managed VBO model : " + data.getClass().getCanonicalName()); Log.error("Not managed VBO model : " + data.getClass().getCanonicalName());

2
test/.gitignore vendored
View File

@ -1 +1,3 @@
/__pycache__/
/bin/ /bin/