Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
4dcb5e5
do not use mojang gl
emyfops May 31, 2024
4aa06d7
Performance enhancement on texture utils
emyfops Jun 1, 2024
d421016
More comments
emyfops Jun 1, 2024
b38439d
Test: Emoji glyphs
emyfops Jun 1, 2024
cbe6de2
Take the dimension of the first emoji
emyfops Jun 1, 2024
cb610b5
Parse emojis from strings
emyfops Jun 1, 2024
1dab763
Test: Font renderer
emyfops Jun 2, 2024
951fde8
Font texture fix
bladekt Jun 2, 2024
48b27e8
Fix: Emoji parsing
emyfops Jun 2, 2024
a5a99e7
Loader message
emyfops Jun 2, 2024
1908d4b
Better emoji loading
emyfops Jun 2, 2024
7b4e22c
Feature: Emoji renderer
emyfops Jun 2, 2024
c9b1863
Public emoji parsing
emyfops Jun 2, 2024
944a9bc
Refactor: Code readability
emyfops Jun 2, 2024
8921bf7
Emoji artifact & space fixes
bladekt Jun 6, 2024
3309595
Kotlinize yourself
bladekt Jun 6, 2024
7c179d1
Renderer cleanup
bladekt Jun 7, 2024
631ad18
ESP (pushing but needs to be refactored)
bladekt Jun 7, 2024
04b8a1d
Fixed comment
emyfops Jun 7, 2024
46b9eab
EntityESP refactor
bladekt Jun 8, 2024
78b157f
Camera Noclip: Added module state check
bladekt Jun 8, 2024
4d4ec6a
Timer refactor
bladekt Jun 8, 2024
5d74559
HUD & many cgui refactorings
bladekt Jun 9, 2024
11237ca
Clamped position
bladekt Jun 9, 2024
6378864
todo
emyfops Jun 9, 2024
ff99934
Fuck it, HUD docking
bladekt Jun 9, 2024
f074faf
Merge remote-tracking branch 'origin/feature/renderer' into feature/r…
bladekt Jun 9, 2024
69023d6
Fix: Gson type token
emyfops Jun 9, 2024
b26725d
Merge branch 'feature/renderer' of https://github.com/Avanatiker/NeoL…
emyfops Jun 9, 2024
44f30d9
Crashfix when gui gets closed by kicking from the server
bladekt Jun 9, 2024
9cf8616
Update AbstractSetting.kt
emyfops Jun 9, 2024
267a502
Merge remote-tracking branch 'origin/feature/renderer' into feature/r…
bladekt Jun 9, 2024
a1577f4
Merge branch 'master' into feature/renderer
Avanatiker Jun 9, 2024
ce946f2
Shader optimization
bladekt Jun 10, 2024
4f0d713
Changed matrices list size
emyfops Jun 12, 2024
50f2496
Merge remote-tracking branch 'origin/feature/renderer' into feature/r…
bladekt Jun 12, 2024
968de6a
ESP
bladekt Jun 12, 2024
9d46ccb
Vertex Mapping and misc
bladekt Jun 13, 2024
87cb9b7
Merge remote-tracking branch 'origin/master' into feature/renderer
Avanatiker Jun 13, 2024
d75461c
Better emoji parsing
emyfops Jun 14, 2024
20e4777
Smol refactors
Avanatiker Jun 14, 2024
0e8fe57
ChunkStorage
bladekt Jun 14, 2024
4931fa2
ChillyWeelly
bladekt Jun 14, 2024
974d9cd
ChillyWeelly
bladekt Jun 14, 2024
5212a3b
Update scheduler
Avanatiker Jun 14, 2024
bc9aa54
Todo: Emoji chat renderer
emyfops Jun 14, 2024
405ff12
Fix rendering lines twice and more settings
Avanatiker Jun 15, 2024
16d51be
Shape mesh prototype
Avanatiker Jun 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Renderer cleanup
  • Loading branch information
bladekt committed Jun 7, 2024
commit 7c179d1e0f741448bc0ac8dbe254f10722db8e92
4 changes: 2 additions & 2 deletions common/src/main/kotlin/com/lambda/graphics/gl/Scissor.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ object Scissor {
private var stack = ArrayDeque<Rect>()

fun scissor(rect: Rect, block: () -> Unit) {
// clamp corners so children scissor box can't overlap parent
// clamp corners so children scissor boxes can't overlap parent
val processed = stack.lastOrNull()?.let(rect::clamp) ?: rect
registerScissor(processed, block)
}
Expand All @@ -25,7 +25,7 @@ object Scissor {
block()

stack.removeLast()
stack.lastOrNull().apply(::scissor)
scissor(stack.lastOrNull())
}

private fun scissor(entry: Rect?) {
Expand Down
15 changes: 0 additions & 15 deletions common/src/main/kotlin/com/lambda/graphics/renderer/Renderer.kt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.lambda.graphics.renderer.gui.font

import com.lambda.graphics.buffer.vao.VAO
import com.lambda.graphics.buffer.vao.vertex.VertexAttrib
import com.lambda.graphics.buffer.vao.vertex.VertexMode
import com.lambda.graphics.renderer.Renderer
import com.lambda.graphics.renderer.gui.font.glyph.GlyphInfo
import com.lambda.graphics.shader.Shader
import com.lambda.module.modules.client.FontSettings
Expand All @@ -14,7 +14,9 @@ import java.awt.Color
class FontRenderer(
private val font: LambdaFont,
private val emojis: LambdaMoji
) : Renderer(VertexMode.TRIANGLES, VertexAttrib.Group.FONT) {
) {
private val vao = VAO(VertexMode.TRIANGLES, VertexAttrib.Group.FONT)

private val scaleMultiplier = 1.0
private val emojiRegex = Regex(":[a-zA-Z0-9_]+:")

Expand Down Expand Up @@ -144,14 +146,16 @@ class FontRenderer(
)
}

override fun render() {
fun render() {
shader.use()
shader["u_EmojiTexture"] = 1

font.glyphs.bind()
emojis.glyphs.bind()

super.render()
vao.upload()
vao.render()
vao.clear()
}

companion object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.lambda.graphics.renderer.gui.rect

import com.lambda.Lambda.mc
import com.lambda.graphics.RenderMain
import com.lambda.graphics.buffer.vao.VAO
import com.lambda.graphics.buffer.vao.vertex.VertexAttrib
import com.lambda.graphics.buffer.vao.vertex.VertexMode
import com.lambda.graphics.renderer.Renderer
import com.lambda.graphics.shader.Shader
import com.lambda.module.modules.client.GuiSettings
import com.lambda.util.math.Vec2d
Expand All @@ -12,16 +12,19 @@ import org.lwjgl.glfw.GLFW.glfwGetTime
abstract class AbstractRectRenderer(
attribGroup: VertexAttrib.Group,
val shader: Shader
) : Renderer(VertexMode.TRIANGLES, attribGroup) {
override fun render() {
) {
protected val vao = VAO(VertexMode.TRIANGLES, attribGroup)

open fun render() {
shader.use()
shader["u_Time"] = glfwGetTime() * GuiSettings.colorSpeed * 5.0
shader["u_Color1"] = GuiSettings.shadeColor1
shader["u_Color2"] = GuiSettings.shadeColor2

val screen = Vec2d(mc.window.framebufferWidth, mc.window.framebufferHeight)
val size = Vec2d(GuiSettings.colorWidth, GuiSettings.colorHeight)
shader["u_Size"] = screen / size
super.render()
shader["u_Size"] = RenderMain.screenSize /Vec2d(GuiSettings.colorWidth, GuiSettings.colorHeight)

vao.upload()
vao.render()
vao.clear()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ class FilledRectRenderer : AbstractRectRenderer(

override fun render() {
shader.use()

super.render()
}

Expand Down
11 changes: 0 additions & 11 deletions common/src/main/kotlin/com/lambda/graphics/texture/Texture.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,4 @@ abstract class Texture {
protected abstract fun init()

open fun bind(slot: Int = 0) = bindTexture(id, slot)

override fun equals(other: Any?): Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false

other as Texture

return id == other.id
}

override fun hashCode() = id
}