Hello - I am back....

Posted 2 years ago2019-10-21 23:10:22 UTC
DeafMan1983 DeafMan1983C# Developer and Linux Creator
Hello everyone,

sorry I am very busy from my practical training as kitchen helper or cooker at restaurant / hospital. But I have 5 times of accidents. :( My finger is not much cutting. Thanks for worrying me! I am shy to show because my finger in left middle finger :sarcastic:

I am working at XLibSharp ( Wrapper for X11 ) on Ubuntu 18.04 and I have created simple window with button clicking.
User posted image
User posted image
It is really easy like Flash's Sprite
Instance of Sprite = 1 = flash player or flash application. But XLib/X11 works also instance of window like sprite.
For XLib/X11 is very close to same to Flash Sprite Api
But I need create display, screen_number and window than I create any components.
XCreateSimpleWindow or XCreateWindow are very different levelly.

private IntPtr window, button;
	window = XCreateSimpleWindow(....);
	button = XCreateSimpleWindow(display, window, ...);
	XMapWindow(display, window);
	XMapWindow(display, button);
		// KeyPress for destroying window with break; It means Close window
		// ButtonPress for clicking event with writing console or making new rectangle or widget of X11
I will release soon - I hope I can work sure 100 % with XLib/X11 wrapper for C#. But Steffen Ploetz's X11 libraries are very horrible because X11 libraries with shit enumerators. like TInt, TUlong or TPixel etc.. I really don't understand. I want use default types of mscorlib.dll ( using System; )
That is why I write clean library XLibSharp ( for only Linux, FreeBSD with only 64Bit - but I won't support for Windows - I know you want use with Cygwin's X11 - But I don't care with Cygwin. ) Please respect me! - I will try to create Half-life with XLib/X11 - Wait why it is easy? Because Half-Life has GUI like Steam GUI dialogues/windows. XLib/X11 has support also Vulkan too.

Sorry for longer busy because I have tried to resolve with GtkSharp3 and SDL2 = bad news if I add button than GtkSharp 3 application will crash. That is why I am trying to resolve as successful library for Linux and FreeBSD.

I hope you understand my English.

Best kind regards!


Commented 2 years ago2019-10-22 21:01:36 UTC Comment #102369
Welcome back, SourceSkyBoxer. <3
Commented 2 years ago2019-10-22 21:43:35 UTC Comment #102370
@Admer welcome my friend <3 - Do you know how do I convert pixel ( ulong , unsigned long ) to 3 color-properties like r, g, b as ushort?

And I have tried to resolve current color as red like XColor(65535, 0, 0);
But it seems wrong color as low green like It explained stackoverflow - 15 to 13 is low green, 12 to 8 is blue, 7 to 3 is red and 2 to 0 is high green.

I really want know how do I get R, G and B from Color/Pixel.

If I use "0xFF0000" than it means red color.
User posted image
And I tried to set red in XColor() like Gdk.Color()
User posted image
But I can't find where is real R, G, B from pixel or color of Gdk.Color ( Gtk+3.0 or Gtk+2.0 )

Thanks if you have experience of Color / Pixel as ulong and R, G, B are as ushort.
But I know about byte no problem.
Commented 2 years ago2019-10-23 09:08:52 UTC Comment #102373
I found problem with ushort. It doesn't mean 65535 and it just use with 15.
User posted image
It works fine. But I tried like this Convert to byte or float and it seems wrong. // EDIT It works as well...
Commented 2 years ago2019-10-25 16:17:59 UTC Comment #102384
In the meantime, I'm gonna experiment with OpenGL.
Nice UI stuff by the way. :)
Commented 2 years ago2019-10-26 22:36:06 UTC Comment #102394

I am working SharpHL with XLibSharp - Why do I not use SDL2-CS? I would like to try for Linux and FreeBSD. Because I want make realtime of look in camera viewport of SharpHL on SharpHammer or XHammer ( alternative to Sedge Editor or Valve Hammer Editor under Linux ) PS I am porting full HL-SDK to C# - But SoloKikker's structure I see like it seems forgettable methods but I make all like [MarshalAs(UnmanagedType.ByValArray)] and cmdlib.cs and bsplib.cs are static classes and I make sure.

What does "realtime of look" in SharpHammer or XHammer?
It looks like runnable mode of Unity or Unreal Editor without after compilation if everyone want create and optimize map faster than everyone thinks and looses time. That's why I really want make easy for GoldSource Engine Fans like Twhl.info or MapCore and other websites.

Sharp Half-Life supports only 64 Bit but single executable ( I will look for 2 files for client and server with executable like original structure. ) but I am making like SharpQuake - I know it looks wrong but I want add any external assemblies in protected packages than they can't decompile loaded plugins or external functions so like SoloKiller's idea but I make safe. If I am ready release under Linux than I will support for Windows, MacOS, Android and Nintendo Switch ( possible )
Commented 2 years ago2019-10-28 07:10:17 UTC Comment #102402
I think the "realtime look" would still require some sort of compiling. If you do real-time lighting in the map editor, you can't simulate light bounces easily, without path-tracing or some indirect lighting methods.
Commented 2 years ago2019-10-28 11:29:36 UTC Comment #102403
Yeah it is tricky. Like Unity or Unreal compiles before static light or vis light generates. I understand that. You mean. But I will try out.
Commented 2 years ago2019-11-03 17:37:24 UTC Comment #102422
And I resolve not-working public methods for C# like dead public methods - if XLib/X11 developers hesitate... Hahaha! I resolve it.
I am very excited to resolve like one shape = OK but multiple shapes = not working with public methods

Like this:

And other like this

Successful method:
User posted image
Result: 4 rounded rectangle without segments
User posted image
Like example multiple rectangles from C with XLIb/X11:
Link here
User posted image
Yeah C# = works fine :D
Commented 2 years ago2019-11-03 18:41:18 UTC Comment #102423
With Segments and Arcs
User posted image

You must log in to post a comment. You can login or register a new account.