migueltk's picture

Bixion2D, a pretty good graphical user interface using OpenTK

Bixion2D v11.04

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


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
avc81's picture

very nice gui lib. however the gpl license is a bit disappointing

migueltk's picture

I agree with you, this is a project intended to be used as a library and you should use a LGPL license type. I will proceed to change the license to LGPL.

carga's picture

Demo video looks great! =)

I am not able to build the solution from sources since mono compiler crashes ("Got a SIGABRT while executing native code. This usually indicates a fatal error in the mono runtime").

Could you please include compiled assemblies in Bixion2D release? I'd like to try it to get closer impression from Bixion...

My environment: Ubuntu 10.04 (Lucid) 64bit + mono v2.10.5

Have a fast code!
Anton.
http://kyta.spb.ru

carga's picture

Well, Windows .NET had managed to build Bixion. But now it throws unhandled exception and dies without stack trace or anything like this. (I'd suggest you to output unhandled exceptions to Console or (at least) to log file you have).

When running Test01 with debugger it is possible to see details of exception:
File: Texture.cs
Line: 462
Method: CreateRenderBuffer(TexFlag flags, bool floatingpoint)
Code: GL.GenFramebuffers(1, out this.framebufferID);
Exception type: System.EntryPointNotFoundException
Exception message: Unable to find an entry point named 'glGenFramebuffers' in DLL 'opengl32.dll'.

Stack trace:

   at OpenTK.Graphics.OpenGL.GL.Core.GenFramebuffers(Int32 n, UInt32* framebuffers)
   at OpenTK.Graphics.OpenGL.GL.GenFramebuffers(Int32 n, Int32& framebuffers)
   at Bixion2D.ZweiDe.Texture.CreateRenderBuffer(TexFlag flags, Boolean floatingpoint) in w:\Bixion2D\ZweiDe-partialclasses\Texture.cs:line 462
   at Bixion2D.ZweiDe.Texture.CreateRenderBuffer(TexFlag flags) in w:\Bixion2D\ZweiDe-partialclasses\Texture.cs:line 512
   at Bixion2D.ZweiDe.TextHelper.SetText(String text) in w:\Bixion2D\ZweiDe-partialclasses\TextHelper.cs:line 758
   at Bixion2D.ZweiDe.TextHelper..ctor(String text, Single xHandle, Single yHandle, TexFlag texFlags, Single aniso) in w:\Bixion2D\ZweiDe-partialclasses\TextHelper.cs:line 614
   at Bixion2D.Button..ctor(Single x, Single y, Single w, Single h) in w:\Bixion2D\Gui-subclasses\GUIObjects\Button.cs:line 96
   at Bixion2D.Tabber.ResetComponents() in w:\Bixion2D\Gui-subclasses\GUIObjects\Tabber.cs:line 2109
   at Bixion2D.Tabber.UpdateTabs(Boolean forceSizeUpdate) in w:\Bixion2D\Gui-subclasses\GUIObjects\Tabber.cs:line 1578
   at Bixion2D.Tabber.SetSkin(Skin newSkin) in w:\Bixion2D\Gui-subclasses\GUIObjects\Tabber.cs:line 1641
   at Bixion2D.Gui.GUIObject..ctor() in w:\Bixion2D\Gui-subclasses\GUIObjects\GUIObject.cs:line 3058
   at Bixion2D.Tabber..ctor(Single x, Single y, Single w, Single h) in w:\Bixion2D\Gui-subclasses\GUIObjects\Tabber.cs:line 475
   at Bixion2D.Program.CreateBG() in w:\Test01\Program.cs:line 208
   at Bixion2D.Program..ctor() in w:\Test01\Program.cs:line 154
   at Bixion2D.Program.Main(String[] args) in w:\Test01\Program.cs:line 1010

Any advice how to overcome the issue? Do you need a list of OpenGL extensions available?

Have a fast code!
Anton.
http://kyta.spb.ru

PS My environment: Vista 32bit English, .NET Frameworks from 2.0 to 4.0 installed, nVidia mobile GPU (8800GT?) present

migueltk's picture

True, the Mono compiler generates an error, I understand that the solution is to report the problem to those responsible for the Mono project.
You can compile the assemblies in windows and run on Linux. In this case I remember I got to run it on Ubuntu 32bit but not in Ubuntu 64bit, I think there is any problem in the binding of the library "freetype6" in 64bit mode.
To work in linux you must modify the "Bixion2D.net.dll.config" with the following content

and make sure that the library is in the library search path.

Finally you can try replacing freetype by QuickFont, personally think is the best solution.

I can not help more, sorry.

migueltk's picture

Bixion2D requires OpenGL 3.0 context, check this.

To work in linux you must-modify the "Bixion2D.net.dll.config" with the Following content

and make sure the library is that in the library search path. (For some unknown reason this has not come out in the previous message)

migueltk's picture

To work in linux you must-modify the "Bixion2D.net.dll.config" with the Following content

<configuration>
  <dllmap os="linux" dll="freetype6.dll" target="libfreetype.so.6"/>
</configuration>

and make sure the library is that in the library search path. (The xml code is not shown in the previous message)

carga's picture
migueltk wrote:

dllmap os="linux" dll="freetype6.dll" target="libfreetype.so.6"

Thanks! I'll try with this config.

I do not have a deep knowledge of differences between OpenGL versions. =( Is is it possible to check, that my video card supports OpenGL v3.0?

Have a fast code!
Anton.
http://kyta.spb.ru

migueltk's picture

Run "OpenGL Extensions" in "OpenTK Examples" in the distribution of OpenTK.

carga's picture

It is stated that my ATI Radeon 5750 supports OpenGL v3.2. Also I have compiled Bixion in Windows for architecture x86.

Since my win box is not OpenGL compatible I have to run the sample Test01 in my Ubuntu box (with mono v2.10.5 and latest ATI Catalyst v11.8 driver).

Bixion throws exception when loading skin. Here it is:

...
logfile.txt	LibGui initialized.
logfile.txt	
logfile.txt	Searching for skins...
logfile.txt	  Found 'Kleinweich.skn'
 
Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object
  at System.String.memcpy4 (System.Byte* dest, System.Byte* src, Int32 size) [0x00000] in <filename unknown>:0 
  at System.String.memcpy (System.Byte* dest, System.Byte* src, Int32 size) [0x00000] in <filename unknown>:0 
  at (wrapper unknown) Tao.FreeType.FT_GlyphSlotRec:PtrToStructure (intptr,object)
  at (wrapper managed-to-native) System.Runtime.InteropServices.Marshal:PtrToStructure (intptr,System.Type)
  at Bixion2D.ZweiDe+Font+FreeType.CompileChar (Char character) [0x00000] in <filename unknown>:0 
  at Bixion2D.ZweiDe+Font+FreeType.Load (System.Collections.Generic.Dictionary`2 config, System.IO.Stream fontStream, TexFlag texflags, Single anisotropicLevel) [0x00000] in <filename unknown>:0 
  at Bixion2D.ZweiDe+Font+FreeType.Load (System.IO.Stream stream, System.String rootPath, Bixion2D.Utility.GetStreamTo ressourceProvider, TexFlag texflags, Single anisotropicLevel) [0x00000] in <filename unknown>:0 
  at Bixion2D.ZweiDe+Font.Load (System.IO.Stream stream, System.String rootPath, Bixion2D.Utility.GetStreamTo ressourceProvider, TexFlag texflags, Single anisotropicLevel) [0x00000] in <filename unknown>:0 
  at Bixion2D.ZweiDe+Font.Load (System.IO.Stream stream, System.String rootPath, Bixion2D.Utility.GetStreamTo ressourceProvider) [0x00000] in <filename unknown>:0 
  at Bixion2D.Skin.Load (System.IO.Stream stream, System.String rootPath, Bixion2D.Utility.GetStreamTo ressourceProvider, TexFlag texflags, Single anisotropicLevel) [0x00000] in <filename unknown>:0 
  at Bixion2D.Skin.Load (System.String file, TexFlag texflags, Single anisotropicLevel) [0x00000] in <filename unknown>:0 
  at Bixion2D.Skin.Load (System.String file) [0x00000] in <filename unknown>:0 
  at Bixion2D.Program.SearchSkins (System.String skinsPath) [0x00000] in <filename unknown>:0 
  at Bixion2D.Program..ctor () [0x00000] in <filename unknown>:0 
  at Bixion2D.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object
  at System.String.memcpy4 (System.Byte* dest, System.Byte* src, Int32 size) [0x00000] in <filename unknown>:0 
  at System.String.memcpy (System.Byte* dest, System.Byte* src, Int32 size) [0x00000] in <filename unknown>:0 
  at (wrapper unknown) Tao.FreeType.FT_GlyphSlotRec:PtrToStructure (intptr,object)
  at (wrapper managed-to-native) System.Runtime.InteropServices.Marshal:PtrToStructure (intptr,System.Type)
  at Bixion2D.ZweiDe+Font+FreeType.CompileChar (Char character) [0x00000] in <filename unknown>:0 
  at Bixion2D.ZweiDe+Font+FreeType.Load (System.Collections.Generic.Dictionary`2 config, System.IO.Stream fontStream, TexFlag texflags, Single anisotropicLevel) [0x00000] in <filename unknown>:0 
  at Bixion2D.ZweiDe+Font+FreeType.Load (System.IO.Stream stream, System.String rootPath, Bixion2D.Utility.GetStreamTo ressourceProvider, TexFlag texflags, Single anisotropicLevel) [0x00000] in <filename unknown>:0 
  at Bixion2D.ZweiDe+Font.Load (System.IO.Stream stream, System.String rootPath, Bixion2D.Utility.GetStreamTo ressourceProvider, TexFlag texflags, Single anisotropicLevel) [0x00000] in <filename unknown>:0 
  at Bixion2D.ZweiDe+Font.Load (System.IO.Stream stream, System.String rootPath, Bixion2D.Utility.GetStreamTo ressourceProvider) [0x00000] in <filename unknown>:0 
  at Bixion2D.Skin.Load (System.IO.Stream stream, System.String rootPath, Bixion2D.Utility.GetStreamTo ressourceProvider, TexFlag texflags, Single anisotropicLevel) [0x00000] in <filename unknown>:0 
  at Bixion2D.Skin.Load (System.String file, TexFlag texflags, Single anisotropicLevel) [0x00000] in <filename unknown>:0 
  at Bixion2D.Skin.Load (System.String file) [0x00000] in <filename unknown>:0 
  at Bixion2D.Program.SearchSkins (System.String skinsPath) [0x00000] in <filename unknown>:0 
  at Bixion2D.Program..ctor () [0x00000] in <filename unknown>:0 
  at Bixion2D.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
Quote:

Finally you can try replacing freetype by QuickFont

Could you estimate how hard is this task? Currently it sounds for me almost as "impossible". =)

Have a fast code!
Anton.
http://kyta.spb.ru