Thread overview | |||||||||
---|---|---|---|---|---|---|---|---|---|
|
May 24, 2006 OpenGL Bindings | ||||
---|---|---|---|---|
| ||||
Im using the GL bindings from http://dsource.org/projects/bindings/wiki/OpenGraphicsLibrary but they cause my executable to crash, even before my main has been called. Has anyone else experienced this? There doesnt seem to be any documentation that I can see. |
May 24, 2006 Re: OpenGL Bindings | ||||
---|---|---|---|---|
| ||||
Posted in reply to Michael | I'm guessing it's something to do with the bindings using std.loader to
get the addresses of the functions used, and making function pointers to
call them. I haven't tried using OpenGL with D before, but I was
planning on doing it soon, so I'm probably going to follow in your
steps. :)
Btw, what platform are you on?
/Anders
ons 2006-05-24 klockan 20:23 +0000 skrev Michael:
> Im using the GL bindings from http://dsource.org/projects/bindings/wiki/OpenGraphicsLibrary but they cause my executable to crash, even before my main has been called. Has anyone else experienced this? There doesnt seem to be any documentation that I can see.
>
>
|
May 25, 2006 Re: OpenGL Bindings | ||||
---|---|---|---|---|
| ||||
Posted in reply to Anders Runesson | Anders Runesson wrote: > I'm guessing it's something to do with the bindings using std.loader to > get the addresses of the functions used, and making function pointers to > call them. I haven't tried using OpenGL with D before, but I was > planning on doing it soon, so I'm probably going to follow in your > steps. :) The OpenGL bindings in the Bindings project do not load through std.loader. It's a binding that requires statically linking with the import library. Derelict is the project that loads dynamically, but through a custom loading mechanism rather than std.loader. > > ons 2006-05-24 klockan 20:23 +0000 skrev Michael: >> Im using the GL bindings from >> http://dsource.org/projects/bindings/wiki/OpenGraphicsLibrary but they cause my >> executable to crash, even before my main has been called. Has anyone else >> experienced this? There doesnt seem to be any documentation that I can see. The Bindings project is a loose collection of bindings contributed by several different people. Sort of a fire and forget thing. That's most likely why there's not any documentation. If you are on Windows, make sure you use the lib and def files provided by the bindings projects (in the lib and def subdirectories, respectively). |
May 25, 2006 Re: OpenGL Bindings | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike Parker | No, those bindings do use std.loader. They are very similar in concept to the ones in Derelict, with the main difference being support for extensions. Hopefully they can be merged later, but that's not up to Mike Parker.
If you can give more information about what's going wrong, we can try to help.
Mike Parker wrote:
> Anders Runesson wrote:
>> I'm guessing it's something to do with the bindings using std.loader to
>> get the addresses of the functions used, and making function pointers to
>> call them. I haven't tried using OpenGL with D before, but I was
>> planning on doing it soon, so I'm probably going to follow in your
>> steps. :)
>
> The OpenGL bindings in the Bindings project do not load through std.loader. It's a binding that requires statically linking with the import library. Derelict is the project that loads dynamically, but through a custom loading mechanism rather than std.loader.
>
>
>>
>> ons 2006-05-24 klockan 20:23 +0000 skrev Michael:
>>> Im using the GL bindings from
>>> http://dsource.org/projects/bindings/wiki/OpenGraphicsLibrary but they cause my
>>> executable to crash, even before my main has been called. Has anyone else
>>> experienced this? There doesnt seem to be any documentation that I can see.
>
> The Bindings project is a loose collection of bindings contributed by several different people. Sort of a fire and forget thing. That's most likely why there's not any documentation. If you are on Windows, make sure you use the lib and def files provided by the bindings projects (in the lib and def subdirectories, respectively).
|
May 25, 2006 Re: OpenGL Bindings | ||||
---|---|---|---|---|
| ||||
Posted in reply to James Pelcis | Sorry. the sentence "Hopefully they can be merged later, but that's not up to Mike Parker." isn't supposed to have a "not" in it.
James Pelcis wrote:
> No, those bindings do use std.loader. They are very similar in concept to the ones in Derelict, with the main difference being support for extensions. Hopefully they can be merged later, but that's not up to Mike Parker.
>
> If you can give more information about what's going wrong, we can try to help.
>
> Mike Parker wrote:
>> Anders Runesson wrote:
>>> I'm guessing it's something to do with the bindings using std.loader to
>>> get the addresses of the functions used, and making function pointers to
>>> call them. I haven't tried using OpenGL with D before, but I was
>>> planning on doing it soon, so I'm probably going to follow in your
>>> steps. :)
>>
>> The OpenGL bindings in the Bindings project do not load through std.loader. It's a binding that requires statically linking with the import library. Derelict is the project that loads dynamically, but through a custom loading mechanism rather than std.loader.
>>
>>
>>>
>>> ons 2006-05-24 klockan 20:23 +0000 skrev Michael:
>>>> Im using the GL bindings from
>>>> http://dsource.org/projects/bindings/wiki/OpenGraphicsLibrary but they cause my
>>>> executable to crash, even before my main has been called. Has anyone else
>>>> experienced this? There doesnt seem to be any documentation that I can see.
>>
>> The Bindings project is a loose collection of bindings contributed by several different people. Sort of a fire and forget thing. That's most likely why there's not any documentation. If you are on Windows, make sure you use the lib and def files provided by the bindings projects (in the lib and def subdirectories, respectively).
|
May 25, 2006 Re: OpenGL Bindings | ||||
---|---|---|---|---|
| ||||
Posted in reply to James Pelcis | James Pelcis wrote:
> No, those bindings do use std.loader. They are very similar in concept to the ones in Derelict, with the main difference being support for extensions. Hopefully they can be merged later, but that's not up to Mike Parker.
I see. You must be talking about the zip download on the project homepage. That's a bit confusing, as John Reimer committed OpenGL and GLU bindings to the Bindings project trunk some time ago and that's the first place I looked. That definitely doesn't use std.loader.
BTW, I'll definitely be looking at getting those extensions into Derelict. I haven't looked yet at how you've structured it. Derelict originally included automatic extension loading, but I wasn't quite happy with my initial implementation and pulled it in the hopes I'd come up with something slick later on.
|
May 25, 2006 Re: OpenGL Bindings | ||||
---|---|---|---|---|
| ||||
Posted in reply to Michael | Michael wrote:
> Im using the GL bindings from
> http://dsource.org/projects/bindings/wiki/OpenGraphicsLibrary but they cause my
> executable to crash, even before my main has been called. Has anyone else
> experienced this? There doesnt seem to be any documentation that I can see.
>
>
If you want openGL bindings the glfw project have some that I have found working glfw.sf.net just download the archive and dig trough it for gl.d and glu.d
|
Copyright © 1999-2021 by the D Language Foundation