digitalmars.D.learn - D is totally useless
- Temtaime (32/32) May 01 2013 I'm new in D, so i'm tried to write some in that langugage.
- =?UTF-8?B?UmFwaGHDq2wgSmFrc2U=?= (6/9) May 01 2013 You can do much better with the D programming langage.
- Carlos (3/14) May 01 2013 But where can this be learned ? Do you know any books on the
- evilrat (5/21) May 01 2013 learn what? opengl is C API specification, any resource about
- Rob T (8/12) May 02 2013 I use this on-line book on D.
- Diggory (3/3) May 02 2013 The wgl*** functions and "SwapBuffers" ARE part of the windows
- Jacob Carlborg (5/8) May 02 2013 wgl*** is the Windows specific OpenGL functions? Then it make sense to
- evilrat (9/17) May 03 2013 yes they are. but that set of function is quite similar on both
- WhatMeWorry (3/3) May 04 2013 You sir need Derelict3: https://github.com/aldacron/Derelict3
- Jesse Phillips (5/8) May 03 2013 You recalled correctly, and according to MS these describe OpenGL
- Idan Arye (9/17) May 04 2013 You can't use OpenGL without creating a context(a window), and
- Carlos (2/24) May 02 2013 Ok
- =?UTF-8?B?UmFwaGHDq2wgSmFrc2U=?= (5/19) May 05 2013 Sorry for the delay.
- Jacob Carlborg (4/6) May 01 2013 Declarations are basically added on a need to need basis.
- evilrat (30/62) May 01 2013 don't mix mainstream language popularity drawn with all that
- John Colvin (13/45) May 01 2013 You've posted this to D.learn, yet you don't seem to be asking
- John Colvin (5/37) May 01 2013 A modern example of openGL usage in D:
- Damian (14/46) May 01 2013 The lack of proper windows headers is very discerning for windows
- Jacob Carlborg (7/11) May 01 2013 You're complaining about Windows. I can tell you that it doesn't look
- Temtaime (7/7) May 01 2013 I had investigate a little more in it.
- Dejan Lekic (6/15) May 01 2013 Why on the Earth would you include opengl32 in the DMD package??
- Temtaime (5/5) May 01 2013 And why not?
- John Colvin (13/15) May 01 2013 Is that strictly speaking true? I didn't think opengl was part of
- Jesse Phillips (3/8) May 01 2013 It is not. DirectX isn't even part of the WinAPI and that is what
- Andrei Alexandrescu (3/12) May 02 2013 Probably would make for a good deimos addition.
- Jesse Phillips (4/20) May 02 2013 Agreed probably would be a good pull request for
- David (2/16) May 05 2013 Why on the Earth would you include curl in the DMD package?? - Oh wait.....
I'm new in D, so i'm tried to write some in that langugage. That's story about how i tried to port OGL sample, that renders one triangle. I was very surprised when i found, that D doesn't have equivalent of gl/gl.h. Any C++ compiler has it. Okay, i'm investigate in it and found OpenGL in deimos. It doesn't support a lot of OGL function such as glPushMatrix and others. Okay, then i found derelict3. It has a lot of OGl functions and it's okay. When i tried to rewrite example to D, i was shocked. core.sys.windows.windows doesn't have a lot of functions. It doesn't contain simple function DestroyWindow for example. It's intresting, but go ahead, i found derelict.util.wintypes with missing functions. I've got a lot of "conflicts with" errors, because some of functions was in derelict's wintypes too. I've solved it. When i tried to link my program, i've got a lot of "undefined reference" errors. Okay, i've built and link derelict libraries. Then errors became stranger: DerelictUtil.lib(traits) Offset 204C4H Record Type 0091 Error 1: Previous Definition Different : _D67 DMD\windows\bin\..\..\src\phobos\std\traits.d.17012__ModuleInfoZ So i can't to rewrite simple OpenGL example that consists of 50 lines. This example works on every C++ compiler without building/finding any libraries. Dlang's standard windows.h heade is useless, because a lot of functions/structs definitions is missing. Dlang is a toy in outer space. One can only to write a+b program in schools on it. Now i'm understand, that's why D doesn't have popularity after 10+ years of existence.
May 01 2013
Le 01/05/2013 10:42, Temtaime a écrit :I'm new in D, so i'm tried to write some in that langugage. That's story about how i tried to port OGL sample, that renders one triangle.You can do much better with the D programming langage. See : - http://www.asahi-net.or.jp/~cs8k-cyu/windows/tt_e.html - http://www.emhsoft.com/ttrooper/ So yes, you can do OpenGL with D, and it works.
May 01 2013
On Wednesday, 1 May 2013 at 08:53:18 UTC, Raphaël Jakse wrote:Le 01/05/2013 10:42, Temtaime a écrit :But where can this be learned ? Do you know any books on the subject ?I'm new in D, so i'm tried to write some in that langugage. That's story about how i tried to port OGL sample, that renders one triangle.You can do much better with the D programming langage. See : - http://www.asahi-net.or.jp/~cs8k-cyu/windows/tt_e.html - http://www.emhsoft.com/ttrooper/ So yes, you can do OpenGL with D, and it works.
May 01 2013
On Thursday, 2 May 2013 at 02:07:23 UTC, Carlos wrote:On Wednesday, 1 May 2013 at 08:53:18 UTC, Raphaël Jakse wrote:learn what? opengl is C API specification, any resource about opengl will work, the only thing required for apply it to D is to know D basics. but unfortunately for D itself it is really hard to find good tutorialsLe 01/05/2013 10:42, Temtaime a écrit :But where can this be learned ? Do you know any books on the subject ?I'm new in D, so i'm tried to write some in that langugage. That's story about how i tried to port OGL sample, that renders one triangle.You can do much better with the D programming langage. See : - http://www.asahi-net.or.jp/~cs8k-cyu/windows/tt_e.html - http://www.emhsoft.com/ttrooper/ So yes, you can do OpenGL with D, and it works.
May 01 2013
On Thursday, 2 May 2013 at 04:27:10 UTC, evilrat wrote:learn what? opengl is C API specification, any resource about opengl will work, the only thing required for apply it to D is to know D basics. but unfortunately for D itself it is really hard to find good tutorialsI use this on-line book on D. http://ddili.org/ders/d.en/index.html Unfortunately, not 100% translated yet, but it's still an active project being worked on so I expect eventually it will get filly translated. A really nice thing about it, is that it gets updated to reflect the latest changes and additions to D. --rt
May 02 2013
The wgl*** functions and "SwapBuffers" ARE part of the windows api even though they are implemented in opengl32.dll (they are declared in wingdi.h IIRC)
May 02 2013
On 2013-05-02 22:23, Diggory wrote:The wgl*** functions and "SwapBuffers" ARE part of the windows api even though they are implemented in opengl32.dll (they are declared in wingdi.h IIRC)wgl*** is the Windows specific OpenGL functions? Then it make sense to be part of the Windows API. -- /Jacob Carlborg
May 02 2013
On Friday, 3 May 2013 at 06:15:20 UTC, Jacob Carlborg wrote:On 2013-05-02 22:23, Diggory wrote:yes they are. but that set of function is quite similar on both windows(wgl_***) and linux(glx_*** stuff)(mac has both carbon/cocoa specific stuff), however there are some differences in os level stuff like swap buffers and other, if wgl*** winapi decls will be added to phobos i wish there are also be added similar linux/x11 stuff, though i don't and don't plan to use linux that stuff will help a lot for all coders(standardization and so on) -_-The wgl*** functions and "SwapBuffers" ARE part of the windows api even though they are implemented in opengl32.dll (they are declared in wingdi.h IIRC)wgl*** is the Windows specific OpenGL functions? Then it make sense to be part of the Windows API.
May 03 2013
You sir need Derelict3: https://github.com/aldacron/Derelict3 It not only has the gl.h you are looking for but FreeGlut, OGG, openAL, SDL2, etc.
May 04 2013
On Thursday, 2 May 2013 at 20:23:53 UTC, Diggory wrote:The wgl*** functions and "SwapBuffers" ARE part of the windows api even though they are implemented in opengl32.dll (they are declared in wingdi.h IIRC)You recalled correctly, and according to MS these describe OpenGL 1.1. Anyway, OpenGL, and the gl.h file is not part of the Windows API. But I'd defiantly be for all the .h files in the SDK to be translated for Phobos.
May 03 2013
On Friday, 3 May 2013 at 16:48:42 UTC, Jesse Phillips wrote:On Thursday, 2 May 2013 at 20:23:53 UTC, Diggory wrote:You can't use OpenGL without creating a context(a window), and for that you a windowing system - either a general one(Win32/X/GTK/Qt) or an OpenGL-toolkit(GLUT/GLFW/SDL)(Yes, I know SDL is not an OpenGL toolkit, but it can function as one). Phobos does not have any windowing system - the Win32 binding are about the Windows filesystem and DLL loading, not about creating, managing and using graphical windows. That means you'll have to get an external library anyways to use OpenGL.The wgl*** functions and "SwapBuffers" ARE part of the windows api even though they are implemented in opengl32.dll (they are declared in wingdi.h IIRC)You recalled correctly, and according to MS these describe OpenGL 1.1. Anyway, OpenGL, and the gl.h file is not part of the Windows API. But I'd defiantly be for all the .h files in the SDK to be translated for Phobos.
May 04 2013
On Thursday, 2 May 2013 at 04:27:10 UTC, evilrat wrote:On Thursday, 2 May 2013 at 02:07:23 UTC, Carlos wrote:OkOn Wednesday, 1 May 2013 at 08:53:18 UTC, Raphaël Jakse wrote:learn what? opengl is C API specification, any resource about opengl will work, the only thing required for apply it to D is to know D basics. but unfortunately for D itself it is really hard to find good tutorialsLe 01/05/2013 10:42, Temtaime a écrit :But where can this be learned ? Do you know any books on the subject ?I'm new in D, so i'm tried to write some in that langugage. That's story about how i tried to port OGL sample, that renders one triangle.You can do much better with the D programming langage. See : - http://www.asahi-net.or.jp/~cs8k-cyu/windows/tt_e.html - http://www.emhsoft.com/ttrooper/ So yes, you can do OpenGL with D, and it works.
May 02 2013
Le 02/05/2013 04:07, Carlos a écrit :On Wednesday, 1 May 2013 at 08:53:18 UTC, Raphaël Jakse wrote:Sorry for the delay. Unfortunately I'm still out of any OpenGL development. As a result, I don't have any book to suggest. I just know it is possible to develop OpenGL apps with D but I never tried myself.Le 01/05/2013 10:42, Temtaime a écrit :But where can this be learned ? Do you know any books on the subject ?I'm new in D, so i'm tried to write some in that langugage. That's story about how i tried to port OGL sample, that renders one triangle.You can do much better with the D programming langage. See : - http://www.asahi-net.or.jp/~cs8k-cyu/windows/tt_e.html - http://www.emhsoft.com/ttrooper/ So yes, you can do OpenGL with D, and it works.
May 05 2013
On 2013-05-01 10:42, Temtaime wrote:core.sys.windows.windows doesn't have a lot of functions. It doesn't contain simple function DestroyWindow for example.Declarations are basically added on a need to need basis. -- /Jacob Carlborg
May 01 2013
On Wednesday, 1 May 2013 at 08:42:40 UTC, Temtaime wrote:I'm new in D, so i'm tried to write some in that langugage. That's story about how i tried to port OGL sample, that renders one triangle. I was very surprised when i found, that D doesn't have equivalent of gl/gl.h. Any C++ compiler has it. Okay, i'm investigate in it and found OpenGL in deimos. It doesn't support a lot of OGL function such as glPushMatrix and others. Okay, then i found derelict3. It has a lot of OGl functions and it's okay. When i tried to rewrite example to D, i was shocked. core.sys.windows.windows doesn't have a lot of functions. It doesn't contain simple function DestroyWindow for example. It's intresting, but go ahead, i found derelict.util.wintypes with missing functions. I've got a lot of "conflicts with" errors, because some of functions was in derelict's wintypes too. I've solved it. When i tried to link my program, i've got a lot of "undefined reference" errors. Okay, i've built and link derelict libraries. Then errors became stranger: DerelictUtil.lib(traits) Offset 204C4H Record Type 0091 Error 1: Previous Definition Different : _D67 DMD\windows\bin\..\..\src\phobos\std\traits.d.17012__ModuleInfoZ So i can't to rewrite simple OpenGL example that consists of 50 lines. This example works on every C++ compiler without building/finding any libraries. Dlang's standard windows.h heade is useless, because a lot of functions/structs definitions is missing. Dlang is a toy in outer space. One can only to write a+b program in schools on it. Now i'm understand, that's why D doesn't have popularity after 10+ years of existence.don't mix mainstream language popularity drawn with all that tools and libraries over such "enthusiastic" language like D, for me(and i believe for many others too) D is an instrument of creation, like a brush in an artist hands. with such few tools available for D you can still do almost anything much better and faster than with any that tools available for C++. D has lots of advantages, but sure it has some disadvantages, like you said it's still "young", meaning that there is not so much support available from community like for C++, there are not so much commercial acceptance still like C++ has, that makes it so "successful", not because it is so good... well it is your opinion anyway, and no one is goind to ask you keep using D, but personally i just hate when someone start whine or complain about "how bad it is" just because of few fails. D requires some time investment and strong will in order to make it useful, if one don't have it, it will be a waste of time. i just wish you good luck using C++ or whatever, and please don't blame D because that is you don't want to bother to overcome any difficulties, and if i'm wrong just be kind and ask people here on forum before throwing crap on a language. and finally concerning opengl - don't bother with deimos or other stuff only if you are interested in creating your own low level wrapper libs. get helper libs such like derelict3(!) and glfw(it's too can be found in derelict) and you will be happy. just give D a chance and it will pay you back. p.s. that's not language is broken, but a linker/compiler and other essentials tools(which aren't broken in fact). p.p.s. sorry if i got you feel bad, and for being such boring when writing all this stuff.
May 01 2013
On Wednesday, 1 May 2013 at 08:42:40 UTC, Temtaime wrote:I'm new in D, so i'm tried to write some in that langugage. That's story about how i tried to port OGL sample, that renders one triangle. I was very surprised when i found, that D doesn't have equivalent of gl/gl.h. Any C++ compiler has it. Okay, i'm investigate in it and found OpenGL in deimos. It doesn't support a lot of OGL function such as glPushMatrix and others. Okay, then i found derelict3. It has a lot of OGl functions and it's okay. When i tried to rewrite example to D, i was shocked. core.sys.windows.windows doesn't have a lot of functions. It doesn't contain simple function DestroyWindow for example. It's intresting, but go ahead, i found derelict.util.wintypes with missing functions. I've got a lot of "conflicts with" errors, because some of functions was in derelict's wintypes too. I've solved it. When i tried to link my program, i've got a lot of "undefined reference" errors. Okay, i've built and link derelict libraries. Then errors became stranger: DerelictUtil.lib(traits) Offset 204C4H Record Type 0091 Error 1: Previous Definition Different : _D67 DMD\windows\bin\..\..\src\phobos\std\traits.d.17012__ModuleInfoZ So i can't to rewrite simple OpenGL example that consists of 50 lines. This example works on every C++ compiler without building/finding any libraries. Dlang's standard windows.h heade is useless, because a lot of functions/structs definitions is missing. Dlang is a toy in outer space. One can only to write a+b program in schools on it. Now i'm understand, that's why D doesn't have popularity after 10+ years of existence.You've posted this to D.learn, yet you don't seem to be asking for help. You merely appear to have come here to tell us how rubbish we are. It's quite possible that there is a very easy solution to your current problem, however I'm not a windows man myself, so unfortunately I'm unlikely to be of much help. However, I will say this: If something is genuinely missing that you need, just ask for it to be included. Or, you could add it yourself and create a pull request for it. At a brief glance it looks fairly trivial to add new functions to core.sys.windows.windows (which btw you can import as std.c.windows).
May 01 2013
On Wednesday, 1 May 2013 at 08:42:40 UTC, Temtaime wrote:I'm new in D, so i'm tried to write some in that langugage. That's story about how i tried to port OGL sample, that renders one triangle. I was very surprised when i found, that D doesn't have equivalent of gl/gl.h. Any C++ compiler has it. Okay, i'm investigate in it and found OpenGL in deimos. It doesn't support a lot of OGL function such as glPushMatrix and others. Okay, then i found derelict3. It has a lot of OGl functions and it's okay. When i tried to rewrite example to D, i was shocked. core.sys.windows.windows doesn't have a lot of functions. It doesn't contain simple function DestroyWindow for example. It's intresting, but go ahead, i found derelict.util.wintypes with missing functions. I've got a lot of "conflicts with" errors, because some of functions was in derelict's wintypes too. I've solved it. When i tried to link my program, i've got a lot of "undefined reference" errors. Okay, i've built and link derelict libraries. Then errors became stranger: DerelictUtil.lib(traits) Offset 204C4H Record Type 0091 Error 1: Previous Definition Different : _D67 DMD\windows\bin\..\..\src\phobos\std\traits.d.17012__ModuleInfoZ So i can't to rewrite simple OpenGL example that consists of 50 lines. This example works on every C++ compiler without building/finding any libraries. Dlang's standard windows.h heade is useless, because a lot of functions/structs definitions is missing. Dlang is a toy in outer space. One can only to write a+b program in schools on it. Now i'm understand, that's why D doesn't have popularity after 10+ years of existence.A modern example of openGL usage in D: https://github.com/kiith-sa/ICE It looks from the readme like he may have had some similar problem with linking on windows.
May 01 2013
On Wednesday, 1 May 2013 at 08:42:40 UTC, Temtaime wrote:I'm new in D, so i'm tried to write some in that langugage. That's story about how i tried to port OGL sample, that renders one triangle. I was very surprised when i found, that D doesn't have equivalent of gl/gl.h. Any C++ compiler has it. Okay, i'm investigate in it and found OpenGL in deimos. It doesn't support a lot of OGL function such as glPushMatrix and others. Okay, then i found derelict3. It has a lot of OGl functions and it's okay. When i tried to rewrite example to D, i was shocked. core.sys.windows.windows doesn't have a lot of functions. It doesn't contain simple function DestroyWindow for example. It's intresting, but go ahead, i found derelict.util.wintypes with missing functions. I've got a lot of "conflicts with" errors, because some of functions was in derelict's wintypes too. I've solved it. When i tried to link my program, i've got a lot of "undefined reference" errors. Okay, i've built and link derelict libraries. Then errors became stranger: DerelictUtil.lib(traits) Offset 204C4H Record Type 0091 Error 1: Previous Definition Different : _D67 DMD\windows\bin\..\..\src\phobos\std\traits.d.17012__ModuleInfoZ So i can't to rewrite simple OpenGL example that consists of 50 lines. This example works on every C++ compiler without building/finding any libraries. Dlang's standard windows.h heade is useless, because a lot of functions/structs definitions is missing. Dlang is a toy in outer space. One can only to write a+b program in schools on it. Now i'm understand, that's why D doesn't have popularity after 10+ years of existence.The lack of proper windows headers is very discerning for windows users and many have argued that D should come with these by default, I do think that it does hurt D's reputation when a windows uses as to jump through hoops just to display a window. Having said that there is this: https://github.com/AndrejMitrovic/WindowsAPI , which is a nice port of the WinAPI, as for OpenGL last time I looked Derelict was the way to go. There are a couple of tools like rdmd that will make building your application a bit easier.
May 01 2013
On 2013-05-01 16:18, Damian wrote:The lack of proper windows headers is very discerning for windows users and many have argued that D should come with these by default, I do think that it does hurt D's reputation when a windows uses as to jump through hoops just to display a window.You're complaining about Windows. I can tell you that it doesn't look good for anyone. To get a window on Mac OS X you need to interact with Objective-C (no I don't want to use Carbon), which is possible but it's a pain in the ass. -- /Jacob Carlborg
May 01 2013
I had investigate a little more in it. Thanks to Jack Applegame, we made a copy of gl/gl.h and opengl32.lib for DMD. http://acomirei.ru/u/gl.d http://acomirei.ru/u/opengl32.lib I hope it will be included in DMD, now it's first draft of our work.
May 01 2013
Temtaime wrote:I had investigate a little more in it. Thanks to Jack Applegame, we made a copy of gl/gl.h and opengl32.lib for DMD. http://acomirei.ru/u/gl.d http://acomirei.ru/u/opengl32.lib I hope it will be included in DMD, now it's first draft of our work.Why on the Earth would you include opengl32 in the DMD package?? -- Dejan Lekic dejan.lekic (a) gmail.com http://dejan.lekic.org
May 01 2013
And why not? If not, then you should drop support of platform specific headers like windows.d. Because it's full of a drawing and many other functions. OpenGL is part of WinAPI.
May 01 2013
On Wednesday, 1 May 2013 at 21:26:32 UTC, Temtaime wrote:Because it's full of a drawing and many other functions. OpenGL is part of WinAPI.Is that strictly speaking true? I didn't think opengl was part of the windows api (WinAPI) itself. Anyway, afaik opengl is not provided by c/c++ compilers. Opengl is just pre-installed on most OSs, along with its c/c++ headers, meaning it is ready to include/import and link to. It is a separate library and headers, installed separately from the compiler. However, one could make an argument that opengl is sufficiently ubiquitous that d bindings should be shipped with the compiler, similar to the core OS bindings. I personally think not, but if you disagree then I suggest making a separate thread in the main D newsgroup/forum proposing it.
May 01 2013
On Wednesday, 1 May 2013 at 22:33:40 UTC, John Colvin wrote:On Wednesday, 1 May 2013 at 21:26:32 UTC, Temtaime wrote:It is not. DirectX isn't even part of the WinAPI and that is what Microsoft backs.Because it's full of a drawing and many other functions. OpenGL is part of WinAPI.Is that strictly speaking true? I didn't think opengl was part of the windows api (WinAPI) itself.
May 01 2013
On 5/1/13 6:20 PM, Jesse Phillips wrote:On Wednesday, 1 May 2013 at 22:33:40 UTC, John Colvin wrote:Probably would make for a good deimos addition. AndreiOn Wednesday, 1 May 2013 at 21:26:32 UTC, Temtaime wrote:It is not. DirectX isn't even part of the WinAPI and that is what Microsoft backs.Because it's full of a drawing and many other functions. OpenGL is part of WinAPI.Is that strictly speaking true? I didn't think opengl was part of the windows api (WinAPI) itself.
May 02 2013
On Thursday, 2 May 2013 at 07:39:29 UTC, Andrei Alexandrescu wrote:On 5/1/13 6:20 PM, Jesse Phillips wrote:Agreed probably would be a good pull request for https://github.com/D-Programming-Deimos/OpenGLOn Wednesday, 1 May 2013 at 22:33:40 UTC, John Colvin wrote:Probably would make for a good deimos addition. AndreiOn Wednesday, 1 May 2013 at 21:26:32 UTC, Temtaime wrote:It is not. DirectX isn't even part of the WinAPI and that is what Microsoft backs.Because it's full of a drawing and many other functions. OpenGL is part of WinAPI.Is that strictly speaking true? I didn't think opengl was part of the windows api (WinAPI) itself.
May 02 2013
Am 01.05.2013 21:36, schrieb Dejan Lekic:Temtaime wrote:Why on the Earth would you include curl in the DMD package?? - Oh wait...I had investigate a little more in it. Thanks to Jack Applegame, we made a copy of gl/gl.h and opengl32.lib for DMD. http://acomirei.ru/u/gl.d http://acomirei.ru/u/opengl32.lib I hope it will be included in DMD, now it's first draft of our work.Why on the Earth would you include opengl32 in the DMD package??
May 05 2013