mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-17 19:35:00 -04:00
it: dummy render system
This commit is contained in:
parent
372853d661
commit
a0296f74cf
@ -26,5 +26,6 @@ class RenderTestLoader {
|
|||||||
RenderTestUtil.rendering.start(latch)
|
RenderTestUtil.rendering.start(latch)
|
||||||
latch.dec()
|
latch.dec()
|
||||||
latch.await()
|
latch.await()
|
||||||
|
RenderTestUtil.context = RenderTestUtil.rendering.renderWindow
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -95,11 +95,11 @@ class DummyRenderSystem(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun createIntUniformBuffer(data: IntArray): IntUniformBuffer {
|
override fun createIntUniformBuffer(data: IntArray): IntUniformBuffer {
|
||||||
return DummyIntUniformBuffer()
|
return DummyIntUniformBuffer(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun createFloatUniformBuffer(data: FloatBuffer): FloatUniformBuffer {
|
override fun createFloatUniformBuffer(data: FloatBuffer): FloatUniformBuffer {
|
||||||
return DummyFloatUniformBuffer()
|
return DummyFloatUniformBuffer(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun createFramebuffer(): Framebuffer {
|
override fun createFramebuffer(): Framebuffer {
|
||||||
|
@ -19,48 +19,35 @@ import de.bixilon.minosoft.gui.rendering.system.base.buffer.uniform.FloatUniform
|
|||||||
import de.bixilon.minosoft.gui.rendering.system.base.shader.NativeShader
|
import de.bixilon.minosoft.gui.rendering.system.base.shader.NativeShader
|
||||||
import java.nio.FloatBuffer
|
import java.nio.FloatBuffer
|
||||||
|
|
||||||
class DummyFloatUniformBuffer : FloatUniformBuffer {
|
class DummyFloatUniformBuffer(
|
||||||
override val bindingIndex: Int
|
override var buffer: FloatBuffer,
|
||||||
get() = TODO("Not yet implemented")
|
) : FloatUniformBuffer {
|
||||||
|
override val bindingIndex: Int = 0
|
||||||
|
|
||||||
override fun upload(range: IntRange) {
|
override fun upload(range: IntRange) {
|
||||||
TODO("Not yet implemented")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun upload() {
|
override fun upload() {
|
||||||
TODO("Not yet implemented")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun use(shader: NativeShader, bufferName: String) {
|
override fun use(shader: NativeShader, bufferName: String) {
|
||||||
TODO("Not yet implemented")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override val state: RenderableBufferStates
|
override val state: RenderableBufferStates = RenderableBufferStates.UPLOADED
|
||||||
get() = TODO("Not yet implemented")
|
override val type: RenderableBufferTypes = RenderableBufferTypes.UNIFORM_BUFFER
|
||||||
override val type: RenderableBufferTypes
|
|
||||||
get() = TODO("Not yet implemented")
|
|
||||||
|
|
||||||
override fun init() {
|
override fun init() {
|
||||||
TODO("Not yet implemented")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun initialUpload() {
|
override fun initialUpload() {
|
||||||
TODO("Not yet implemented")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun bind() {
|
override fun bind() {
|
||||||
TODO("Not yet implemented")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun unbind() {
|
override fun unbind() {
|
||||||
TODO("Not yet implemented")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun unload() {
|
override fun unload() {
|
||||||
TODO("Not yet implemented")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override var buffer: FloatBuffer
|
|
||||||
get() = TODO("Not yet implemented")
|
|
||||||
set(value) {}
|
|
||||||
}
|
}
|
||||||
|
@ -18,48 +18,35 @@ import de.bixilon.minosoft.gui.rendering.system.base.buffer.RenderableBufferType
|
|||||||
import de.bixilon.minosoft.gui.rendering.system.base.buffer.uniform.IntUniformBuffer
|
import de.bixilon.minosoft.gui.rendering.system.base.buffer.uniform.IntUniformBuffer
|
||||||
import de.bixilon.minosoft.gui.rendering.system.base.shader.NativeShader
|
import de.bixilon.minosoft.gui.rendering.system.base.shader.NativeShader
|
||||||
|
|
||||||
class DummyIntUniformBuffer : IntUniformBuffer {
|
class DummyIntUniformBuffer(
|
||||||
override val bindingIndex: Int
|
override var data: IntArray,
|
||||||
get() = TODO("Not yet implemented")
|
) : IntUniformBuffer {
|
||||||
|
override val bindingIndex: Int = 0
|
||||||
|
|
||||||
override fun upload(range: IntRange) {
|
override fun upload(range: IntRange) {
|
||||||
TODO("Not yet implemented")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun upload() {
|
override fun upload() {
|
||||||
TODO("Not yet implemented")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun use(shader: NativeShader, bufferName: String) {
|
override fun use(shader: NativeShader, bufferName: String) {
|
||||||
TODO("Not yet implemented")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override val state: RenderableBufferStates
|
override val state: RenderableBufferStates = RenderableBufferStates.UPLOADED
|
||||||
get() = TODO("Not yet implemented")
|
override val type: RenderableBufferTypes = RenderableBufferTypes.UNIFORM_BUFFER
|
||||||
override val type: RenderableBufferTypes
|
|
||||||
get() = TODO("Not yet implemented")
|
|
||||||
|
|
||||||
override fun init() {
|
override fun init() {
|
||||||
TODO("Not yet implemented")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun initialUpload() {
|
override fun initialUpload() {
|
||||||
TODO("Not yet implemented")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun bind() {
|
override fun bind() {
|
||||||
TODO("Not yet implemented")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun unbind() {
|
override fun unbind() {
|
||||||
TODO("Not yet implemented")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun unload() {
|
override fun unload() {
|
||||||
TODO("Not yet implemented")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override var data: IntArray
|
|
||||||
get() = TODO("Not yet implemented")
|
|
||||||
set(value) {}
|
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@ package de.bixilon.minosoft.gui.rendering.system.dummy.texture
|
|||||||
import de.bixilon.kutil.collections.CollectionUtil.synchronizedMapOf
|
import de.bixilon.kutil.collections.CollectionUtil.synchronizedMapOf
|
||||||
import de.bixilon.kutil.latch.CountUpAndDownLatch
|
import de.bixilon.kutil.latch.CountUpAndDownLatch
|
||||||
import de.bixilon.minosoft.data.registries.ResourceLocation
|
import de.bixilon.minosoft.data.registries.ResourceLocation
|
||||||
|
import de.bixilon.minosoft.gui.rendering.system.base.RenderSystem
|
||||||
import de.bixilon.minosoft.gui.rendering.system.base.shader.NativeShader
|
import de.bixilon.minosoft.gui.rendering.system.base.shader.NativeShader
|
||||||
import de.bixilon.minosoft.gui.rendering.system.base.texture.SpriteAnimator
|
import de.bixilon.minosoft.gui.rendering.system.base.texture.SpriteAnimator
|
||||||
import de.bixilon.minosoft.gui.rendering.system.base.texture.StaticTextureArray
|
import de.bixilon.minosoft.gui.rendering.system.base.texture.StaticTextureArray
|
||||||
@ -23,10 +24,9 @@ import de.bixilon.minosoft.gui.rendering.system.base.texture.TextureArrayStates
|
|||||||
import de.bixilon.minosoft.gui.rendering.system.base.texture.TextureStates
|
import de.bixilon.minosoft.gui.rendering.system.base.texture.TextureStates
|
||||||
import de.bixilon.minosoft.gui.rendering.system.base.texture.texture.AbstractTexture
|
import de.bixilon.minosoft.gui.rendering.system.base.texture.texture.AbstractTexture
|
||||||
|
|
||||||
class DummyStaticTextureArray : StaticTextureArray {
|
class DummyStaticTextureArray(renderSystem: RenderSystem) : StaticTextureArray {
|
||||||
override val textures: MutableMap<ResourceLocation, AbstractTexture> = synchronizedMapOf()
|
override val textures: MutableMap<ResourceLocation, AbstractTexture> = synchronizedMapOf()
|
||||||
override val animator: SpriteAnimator
|
override val animator: SpriteAnimator = SpriteAnimator(renderSystem)
|
||||||
get() = TODO("Not yet implemented")
|
|
||||||
override val state: TextureArrayStates = TextureArrayStates.DECLARED
|
override val state: TextureArrayStates = TextureArrayStates.DECLARED
|
||||||
|
|
||||||
override fun createTexture(resourceLocation: ResourceLocation, mipmaps: Boolean, default: () -> AbstractTexture): AbstractTexture {
|
override fun createTexture(resourceLocation: ResourceLocation, mipmaps: Boolean, default: () -> AbstractTexture): AbstractTexture {
|
||||||
@ -40,6 +40,7 @@ class DummyStaticTextureArray : StaticTextureArray {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun load(latch: CountUpAndDownLatch) {
|
override fun load(latch: CountUpAndDownLatch) {
|
||||||
|
animator.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun activate() {
|
override fun activate() {
|
||||||
|
@ -20,5 +20,5 @@ import de.bixilon.minosoft.gui.rendering.system.base.texture.dynamic.DynamicText
|
|||||||
|
|
||||||
class DummyTextureManager(val context: RenderWindow) : TextureManager() {
|
class DummyTextureManager(val context: RenderWindow) : TextureManager() {
|
||||||
override val dynamicTextures: DynamicTextureArray = DummyDynamicTextureArray()
|
override val dynamicTextures: DynamicTextureArray = DummyDynamicTextureArray()
|
||||||
override val staticTextures: StaticTextureArray = DummyStaticTextureArray()
|
override val staticTextures: StaticTextureArray = DummyStaticTextureArray(context.renderSystem)
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
package de.bixilon.minosoft.gui.rendering.system.window.dummy
|
package de.bixilon.minosoft.gui.rendering.system.window.dummy
|
||||||
|
|
||||||
import de.bixilon.kotlinglm.vec2.Vec2i
|
import de.bixilon.kotlinglm.vec2.Vec2i
|
||||||
|
import de.bixilon.kutil.observer.DataObserver.Companion.observed
|
||||||
import de.bixilon.kutil.time.TimeUtil
|
import de.bixilon.kutil.time.TimeUtil
|
||||||
import de.bixilon.minosoft.gui.rendering.system.window.BaseWindow
|
import de.bixilon.minosoft.gui.rendering.system.window.BaseWindow
|
||||||
import de.bixilon.minosoft.gui.rendering.system.window.CursorModes
|
import de.bixilon.minosoft.gui.rendering.system.window.CursorModes
|
||||||
@ -35,8 +36,8 @@ class DummyWindow : BaseWindow {
|
|||||||
override var title: String = ""
|
override var title: String = ""
|
||||||
override val version: String = "dummy"
|
override val version: String = "dummy"
|
||||||
override val time: Double get() = TimeUtil.millis() / 1000.0
|
override val time: Double get() = TimeUtil.millis() / 1000.0
|
||||||
override val iconified: Boolean = false
|
override val iconified: Boolean by observed(false)
|
||||||
override val focused: Boolean = false
|
override val focused: Boolean by observed(false)
|
||||||
|
|
||||||
override fun destroy() = Unit
|
override fun destroy() = Unit
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user