-
-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can SDL_SetTextureScaleMode be used somehow? #571
Comments
Hi @code-qote, could you show a minimal example of the code that makes the application freeze? |
At application starting, I render all supported chars and save it in for _, char := range supportedChars {
for _, color := range Colors {
fontSurface, _ := e.font.ttfFont.RenderGlyphBlended(char, hexToSdlColor(color))
texture, _ := e.renderer.CreateTextureFromSurface(fontSurface)
// texture.SetScaleMode(sdl.ScaleModeLinear)
cache.PreRenderredCharTextures[char][color] = CharTexture{texture, fontSurface.W}
}
} Then every frame I do (freezes here): e.renderer.Copy(e.cache.PreRenderredCharTextures[rune(c)][Colors[t]].Texture, nil, e.GetRectFromMatrix(row, col)) |
Hi @code-qote, would you be able to provide a minimal example that I can run? I can't seem to reproduce it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello. I had updated package by
go get
, so it hadv0.4.35
. There was no implementation ofSDL_SetTextureScaleMode
. I checked the several latest commits inmaster
and found its implementation there. I edited mygo.mod
and installed the latest commit but now the application freezes whileRenderer.Copy()
.What have I done wrong?
I need it to solve the problem with blurry font (macOS). According to that, it should help. Maybe there is an another option?
The text was updated successfully, but these errors were encountered: