Skip to content

Commit

Permalink
cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
msx80 committed Apr 29, 2024
1 parent 0ca9b6a commit df31838
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion demo/FeatureDemo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</dependency>
<dependency>
<groupId>com.github.msx80.omicron</groupId>
<version>0.0.3</version>
<version>0.0.4</version>
<artifactId>omicron-desktop</artifactId>
<scope>test</scope>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion demo/FeatureDemoStandalone/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<dependencies>
<dependency>
<groupId>com.github.msx80.omicron</groupId>
<version>0.0.3</version>
<version>0.0.4</version>
<artifactId>omicron-desktop</artifactId>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,18 +98,18 @@ public NonBleedingSpriteBatch (int size) {
public NonBleedingSpriteBatch (int size, ShaderProgram defaultShader) {
// 32767 is max vertex index, so 32767 / 4 vertices per sprite = 8191 sprites max.
if (size > 8191) throw new IllegalArgumentException("Can't have more than 8191 sprites per batch: " + size);
System.out.println("ciccio1 "+Gdx.gl30);
//System.out.println("ciccio1 "+Gdx.gl30);
VertexDataType vertexDataType = (Gdx.gl30 != null) ? VertexDataType.VertexBufferObject : defaultVertexDataType;

mesh = new Mesh(vertexDataType, false, size * 4, size * 6,
new VertexAttribute(Usage.Position, 2, ShaderProgram.POSITION_ATTRIBUTE),
new VertexAttribute(Usage.ColorPacked, 4, ShaderProgram.COLOR_ATTRIBUTE),
new VertexAttribute(Usage.TextureCoordinates, 2, ShaderProgram.TEXCOORD_ATTRIBUTE + "0"));
System.out.println("ciccio2");
//System.out.println("ciccio2");
projectionMatrix.setToOrtho2D(0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());

vertices = new float[size * Sprite.SPRITE_SIZE];
System.out.println("ciccio3");
//System.out.println("ciccio3");
int len = size * 6;
short[] indices = new short[len];
short j = 0;
Expand All @@ -122,13 +122,13 @@ public NonBleedingSpriteBatch (int size, ShaderProgram defaultShader) {
indices[i + 5] = j;
}
mesh.setIndices(indices);
System.out.println("ciccio4");
//System.out.println("ciccio4");
if (defaultShader == null) {
shader = createDefaultShader();
ownsShader = true;
} else
shader = defaultShader;
System.out.println("ciccio5");
//System.out.println("ciccio5");
}

/** Returns a new instance of the default shader used by SpriteBatch for GL2 when no shader is specified. */
Expand Down

0 comments on commit df31838

Please sign in to comment.