Package icyllis.arc3d.opengl
Class GLImageDesc
java.lang.Object
icyllis.arc3d.engine.ImageDesc
icyllis.arc3d.opengl.GLImageDesc
Descriptor to create OpenGL images (textures and renderbuffers). The
mFormat
here
should be a sized, internal format for the texture. We use the sized format since the
base internal formats are deprecated.
Note the target can be GL30C.GL_RENDERBUFFER
.
-
Field Summary
Modifier and TypeFieldDescriptionfinal int
GLenum
- sized internal formatfinal int
GLenum
- image namespaceFields inherited from class icyllis.arc3d.engine.ImageDesc
mArraySize, mDepth, mFlags, mHeight, mImageType, mMipLevelCount, mSampleCount, mWidth
-
Constructor Summary
ConstructorDescriptionGLImageDesc
(int target, int format, int width, int height, int depth, int arraySize, int mipLevelCount, int sampleCount, int flags) -
Method Summary
Methods inherited from class icyllis.arc3d.engine.ImageDesc
getArraySize, getDepth, getHeight, getImageType, getMipLevelCount, getSampleCount, getVkFormat, getWidth, isCompressed, isMipmapped, isMultisampled, isProtected, isRenderable, isSampledImage, isStorageImage
-
Field Details
-
mTarget
public final int mTargetGLenum
- image namespace -
mFormat
public final int mFormatGLenum
- sized internal format
-
-
Constructor Details
-
GLImageDesc
public GLImageDesc(int target, int format, int width, int height, int depth, int arraySize, int mipLevelCount, int sampleCount, int flags)
-
-
Method Details
-
getBackend
public int getBackend()- Specified by:
getBackend
in classImageDesc
- Returns:
- see
Engine.BackendApi
-
getGLFormat
public int getGLFormat()Description copied from class:ImageDesc
If the backend API is OpenGL this gets the format as a GLenum.- Overrides:
getGLFormat
in classImageDesc
-
getChannelFlags
public int getChannelFlags()Description copied from class:ImageDesc
Gets the channels present in the format as a bitfield of ColorChannelFlag values.- Overrides:
getChannelFlags
in classImageDesc
- See Also:
-
isSRGB
public boolean isSRGB() -
getCompressionType
public int getCompressionType()- Overrides:
getCompressionType
in classImageDesc
- See Also:
-
getBytesPerBlock
public int getBytesPerBlock()- Overrides:
getBytesPerBlock
in classImageDesc
- Returns:
- if compressed, bytes per block, otherwise bytes per pixel
-
getDepthBits
public int getDepthBits()- Overrides:
getDepthBits
in classImageDesc
-
getStencilBits
public int getStencilBits()- Overrides:
getStencilBits
in classImageDesc
-
hashCode
public int hashCode() -
equals
-
toString
-