mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-30 16:45:14 -04:00
Loading all additional textures in one go, seems to prevent issue described in #216.
This commit is contained in:
parent
b982c218a3
commit
90c89c2d35
@ -2,6 +2,7 @@ package li.cil.oc.client
|
|||||||
|
|
||||||
import li.cil.oc.Settings
|
import li.cil.oc.Settings
|
||||||
import net.minecraft.util.ResourceLocation
|
import net.minecraft.util.ResourceLocation
|
||||||
|
import net.minecraft.client.renderer.texture.TextureManager
|
||||||
|
|
||||||
object Textures {
|
object Textures {
|
||||||
val fontAntiAliased = new ResourceLocation(Settings.resourceDomain, "textures/font/chars.png")
|
val fontAntiAliased = new ResourceLocation(Settings.resourceDomain, "textures/font/chars.png")
|
||||||
@ -28,4 +29,31 @@ object Textures {
|
|||||||
|
|
||||||
val upgradeCrafting = new ResourceLocation(Settings.resourceDomain, "textures/items/upgrade_crafting_equipped.png")
|
val upgradeCrafting = new ResourceLocation(Settings.resourceDomain, "textures/items/upgrade_crafting_equipped.png")
|
||||||
val upgradeGenerator = new ResourceLocation(Settings.resourceDomain, "textures/items/upgrade_generator_equipped.png")
|
val upgradeGenerator = new ResourceLocation(Settings.resourceDomain, "textures/items/upgrade_generator_equipped.png")
|
||||||
|
|
||||||
|
def init(tm: TextureManager) {
|
||||||
|
tm.bindTexture(fontAntiAliased)
|
||||||
|
tm.bindTexture(fontAliased)
|
||||||
|
|
||||||
|
tm.bindTexture(guiBackground)
|
||||||
|
tm.bindTexture(guiBorders)
|
||||||
|
tm.bindTexture(guiButtonPower)
|
||||||
|
tm.bindTexture(guiButtonRange)
|
||||||
|
tm.bindTexture(guiButtonSide)
|
||||||
|
tm.bindTexture(guiComputer)
|
||||||
|
tm.bindTexture(guiRange)
|
||||||
|
tm.bindTexture(guiRobot)
|
||||||
|
tm.bindTexture(guiRobotSelection)
|
||||||
|
tm.bindTexture(guiServer)
|
||||||
|
tm.bindTexture(guiSlot)
|
||||||
|
|
||||||
|
tm.bindTexture(blockCable)
|
||||||
|
tm.bindTexture(blockCaseFrontOn)
|
||||||
|
tm.bindTexture(blockHologram)
|
||||||
|
tm.bindTexture(blockRackFrontOn)
|
||||||
|
tm.bindTexture(blockRobot)
|
||||||
|
tm.bindTexture(blockScreenUpIndicator)
|
||||||
|
|
||||||
|
tm.bindTexture(upgradeCrafting)
|
||||||
|
tm.bindTexture(upgradeGenerator)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,7 @@ object BufferRenderer {
|
|||||||
textureManager = Some(tm)
|
textureManager = Some(tm)
|
||||||
displayLists = GLAllocation.generateDisplayLists(2)
|
displayLists = GLAllocation.generateDisplayLists(2)
|
||||||
RenderState.checkError("BufferRenderer.displayLists")
|
RenderState.checkError("BufferRenderer.displayLists")
|
||||||
|
Textures.init(tm)
|
||||||
})
|
})
|
||||||
|
|
||||||
def compileBackground(bufferWidth: Int, bufferHeight: Int) =
|
def compileBackground(bufferWidth: Int, bufferHeight: Int) =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user