Interface RenderDataAPI
- All Known Implementing Classes:
AreaLight,BaseIlluminantData,BaseInstanceRenderData,BaseMIRenderData,BaseRenderData,CommonEntity,CurveEntity,DistortionEntity,FlareEntity,InfiniteLight,LinearLight,PointLight,SegmentEntity,SpotLight,SpriteEntity,TextFieldEntity,TrailEntity
-
Method Summary
Modifier and TypeMethodDescriptionvoidadvanceGlobalTimer(float amount, boolean isPausedNow) Automatic running, not required to call it.voidappendToEntity(com.fs.starfarer.api.combat.CombatEntityAPI target) voidappendToEntity(com.fs.starfarer.api.combat.CombatEntityAPI target, float offsetAngle) voidappendToEntity(com.fs.starfarer.api.combat.CombatEntityAPI target, float offsetAngle, org.lwjgl.util.vector.Vector2f scale) voidappendToEntity(com.fs.starfarer.api.combat.CombatEntityAPI target, float offsetAngle, org.lwjgl.util.vector.Vector3f scale) voiddelete()intintintintintbytecom.fs.starfarer.api.campaign.CampaignEngineLayerscom.fs.starfarer.api.combat.CombatEngineLayersfloat[]floatbytegetLayer()org.lwjgl.util.vector.Matrix4forg.lwjgl.util.vector.Matrix4fWhen upload a custom prime matrix, callsetCustomPrimeMatrix()with this method.bytevoidglDraw()booleanvoidvoidbooleanbooleanbooleanbooleanbooleanbooleanbooleanOnly for system rendering calls, not applicable to developer.Only for system rendering calls, not applicable to developer.Only for system rendering calls, not applicable to developer.voidreset()voidvoidsetAutoSubmitEntityData(boolean toggleAuto) Enabling auto-submit incurs a slight memory copy overhead (default behavior, also with potential heap memory allocation).voidsetAutoSubmitModelMatrix(boolean toggleAuto) Enabling auto-submit incurs a slight memory copy overhead (default behavior, also with potential heap memory allocation).voidsetAutoSubmitPrimeMatrix(boolean toggleAuto) Enabling auto-submit incurs a slight memory copy overhead (default behavior, also with potential heap memory allocation).voidsetBlendEquation(int mode) voidsetBlendFunc(int srcFactor, int dstFactor) voidsetBlendFuncSeparate(int srcColorFactor, int dstColorFactor, int srcAlphaFactor, int dstAlphaFactor) voidsetControlData(ControlDataAPI data) For custom your rendering entity.setCustomData(Object value) voidvoidvoidvoidvoidsetFacingScale(float facing, float scaleX, float scaleY) voidsetGlobalTimer(float fadeIn, float full, float fadeOut) voidFor once frame rendering instance data, should use fixed type instance data.voidvoidsetLocation(float x, float y) voidsetLocation(float x, float y, float z) voidsetLocation(org.lwjgl.util.vector.Vector2f location) voidsetLocation(org.lwjgl.util.vector.Vector3f location) voidsetModelMatrix(org.lwjgl.util.vector.Matrix4f modelMatrix) voidAs custom blend mode.voidvoidDefault blend mode.voidvoidsetPrimeMatrix(org.lwjgl.util.vector.Matrix4f primeMatrix) Generally, in there it is viewport and camera matrix, means 'main' not 'prime matrix'.voidsetRotateScale(org.lwjgl.util.vector.Vector3f rotate, org.lwjgl.util.vector.Vector3f scale) voidsetStateVanilla(org.lwjgl.util.vector.Vector2f location, float facing) voidsetStateVanilla(org.lwjgl.util.vector.Vector2f location, float facing, org.lwjgl.util.vector.Vector2f scale) voidsetTimerPaused(boolean paused) Block timer even if not in paused.voidsetTimingWhenPaused(boolean timing) Affects entity timer, and instance data.voidvoidWithout matrix data or timer settings.voidvoidOnly required when use a custom prime matrix.
-
Method Details
-
delete
void delete() -
hasDelete
boolean hasDelete()- Returns:
- Should not use this entity when true.
-
glDraw
void glDraw() -
reset
void reset() -
isAutoSubmitEntityData
boolean isAutoSubmitEntityData() -
setAutoSubmitEntityData
void setAutoSubmitEntityData(boolean toggleAuto) Enabling auto-submit incurs a slight memory copy overhead (default behavior, also with potential heap memory allocation).If data changes are infrequent, you may disable this feature and use
submitEntityData()for manual submits instead, which can reduce unnecessary memory copies to a certain extent. -
submitEntityData
void submitEntityData()Without matrix data or timer settings. -
getControlData
ControlDataAPI getControlData() -
setControlData
For custom your rendering entity.Always execute
ControlDataAPI.controlInit(RenderDataAPI)when call this method.More than one
RenderDataAPIentities always can be using a same data entity. -
getCustomData
Object getCustomData() -
setCustomData
-
getGlobalTimer
float[] getGlobalTimer() -
setGlobalTimer
void setGlobalTimer(float fadeIn, float full, float fadeOut) -
advanceGlobalTimer
void advanceGlobalTimer(float amount, boolean isPausedNow) Automatic running, not required to call it. -
getGlobalTimerState
byte getGlobalTimerState() -
getGlobalTimerAlpha
float getGlobalTimerAlpha() -
isGlobalTimerOver
boolean isGlobalTimerOver() -
isGlobalTimerOnce
boolean isGlobalTimerOnce() -
setGlobalTimerOnce
void setGlobalTimerOnce()For once frame rendering instance data, should use fixed type instance data. -
isTimingWhenPaused
boolean isTimingWhenPaused() -
setTimingWhenPaused
void setTimingWhenPaused(boolean timing) Affects entity timer, and instance data. -
isTimerPaused
boolean isTimerPaused() -
setTimerPaused
void setTimerPaused(boolean paused) Block timer even if not in paused. -
getPrimeMatrix
org.lwjgl.util.vector.Matrix4f getPrimeMatrix() -
getPrimeMatrixBuffer
FloatBuffer getPrimeMatrixBuffer()When upload a custom prime matrix, callsetCustomPrimeMatrix()with this method.- Returns:
- 4x4 matrix in buffer with 16 capacity.
-
isAutoSubmitPrimeMatrix
boolean isAutoSubmitPrimeMatrix() -
setAutoSubmitPrimeMatrix
void setAutoSubmitPrimeMatrix(boolean toggleAuto) Enabling auto-submit incurs a slight memory copy overhead (default behavior, also with potential heap memory allocation).If data changes are infrequent, you may disable this feature and use
submitPrimeMatrix()for manual submits instead, which can reduce unnecessary memory copies to a certain extent.Alternatively, use
getPrimeMatrixBuffer()to directly operate on the corresponding buffer after this feature was disabled; -
submitPrimeMatrix
void submitPrimeMatrix()Only required when use a custom prime matrix. -
initIdentityPrimeMatrix
void initIdentityPrimeMatrix() -
setPrimeMatrix
void setPrimeMatrix(org.lwjgl.util.vector.Matrix4f primeMatrix) Generally, in there it is viewport and camera matrix, means 'main' not 'prime matrix'.In shader program: [this matrix * model matrix * vertex]
Must call
setCustomPrimeMatrix()if use it.- Parameters:
primeMatrix- for usual, this is a matrix as [Projection * Look-at].
-
getPrimeMatrixState
byte getPrimeMatrixState() -
setVanillaPrimeMatrix
void setVanillaPrimeMatrix() -
setPerspectivePrimeMatrix
void setPerspectivePrimeMatrix() -
setCustomPrimeMatrix
void setCustomPrimeMatrix() -
setNonePrimeMatrix
void setNonePrimeMatrix() -
getModelMatrix
org.lwjgl.util.vector.Matrix4f getModelMatrix() -
getModelMatrixBuffer
FloatBuffer getModelMatrixBuffer()- Returns:
- 4x4 matrix in buffer with 16 capacity.
-
isAutoSubmitModelMatrix
boolean isAutoSubmitModelMatrix() -
setAutoSubmitModelMatrix
void setAutoSubmitModelMatrix(boolean toggleAuto) Enabling auto-submit incurs a slight memory copy overhead (default behavior, also with potential heap memory allocation).If data changes are infrequent, you may disable this feature and use
submitModelMatrix()for manual submits instead, which can reduce unnecessary memory copies to a certain extent.Alternatively, use
getModelMatrixBuffer()to directly operate on the corresponding buffer after this feature was disabled; -
submitModelMatrix
void submitModelMatrix() -
initIdentityModelMatrix
void initIdentityModelMatrix() -
setModelMatrix
void setModelMatrix(@NotNull org.lwjgl.util.vector.Matrix4f modelMatrix) - Parameters:
modelMatrix- for usual, this is a model matrix.
-
setLocation
void setLocation(float x, float y) -
setLocation
void setLocation(float x, float y, float z) -
setLocation
void setLocation(org.lwjgl.util.vector.Vector2f location) -
setLocation
void setLocation(org.lwjgl.util.vector.Vector3f location) -
setFacingScale
void setFacingScale(float facing, float scaleX, float scaleY) -
setRotateScale
void setRotateScale(org.lwjgl.util.vector.Vector3f rotate, org.lwjgl.util.vector.Vector3f scale) -
setStateVanilla
void setStateVanilla(org.lwjgl.util.vector.Vector2f location, float facing, org.lwjgl.util.vector.Vector2f scale) -
setStateVanilla
void setStateVanilla(org.lwjgl.util.vector.Vector2f location, float facing) -
appendToEntity
void appendToEntity(com.fs.starfarer.api.combat.CombatEntityAPI target, float offsetAngle, org.lwjgl.util.vector.Vector3f scale) -
appendToEntity
void appendToEntity(com.fs.starfarer.api.combat.CombatEntityAPI target, float offsetAngle, org.lwjgl.util.vector.Vector2f scale) -
appendToEntity
void appendToEntity(com.fs.starfarer.api.combat.CombatEntityAPI target, float offsetAngle) -
appendToEntity
void appendToEntity(com.fs.starfarer.api.combat.CombatEntityAPI target) -
pickPrimeMatrixPackage_mat4
FloatBuffer pickPrimeMatrixPackage_mat4()Only for system rendering calls, not applicable to developer. -
pickModelMatrixPackage_mat4
FloatBuffer pickModelMatrixPackage_mat4()Only for system rendering calls, not applicable to developer. -
pickDataPackage_vec4
FloatBuffer pickDataPackage_vec4()Only for system rendering calls, not applicable to developer. -
getBlendColorSRC
int getBlendColorSRC() -
getBlendAlphaSRC
int getBlendAlphaSRC() -
getBlendColorDST
int getBlendColorDST() -
getBlendAlphaDST
int getBlendAlphaDST() -
getBlendEquation
int getBlendEquation() -
getBlendState
byte getBlendState() -
setBlendFunc
void setBlendFunc(int srcFactor, int dstFactor) - See Also:
-
GL11.glBlendFunc(int, int)
-
setBlendFuncSeparate
void setBlendFuncSeparate(int srcColorFactor, int dstColorFactor, int srcAlphaFactor, int dstAlphaFactor) - See Also:
-
GL14.glBlendFuncSeparate(int, int, int, int)
-
setBlendEquation
void setBlendEquation(int mode) - See Also:
-
GL14.glBlendEquation(int)
-
setAdditiveBlend
void setAdditiveBlend() -
setNormalBlend
void setNormalBlend()Default blend mode. -
setNegativeBlend
void setNegativeBlend()As custom blend mode. -
setDisableBlend
void setDisableBlend() -
getLayer
Object getLayer() -
getCombatLayer
com.fs.starfarer.api.combat.CombatEngineLayers getCombatLayer() -
getCampaignLayer
com.fs.starfarer.api.campaign.CampaignEngineLayers getCampaignLayer() -
setLayer
-
setDefaultCombatLayer
void setDefaultCombatLayer() -
setDefaultCampaignLayer
void setDefaultCampaignLayer() -
entityType
Object entityType()
-