Skip to content

Commit

Permalink
fix: partial fix for #26
Browse files Browse the repository at this point in the history
- All Image data upto the STBWrapper is correct.
- TODO: Further Testing

Signed-off-by: AterAnimAvis <[email protected]>
  • Loading branch information
AterAnimAvis committed May 3, 2021
1 parent 616b5e4 commit a0f162e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ public void forEach(IntConsumer consumer) {
}
}

public int[] getRawBuffer() {
return buffer;
}

public int getPixelRGBA(int x, int y) {
return buffer[x + y * width];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public boolean endTile() {
GL11.glPixelStorei(GL11.GL_PACK_ROW_LENGTH, imageWidth);
GL11.glPixelStorei(GL11.GL_PACK_SKIP_ROWS, destY);
GL11.glPixelStorei(GL11.GL_PACK_SKIP_PIXELS, destX);
GL11.glPixelStorei(GL11.GL_PACK_ALIGNMENT, 1);
GL11.glPixelStorei(GL11.GL_PACK_ALIGNMENT, 4);

/* Read the tile into the final image */
GL11.glReadPixels(srcX, srcY, srcWidth, srcHeight, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, buffer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public void blendFunction(

@Override
public void resetClearColor() {
RenderSystem.clearColor(0, 0, 0, 0);
RenderSystem.clearColor(1F, 1F, 1F, 0F);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public void blendFunction(

@Override
public void resetClearColor() {
RenderSystem.clearColor(0, 0, 0, 0);
RenderSystem.clearColor(1F, 1F, 1F, 0F);
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ yarnBuild =9.mcp.snapshot.20201028.1.16.3

##################################### Mod #####################################
modId =block_renderer
modVersion =1.5.3
modVersion =1.5.4-snapshot
modGroup =com.unascribed
vendor =AterAnimAvis

Expand Down

0 comments on commit a0f162e

Please sign in to comment.