Jump to page: 1 2 3
Thread overview
D is totally useless
May 01, 2013
Temtaime
May 01, 2013
Raphaël Jakse
May 02, 2013
Carlos
May 02, 2013
evilrat
May 02, 2013
Rob T
May 02, 2013
Diggory
May 03, 2013
Jacob Carlborg
May 03, 2013
evilrat
May 04, 2013
WhatMeWorry
May 03, 2013
Jesse Phillips
May 04, 2013
Idan Arye
May 02, 2013
Carlos
May 05, 2013
Raphaël Jakse
May 01, 2013
Jacob Carlborg
May 01, 2013
evilrat
May 01, 2013
John Colvin
May 01, 2013
John Colvin
May 01, 2013
Damian
May 02, 2013
Jacob Carlborg
May 01, 2013
Temtaime
May 01, 2013
Dejan Lekic
May 01, 2013
Temtaime
May 01, 2013
John Colvin
May 02, 2013
Jesse Phillips
May 02, 2013
Jesse Phillips
May 05, 2013
David
May 01, 2013
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 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
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.
« First   ‹ Prev
1 2 3