Thread overview | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
January 09, 2012 compact library for creating window + OpenGL context + input handling? | ||||
---|---|---|---|---|
| ||||
(other than SDL) Basically something like the SFML Window module, but written in D and working on Windoze/Linux. |
January 09, 2012 Re: compact library for creating window + OpenGL context + input handling? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Trass3r | Trass3r wrote:
> (other than SDL)
>
> Basically something like the SFML Window module, but written in D and working on Windoze/Linux.
GLFW, if all you need is OpenGL (heck, even GLUT maybe).
Is there any reason, though? SDL is not dead anymore, and its API is being rewritten with 1.3 (aka SDL2).
Or do you mean written completely in D?
(Can't think of anything, maybe GLFW would be (relatively) simple to rewrite?)
|
January 09, 2012 Re: compact library for creating window + OpenGL context + input handling? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Trass3r | 09.01.2012 6:05, Trass3r пишет:
> (other than SDL)
>
> Basically something like the SFML Window module, but written in D and
> working on Windoze/Linux.
I have written a Windows OpenGL context creation for given HWND (initially for DGUI but it isn't a restriction, one just have to write his own control class) because of complicated context creation in this OS (~800 lines of D code for only context creation with desired parameters) and lack of functionality like: "here is my windows handle - create new context with it/use it with an existing one".
There is no Linux support yet. There is no IO control because it is for using with a widget toolkit like DGUI, SWT, DFL, etc.
I don't think you are looking for such solution, so it is here just for information. But if someone need this, I will release sources.
|
January 09, 2012 Re: compact library for creating window + OpenGL context + input handling? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Kiith-Sa | >> Basically something like the SFML Window module, but written in D and >> working on Windoze/Linux. > > GLFW, if all you need is OpenGL (heck, even GLUT maybe). Isn't GLUT more or less dead and/or usage discouraged? Hmm GLFW seems to be no better than SDL. > Is there any reason, though? SDL is not dead anymore, and its API is > being rewritten with 1.3 (aka SDL2). SDL in its current form is heavily flawed. Who knows when the new one will be ready. And it especially still lacks important functionality: " Required Sam: Add support for render targets Sam: Add support for OpenGL context profiles " > Or do you mean written completely in D? > (Can't think of anything, maybe GLFW would be (relatively) simple to rewrite?) Yep written in D. Object-oriented, modular, no external dependencies. btw, just remembered there's a basic window creation module and input handling code at https://github.com/adamdruppe/misc-stuff-including-D-programming-language-web-stuff/blob/master/simpledisplay.d Could be better though. |
January 09, 2012 Re: compact library for creating window + OpenGL context + input handling? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Trass3r | On 1/9/2012 10:13 PM, Trass3r wrote: >>> Basically something like the SFML Window module, but written in D and >>> working on Windoze/Linux. >> >> GLFW, if all you need is OpenGL (heck, even GLUT maybe). > > Isn't GLUT more or less dead and/or usage discouraged? > Hmm GLFW seems to be no better than SDL. GLFW is pretty awesome, IMO. Lightweight and doesn't get in your way. Version 3 is going to be even better, but the pace of development is rather slow. I knocked up a Derelict binding to it a while back, but I'm not going to put it in the repository until GLFW 3 is actually released. I'd be happy to put it up for download somewhere if anyone wants it. Though, I don't guarantee that it's up-to-date. There may have been a change or two in the interface since I threw it together. > > >> Is there any reason, though? SDL is not dead anymore, and its API is >> being rewritten with 1.3 (aka SDL2). > > SDL in its current form is heavily flawed. > Who knows when the new one will be ready. > And it especially still lacks important functionality: > > " > Required > Sam: Add support for render targets > Sam: Add support for OpenGL context profiles > " > > >> Or do you mean written completely in D? >> (Can't think of anything, maybe GLFW would be (relatively) simple to >> rewrite?) > > Yep written in D. > Object-oriented, modular, no external dependencies. > > btw, just remembered there's a basic window creation module and input > handling code at > https://github.com/adamdruppe/misc-stuff-including-D-programming-language-web-stuff/blob/master/simpledisplay.d > > Could be better though. |
January 09, 2012 Re: compact library for creating window + OpenGL context + input handling? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Trass3r | Am 09.01.2012 04:05, schrieb Trass3r: > (other than SDL) > > Basically something like the SFML Window module, but written in D and > working on Windoze/Linux. Thought about the same, well similiar: Porting pyglet, nice API, written in Python and works cross platform http://www.pyglet.org/ |
January 09, 2012 Re: compact library for creating window + OpenGL context + input handling? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Denis Shelomovskij | > I have written a Windows OpenGL context creation for given HWND (initially for DGUI but it isn't a restriction, one just have to write his own control class) because of complicated context creation in this OS (~800 lines of D code for only context creation with desired parameters) and lack of functionality like: "here is my windows handle - create new context with it/use it with an existing one". Including OpenGL 3+ contexts? > I don't think you are looking for such solution, so it is here just for information. But if someone need this, I will release sources. Please do so, could be helpful. |
January 09, 2012 Re: compact library for creating window + OpenGL context + input handling? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Trass3r | 09.01.2012 17:22, Trass3r пишет: >> I have written a Windows OpenGL context creation for given HWND >> (initially for DGUI but it isn't a restriction, one just have to write >> his own control class) because of complicated context creation in this >> OS (~800 lines of D code for only context creation with desired >> parameters) and lack of functionality like: "here is my windows handle >> - create new context with it/use it with an existing one". > > Including OpenGL 3+ contexts? Yes, it was the point. > >> I don't think you are looking for such solution, so it is here just >> for information. But if someone need this, I will release sources. > > Please do so, could be helpful. OK. Will do it in ~24 hours. |
January 09, 2012 Re: compact library for creating window + OpenGL context + input handling? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Trass3r | On 01/09/2012 04:05 AM, Trass3r wrote: > (other than SDL) > > Basically something like the SFML Window module, but written in D and > working on Windoze/Linux. This one might be useful: https://github.com/AndrejMitrovic/DNeonHelium/blob/master/Samples/win32/lesson01.d -- Mike Wey |
January 09, 2012 Re: compact library for creating window + OpenGL context + input handling? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike Wey | Another problem is that all these APIs don't allow obtaining native handles to windows, so that OS-specific stuff can be done. For example, both Win32 API and Xlib allow you to create alpha-blended and shaped windows, but in a vastly different manner. I personally need an alpha-blended shaped window for cool 3D notifications and popup-like things. I have never seen any cross-platform API provide this kind of functionality.
--
Bye,
Gor Gyolchanyan.
|
Copyright © 1999-2021 by the D Language Foundation