Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    455
  • comments
    639
  • views
    424233

The Joy of X (and other bad puns)

Sign in to follow this  
_the_phantom_

161 views

Whatever I did to X in another life I'm so so sorry for it, please stop hurting me now...

Yes, work on the Linux/X version of the OGLWFW is progressing realtively nicely. I've spent the past 4h or so with my head very firmly in an X-API guide trying to work out how the hell I'm ment todo some thing [grin]

The biggest problem I had was that the current system was designed around the idea of placing the windows handle in a big of memory linked with the window and pulling it out again when needed. Under Win32 this is very, very easy todo, its infact a two function job with only a minor issue on when you can do it (but thanks to Oluseyi's window wrapping tutorial I never had that problem [grin]).

X however doesnt have an explicate way of doing it as such, infact it turns out its alot more flexible which what you can store but its a slight pain getting the data in an out, however I think I've cracked it, so until I test it and it all falls apart I'll be happy [grin]

The porting has also shown a number of weaknesses in my design and I've had to impliment a couple of hidden (from the end user) 'hacks' to get around a couple of problems. I'm starting to wonder if having the window manager its self exposed to the client code is such a smart idea, instead I'm wondering if maybe a simple proxy class which forwards requests to it might be a better idea (this would also allow for the enforcement of a single window manager and multiple proxies without resorting to anything silly like a singleton pattern, which in part is because I fear the wrath of Washu [grin]), however it, along with other things, is an idea for OGLWFWv2.0 and will depend on my state of mind once I read Design Patterns [smile]

I've also had to take some inspiration from the GLFW project with regards to how some code works (such as cursor hiding) and I'll probably rehash my mode detection code (both OGL and display) once I've had a decent read of theirs (from a quick look over it mine does appear to be neive at best, suboptimal at worse).

I've not done a compile test yet, that'll probably come later tonight or tomorrow depending on my mood, I'm hoping it'll at least compile even if things dont work right to begin with [grin]
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!