November 23, 2012 Re: WinAPI for druntime and OpenGL for deimos. | ||||
---|---|---|---|---|
| ||||
On 11/23/2012 12:15 PM, Gor Gyolchanyan wrote:
> I'm translating OpenGL headers, taken from opengl.org <http://opengl.org>
> (glcorearb.h, glext.h, wglext.h, glxext.h)
Hasn't there already been some work to translate OpenGL headers ... ? Might be worth taking a look at to see if it can be adapted?
In any case, I'd very much welcome this work as I was considering bringing in OpenGL into a project I'm working on. Thanks very much for your efforts!
|
November 23, 2012 Re: WinAPI for druntime and OpenGL for deimos. | ||||
---|---|---|---|---|
| ||||
11/23/12, Gor Gyolchanyan <gor.f.gyolchanyan@gmail.com> wrote: > I'm going to translate WinAPI headers (all > except DirectX and deprecated, like winsock1) after that. Please see http://dsource.org/projects/bindings/wiki/WindowsApi |
November 23, 2012 Re: WinAPI for druntime and OpenGL for deimos. | ||||
---|---|---|---|---|
| ||||
Attachments:
| All I could find was some D1-oriented ancient code in one of the dead dsource.org projects. On Fri, Nov 23, 2012 at 3:33 PM, Joseph Rushton Wakeling < joseph.wakeling@webdrake.net> wrote: > On 11/23/2012 12:15 PM, Gor Gyolchanyan wrote: > >> I'm translating OpenGL headers, taken from opengl.org <http://opengl.org> (glcorearb.h, glext.h, wglext.h, glxext.h) >> > > Hasn't there already been some work to translate OpenGL headers ... ? > Might be worth taking a look at to see if it can be adapted? > > In any case, I'd very much welcome this work as I was considering bringing in OpenGL into a project I'm working on. Thanks very much for your efforts! > -- Bye, Gor Gyolchanyan. |
November 23, 2012 Re: WinAPI for druntime and OpenGL for deimos. | ||||
---|---|---|---|---|
| ||||
Attachments:
| That was my first choice when I wanted a sane WinAPI binding, but there are some problems with it: 1. It has some pragma(lib, ...) declarations which aren't being met and which assume some things, that aren't true. 2. It uses version identifiers to determine the, you guessed it, version of Windows in question. This is very bad, since it won't compile without at least some version identifiers and I'm sure we can make the OS version available at compile-time to obviate the need for those version identifiers. 3. It includes tons of obsolete stuff, that cannot and will not be used ever, which are hard to track down and extract. On Fri, Nov 23, 2012 at 3:35 PM, Andrej Mitrovic <andrej.mitrovich@gmail.com > wrote: > 11/23/12, Gor Gyolchanyan <gor.f.gyolchanyan@gmail.com> wrote: > > I'm going to translate WinAPI headers (all > > except DirectX and deprecated, like winsock1) after that. > > Please see http://dsource.org/projects/bindings/wiki/WindowsApi > -- Bye, Gor Gyolchanyan. |
November 23, 2012 Re: WinAPI for druntime and OpenGL for deimos. | ||||
---|---|---|---|---|
| ||||
Attachments:
| I hope the deimos folks make a repo soon, so that people can use those modules as soon as possible, because I'll finish translating them today. On Fri, Nov 23, 2012 at 3:33 PM, Joseph Rushton Wakeling < joseph.wakeling@webdrake.net> wrote: > On 11/23/2012 12:15 PM, Gor Gyolchanyan wrote: > >> I'm translating OpenGL headers, taken from opengl.org <http://opengl.org> (glcorearb.h, glext.h, wglext.h, glxext.h) >> > > Hasn't there already been some work to translate OpenGL headers ... ? > Might be worth taking a look at to see if it can be adapted? > > In any case, I'd very much welcome this work as I was considering bringing in OpenGL into a project I'm working on. Thanks very much for your efforts! > -- Bye, Gor Gyolchanyan. |
November 23, 2012 Re: WinAPI for druntime and OpenGL for deimos. | ||||
---|---|---|---|---|
| ||||
Attachments:
| On 23 November 2012 13:15, Gor Gyolchanyan <gor.f.gyolchanyan@gmail.com>wrote: > I'm translating OpenGL headers, taken from opengl.org (glcorearb.h, > glext.h, wglext.h, glxext.h) and I'm going to translate WinAPI headers (all > except DirectX and deprecated, like winsock1) after that. > > As we all know, the WinAPI binding in druntime as well as the static libraries of WinAPI, which come with DMD are in horrendous state. > > I can translate the headers with a bunch of moderately complex regexp search/replace operations, some manual tweaks and compilations with RDMD to ensure correctness. > > The questions are: > 1. Can the DMD folks update the static libraries for WinAPI, so they > match with what I'm gonna submit for druntime? > 2. What requirements are there (except keeping WinAPI names > unmodified) for the translated headers to end up in druntime? > 3. Can the deimos folks please make an OpenGL repo so I can place my > translated headers in there? Yes, I know the rules of deimos. > *Approve!* The Win64 libs can use Microsoft's .lib files verbatim, since the Win64 compiler now uses the MS-COFF format. So updating the win32 libs would be for x86 only. |
November 23, 2012 Re: WinAPI for druntime and OpenGL for deimos. | ||||
---|---|---|---|---|
| ||||
Attachments:
| Good point, but the 32-bit version also must work in order for the new modules to be included in druntime. On Fri, Nov 23, 2012 at 3:47 PM, Manu <turkeyman@gmail.com> wrote: > On 23 November 2012 13:15, Gor Gyolchanyan <gor.f.gyolchanyan@gmail.com>wrote: > >> I'm translating OpenGL headers, taken from opengl.org (glcorearb.h, >> glext.h, wglext.h, glxext.h) and I'm going to translate WinAPI headers (all >> except DirectX and deprecated, like winsock1) after that. >> >> As we all know, the WinAPI binding in druntime as well as the static libraries of WinAPI, which come with DMD are in horrendous state. >> >> I can translate the headers with a bunch of moderately complex regexp search/replace operations, some manual tweaks and compilations with RDMD to ensure correctness. >> >> The questions are: >> 1. Can the DMD folks update the static libraries for WinAPI, so they >> match with what I'm gonna submit for druntime? >> 2. What requirements are there (except keeping WinAPI names >> unmodified) for the translated headers to end up in druntime? >> 3. Can the deimos folks please make an OpenGL repo so I can place my >> translated headers in there? Yes, I know the rules of deimos. >> > > *Approve!* > > The Win64 libs can use Microsoft's .lib files verbatim, since the Win64 > compiler now uses the MS-COFF format. > So updating the win32 libs would be for x86 only. > -- Bye, Gor Gyolchanyan. |
November 23, 2012 Re: WinAPI for druntime and OpenGL for deimos. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Gor Gyolchanyan | On Friday, 23 November 2012 at 11:40:14 UTC, Gor Gyolchanyan wrote: > All I could find was some D1-oriented ancient code in one of the dead > dsource.org projects. > Never seen Derelict? https://github.com/aldacron/Derelict3/ |
November 23, 2012 Re: WinAPI for druntime and OpenGL for deimos. | ||||
---|---|---|---|---|
| ||||
On 11/23/12, Gor Gyolchanyan <gor.f.gyolchanyan@gmail.com> wrote: > 2. It uses version identifiers to determine the, you guessed it, version of Windows in question. This is very bad, since it won't compile without at least some version identifiers and I'm sure we can make the OS version available at compile-time to obviate the need for those version identifiers. The identifiers you typically need to pass is the unicode and windows specs, e.g.: -version=Unicode -version=WindowsXP The reason you need to pass the Windows version is because you might want to limit compilation to only certain platforms. The bindings work ok for me, here's one project where I use them: https://github.com/AndrejMitrovic/DWinProgramming |
November 23, 2012 Re: WinAPI for druntime and OpenGL for deimos. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike Parker Attachments:
| Derelict doesn't define extern functions and includes tons of code for dynamic loading. It's not a direct translation and since I'm aiming for deimos, I need to make a direct translation. On Fri, Nov 23, 2012 at 3:51 PM, Mike Parker <aldacron@gmail.com> wrote: > On Friday, 23 November 2012 at 11:40:14 UTC, Gor Gyolchanyan wrote: > >> All I could find was some D1-oriented ancient code in one of the dead dsource.org projects. >> >> > Never seen Derelict? > > https://github.com/aldacron/**Derelict3/<https://github.com/aldacron/Derelict3/> > -- Bye, Gor Gyolchanyan. |
Copyright © 1999-2021 by the D Language Foundation