Skip to content

Commit

Permalink
Remove throwNotYetPortedException()
Browse files Browse the repository at this point in the history
  • Loading branch information
integeruser committed Nov 19, 2016
1 parent 92ad15a commit 11ffffc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 22 deletions.
2 changes: 1 addition & 1 deletion src/integeruser/jglsdk/glimg/DdsLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ private static ImageSet.Dimensions getDimensions(DdsHeader ddsHeader) {

private static ImageFormat.UncheckedImageFormat getFormat(DdsHeader ddsHeader, Dds10Header dds10Header) throws DdsFileUnsupportedException {
if (dds10Header.dxgiFormat != DxgiFormat.UNKNOWN) {
Util.throwNotYetPortedException();
throw new RuntimeException("Not implemented.");
}

for (OldDdsFormatConv oldFormatConvert : DdsLoader.oldFormatConvert) {
Expand Down
8 changes: 3 additions & 5 deletions src/integeruser/jglsdk/glimg/ImageCreator.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ void setImageData(byte sourceData[], boolean isTopLeft, int mipmapLevel, int arr
byte[] imageData = this.imageData.get(mipmapLevel);

if (!isTopLeft) {
Util.throwNotYetPortedException();
throw new RuntimeException("Not implemented.");
} else {
int imageDataOffset = ((arrayIx * faceCount) + faceIx) * imageSizes[mipmapLevel];
copyImageFlipped(sourceData, imageData, imageDataOffset, mipmapLevel);
Expand Down Expand Up @@ -100,8 +100,7 @@ private void copyImageFlipped(byte[] sourceData, byte[] imageData, int imageData
break;

default:
Util.throwNotYetPortedException();
break;
throw new RuntimeException("Not implemented.");
}
}
}
Expand Down Expand Up @@ -170,8 +169,7 @@ private void flippingFunc(ImageFormat imageFormat, byte[] sourceData, byte[] ima
break;

default:
Util.throwNotYetPortedException();
break;
throw new RuntimeException("Not implemented.");
}
}

Expand Down
17 changes: 7 additions & 10 deletions src/integeruser/jglsdk/glimg/TextureGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -1051,8 +1051,7 @@ private static void createTexture(int textureName, ImageSet imageSet, int forceC
break;

default:
Util.throwNotYetPortedException();
break;
throw new RuntimeException("Not implemented.");
}
}

Expand Down Expand Up @@ -1104,7 +1103,7 @@ private static void setupUploadState(ImageFormat imageFormat, int forceConvertBi
private static void texStorageBase(int textureTarget, int forceConvertBits, Dimensions imageDimensions, int numMipmaps,
int internalFormat, OpenGLPixelTransferParams upload, int textureName) {
if ((forceConvertBits & ForcedConvertFlags.USE_TEXTURE_STORAGE) != 0) {
Util.throwNotYetPortedException();
throw new RuntimeException("Not implemented.");
} else {
manTexStorageBase(textureName, textureTarget, imageDimensions, numMipmaps, internalFormat, upload);
}
Expand All @@ -1119,7 +1118,7 @@ private static void manTexStorageBase(int texture, int textureTarget, Dimensions
manTexStorageBase(textureTarget, imageDimensions, numMipmaps, internalFormat, upload);
return;
}
Util.throwNotYetPortedException();
throw new RuntimeException("Not implemented.");
}

private static void manTexStorageBase(int textureTarget, Dimensions imageDimensions, int numMipmaps,
Expand All @@ -1128,17 +1127,15 @@ private static void manTexStorageBase(int textureTarget, Dimensions imageDimensi
Dimensions levelDims = Util.calcMipmapLevelDimensions(imageDimensions, mipmap);
switch (imageDimensions.numDimensions) {
case 1:
Util.throwNotYetPortedException();
break;
throw new RuntimeException("Not implemented.");

case 2:
glTexImage2D(textureTarget, mipmap, internalFormat, levelDims.width, levelDims.height, 0,
upload.format, upload.type, (ByteBuffer) null);
break;

case 3:
Util.throwNotYetPortedException();
break;
throw new RuntimeException("Not implemented.");
}
}
}
Expand All @@ -1151,7 +1148,7 @@ private static void texSubImage(int texture, int textureTarget, int mipmapLevel,
texSubImage(textureTarget, mipmapLevel, internalFormat, imageDimensions, upload, imageData, imageSize);
return;
}
Util.throwNotYetPortedException();
throw new RuntimeException("Not implemented.");
}

private static void texSubImage(int textureTarget, int mipmapLevel, int internalFormat, Dimensions imageDimensions,
Expand Down Expand Up @@ -1194,7 +1191,7 @@ private static void finalizeTexture(int texture, int textureTarget, ImageSet ima
finalizeTexture(textureTarget, imageSet);
return;
}
Util.throwNotYetPortedException();
throw new RuntimeException("Not implemented.");
}

// Texture must be bound to the target.
Expand Down
6 changes: 0 additions & 6 deletions src/integeruser/jglsdk/glimg/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,4 @@ static int calcMipmapLevelSize(ImageFormat imageFormat, Dimensions mipmapLevelDi
return lineSize;
}
}

////////////////////////////////
public static void throwNotYetPortedException() {
throw new RuntimeException("The feature requested isn't supported at the moment. " +
"If you want ask me to implement it in the project official page.");
}
}

0 comments on commit 11ffffc

Please sign in to comment.