• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

OTClient Graphics Discussion (Anyone out there more knowledgeable than me?)

Hello there, I read your comments and I would like to join the brain storm, although I have not evry much experience using openGL. Someone mentioned the Texture arrays which is probably nice thing to look into, although I was wondering to make a proof of concept using texture atlases. I believe we could create only few big textures, store coordinates to sprites (or even calculate them on the fly) and clip the texture to 32x32 size. I guess that would reduce the amount of texture bindings. However I would like to implement that first on my own, if that leads somewhere I will share the code.

texture arrays in my humble opinion is the most promising improvement, tell me if is there anything i could assist
 
Well, I made some improvement and implemeneted Texture arrays, although for some reason I dont want to get into now, I cannot draw anything yet with this :p
 
may you mantain a repo?
i'm also very insterested and got some basic ideas of how to do it
 
Any updates? This still being looked into?
 
Turns out my laptop is not doing well with OpenGL well, there is no point sharing it now since its in experimental messy stage, and there is still not much done about this.
 
I have found another perfect example, that allows me to finnaly start working on this topic. Maybe that will make someone else work on this aswell. Basicly here is a repository which contains tons of working opengl examples. I find it really usefull in terms of making future improvements : https://github.com/g-truc/ogl-samples
Cheers!

@Flatlander have you perhaps made any benchmarks, on approx. how many sprites are beeing drawn within a single frame draw?
 
Last edited:
Fyi: I was able to remake one of those apps to load images into texture array, and draw it!!! Slow progress I must say but finaly I can say I understand some of this crap :D Now I would need to refactorize the graphic engine :) I will also make some benchmarks, and will let you know if this approach is profitable at all.

Texture_Arr_Text.png
 
Last edited:
sounds good.

Haha yea, I am also kind of curious, if I should maintain backward compatibility with opengl 1 and 2 or not. By the way I think I will experiment a little with this library: http://www.glfw.org
It seems they are keep developing it, and it might allow us to develop platform independent code, without any special platform window adapter
 
Huh, I wrote a new painter for OpenGL 3, used Vertex Array Object with 2 Vertex Buffer Objects. I was struggeling a lot with shaders - but - it was worth it. I am tryuing to recreate all functionalities for ogl3. I am dealing with several issues now, but here is a progress picture :)
ogl3.png
 
Huh, I wrote a new painter for OpenGL 3, used Vertex Array Object with 2 Vertex Buffer Objects. I was struggeling a lot with shaders - but - it was worth it. I am tryuing to recreate all functionalities for ogl3. I am dealing with several issues now, but here is a progress picture :)
ogl3.png

What are the issues that you are dealing with?

That screenshot looks good, however can't say much about performance till you run a few stress tests.
 
In glfw that I used as a window runner, I need to figure out how to trigger keyboard events when you have key pressed, for a while, not only on a keypress but thats not a big deal I think. I am trying to design this optimisation to maintain backward compatibility with ogl1 and 2 but I guess its preety much redundant, what do you think?
 
Last edited:
In glfw that I used as a window runner, I need to figure out how to trigger keyboard events when you have key pressed, for a while, not only on a keypressm but thats not a big deal I think. I am trying to design this optimisation to maintain backward compatibility with ogl1 and 2 but I guess its preety much redundand, what do you think?
Redundant... Dont think anyone would have a reason to use the old version..
 
Hey guys, so I have implemented texture arrays and already made some benchamrks with it. Unfortunately it seems that there is no significant change in fps (if at all) That made me think that I should run valgrind and profile client and thats what I have found :
callgrind.png


This is preety wierd, but I think we should focus on drawing text in the first place. I will experiment a little bit more with drawing textures too. I will keep updating you guys, if I've come across on something intering during my picturesque travels in client's source code :)
 
Last edited:
Hey guys, so I have implemented texture arrays and already made some benchamrks with it. Unfortunately it seems that there is no significant change in fps (if at all) That made me think that I should run valgrind and profile client and thats what I have found :
callgrind.png


This is preety wierd, but I think we should focus on drawing text in the first place. I will experiment a little bit more with drawing textures too. I will keep updating you guys, if I've come across on something intering during my picturesque travels in client's source code :)
Good work man! You are a fucken god!
 
Back
Top