
Bixion2D, a pretty good graphical user interface using OpenTK
Posted Thursday, 28 April, 2011 - 18:09 by migueltk
I just finished adapting the project to work with OpenTK. The capture of the keys on the keyboard should be improved but overall I think it is a very useful tool. I have not tried in Linux but in theory should work fine, but you have to install freetype previously. Requires an OpenGL 3.0 context, this change in the future I hope to work with OpenGL 2.0/2.1, any help is welcome.
Enjoy it!
Miguel
- migueltk's blog
- Login or register to post comments


Comments
Re: Bixion2D, a pretty good graphical user interface using ...
With time and effort, nothing is impossible. Like doing things, we have, but having time is something else.
I understand that there are two ways to eliminate dependence on "freetype" in the project Bixion2D.
1 - Replace method "void DrawText (string text, float x, float y)" in class "Font" using "QuickFont."
2 - Try replacing the dependent "freetype" in method "bool CompileChar (char character)" in class "Font.FreeType." Basically, this method does is create a "Pixmap" for each character, in a "Pixmap" image data representing the character is saved as "byte [] pixels".
I think this can be achieved with "Graphics.DrawString ()" in theory is only necessary to replace or adapt the code of the method "bool CompileChar (char character)."
I understand that the second option is more practical.
P.D: Were you able to run Bixion2d on Windows?
Re: Bixion2D, a pretty good graphical user interface using ...
I understand that the second option is more practical.
I'll find some time to test this approach.
P.D: Were you able to run Bixion2D on Windows?
Not yet. Win is extremely rare animal in my environment, it almost disappeared eventually. Especially the one with OpenGL 3.0.
BTW, I have posted a bug to mono with Bixion compilation error. ;-)
Have a fast code!
Anton.
http://kyta.spb.ru
PS For some strange reason I do not receive e-mail notifications about your replies, so please excuse me for possible delay with answer.
Re: Bixion2D, a pretty good graphical user interface using ...
2 - Try replacing the dependent "freetype" in method "bool CompileChar (char character)" in class "Font.FreeType." Basically, this method does is create a "Pixmap" for each character, in a "Pixmap" image data representing the character is saved as "byte [] pixels".
I think this can be achieved with "Graphics.DrawString ()" in theory is only necessary to replace or adapt the code of the method "bool CompileChar (char character)."
I understand that the second option is more practical.
Looking in the code (I personally don't understand what's going on around CompileChar method) I saw another font class (BitmapFont or something like this). So to cut the corner, I just updated GetFontType method to always return Bitmap font type instead of TrueType.
Is Bitmap font support complete enough to be used in Bixion demo?
After this change, I received other error:
PS I have to run Bixion in my Ubuntu box which has GPU with OGL v3 support, and in this environment there is no line numbers provided in stack trace. Sorry.
Have a fast code!
Anton.
http://kyta.spb.ru