Jump to page: 1 2
Thread overview
D for game Development
Feb 15, 2012
RedShift
Feb 15, 2012
Jacob Carlborg
Feb 15, 2012
MattCodr
Feb 15, 2012
Kiith-Sa
Feb 15, 2012
Mike Parker
Feb 15, 2012
Kiith-Sa
Feb 16, 2012
Mike Parker
Feb 15, 2012
Chris Pons
Feb 15, 2012
Chris Pons
Feb 16, 2012
Mike Parker
Feb 16, 2012
Mike Parker
Feb 15, 2012
Trass3r
February 15, 2012
Can I use OpenGL or DirectX with D? If so, where can I find a guide to get everything setup?


February 15, 2012
On 2012-02-15 07:51, RedShift wrote:
> Can I use OpenGL or DirectX with D? If so, where can I find a guide to
> get everything setup?
>
>
Derelict contains bindings to OpenGL and various other game and media related libraries: http://www.dsource.org/projects/derelict

-- 
/Jacob Carlborg
February 15, 2012
On Wednesday, 15 February 2012 at 06:51:11 UTC, RedShift wrote:
> Can I use OpenGL or DirectX with D? If so, where can I find a guide to get everything setup?

I'm writing a tutorial explaining how to set everything with game example included!

I don't like to predict dates, but I'll release it pretty soon.
February 15, 2012
On Wednesday, 15 February 2012 at 06:51:11 UTC, RedShift wrote:
> Can I use OpenGL or DirectX with D? If so, where can I find a guide to get everything setup?

Derelict provides bindings for OpenGL and SDL (and many other game-related libraries) - these are used exactly the same way they are used in C/C++, so any
OpenGL/SDL tutorials for C/C++ apply.

Derelict has a few of its own functions that can/need to be called when initializing, described in its documentation.

The current stable version of Derelict supports only OpenGL up to 2.1 and SDL 1.2, but support for OpenGL 3.0+ and SDL2 is being worked on.

For the current development version, see

https://github.com/aldacron/Derelict3

(Derelict moved to GitHub recently)
February 15, 2012
On 2/16/2012 12:41 AM, Kiith-Sa wrote:
> On Wednesday, 15 February 2012 at 06:51:11 UTC, RedShift wrote:
>> Can I use OpenGL or DirectX with D? If so, where can I find a guide to
>> get everything setup?
>
> Derelict provides bindings for OpenGL and SDL (and many other
> game-related libraries) - these are used exactly the same way they are
> used in C/C++, so any
> OpenGL/SDL tutorials for C/C++ apply.
>
> Derelict has a few of its own functions that can/need to be called when
> initializing, described in its documentation.
>
> The current stable version of Derelict supports only OpenGL up to 2.1
> and SDL 1.2, but support for OpenGL 3.0+ and SDL2 is being worked on.

To clarify, Derelict 2 fully supports up to OpenGL 3.3. 4.x support is partial (but will be fully implemented very soon). Derelict 3 supports all versions of OpenGL, minus features deprecated in 3.x (i.e. core OpenGL profiles only).

>
> For the current development version, see
>
> https://github.com/aldacron/Derelict3
>
> (Derelict moved to GitHub recently)


February 15, 2012
> To clarify, Derelict 2 fully supports up to OpenGL 3.3. 4.x support is partial (but will be fully implemented very soon). Derelict 3 supports all versions of OpenGL, minus features deprecated in 3.x (i.e. core OpenGL profiles only).

Does that mean it is not possible to use old OpenGL 2.x style code with Derelict3?

I'm planning to move to a GL3 video backend for my project, but I still expect to support GL2 for platforms where GL3 is not supported - e.g. Linux with open source drivers (although those should be getting basic GL 3.0 support this year)

I can understand if old GL is too much effort to support, though - in the worst case, I can use Derelict2 based code for a few more years.
February 15, 2012
On Wednesday, 15 February 2012 at 15:41:02 UTC, Kiith-Sa wrote:
> On Wednesday, 15 February 2012 at 06:51:11 UTC, RedShift wrote:
>> Can I use OpenGL or DirectX with D? If so, where can I find a guide to get everything setup?
>
> Derelict provides bindings for OpenGL and SDL (and many other game-related libraries) - these are used exactly the same way they are used in C/C++, so any
> OpenGL/SDL tutorials for C/C++ apply.
>
> Derelict has a few of its own functions that can/need to be called when initializing, described in its documentation.
>
> The current stable version of Derelict supports only OpenGL up to 2.1 and SDL 1.2, but support for OpenGL 3.0+ and SDL2 is being worked on.
>
> For the current development version, see
>
> https://github.com/aldacron/Derelict3
>
> (Derelict moved to GitHub recently)

Ok, So let me get this straight. I can use Derelict with OpenGL 3. ish, and support for 4.0 is on the way.

I can also use any tutorials to learn Opengl?

That is really good news.


February 15, 2012
I am sorry about the double post. I am in the middle of trying to install derelict following this tutorial:

http://h3.gd/dmedia/?n=Tutorials.SdlGlTutorial1

However, when I get to the third step I get this error:


Error	1	Error: module gl is in file 'derelict\opengl\gl.d' which cannot be read	D:\Documents\Projects\Test\Test\main.d	3	

I am assuming this means that gl.d can not be found. However, my derelict source files are in

.../dmd2/src/ext/derelict/

In my VS project under the options panel, I pointed my DMD install path to D:\Documents\Projects\DMD2 .

Do I need to set the Import and Library path as well?
February 15, 2012
> Can I use OpenGL or DirectX with D?

Of course.

E.g. there's a D1 game engine: http://yage3d.net
I think http://3d.benjamin-thaut.de/?p=16 is D2, but it's rendering code only.
February 16, 2012
On 2/16/2012 1:23 AM, Kiith-Sa wrote:
>> To clarify, Derelict 2 fully supports up to OpenGL 3.3. 4.x support is
>> partial (but will be fully implemented very soon). Derelict 3 supports
>> all versions of OpenGL, minus features deprecated in 3.x (i.e. core
>> OpenGL profiles only).
>
> Does that mean it is not possible to use old OpenGL 2.x style code with
> Derelict3?
>
> I'm planning to move to a GL3 video backend for my project, but I still
> expect to support GL2 for platforms where GL3 is not supported - e.g.
> Linux with open source drivers (although those should be getting basic
> GL 3.0 support this year)
>
> I can understand if old GL is too much effort to support, though - in
> the worst case, I can use Derelict2 based code for a few more years.

If you aren't using any deprecated features, you'll be fine with DerelictGL3. However, I realize that there will be a number of people who aren't ready to fully migrate to 3.x and may need to continue using deprecated features for a while. So I will be making a package that supports that sort of thing, i.e. a port of what's in Derelict 2.
« First   ‹ Prev
1 2