www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Type-Safer Modern High-Level Performant OpenGL

reply =?UTF-8?B?Ik5vcmRsw7Z3Ig==?= <per.nordlow gmail.com> writes:
Does anybody have some sample code (example or project) lying 
around that shows modern use of OpenGL (3 or 4) using some or all 
of the following libraries:

- DerelictGL3 (Org)
- DerelictGLFW3 (Org)
- Glamour
- gl3n

I'm planning a graph visualization engine in D and I would like 
to use as high level D language abstractions as possible to 
implement this in OpenGL.

With modern I mean use of more high-level abstractions that more 
type-safely handles efficient (vectorized) processing of 2/3/4-D 
geometry (gl3n) and allocation and use of Shaders, VBO, etc 
similar to what

http://kifri.fri.uniza.sk/~chochlik/oglplus/html/

does but in D of course :)

This example

https://github.com/Dav1dde/glamour/blob/master/example/example.d

is good a start, I guess, but I would like to use GLFW3 instead.

Speaking of GLFW3 I also wonder why there are two wrappers for 
GLFW3:

- https://github.com/Dav1dde/glwtf
- https://github.com/DerelictOrg/DerelictGLFW3

and what the major differences are.

I could hack this together myself but if anybody already has put 
the pieces together why not reuse?
Mar 06 2014
next sibling parent "Namespace" <rswhite4 googlemail.com> writes:
Dgame use VBO's and VBA's for the TileMap:
http://dgame-dev.de/?package=System&module=VertexBufferObject
http://dgame-dev.de/?package=System&module=VertexArrayObject
http://dgame-dev.de/?package=System&module=VertexRenderer
http://dgame-dev.de/?package=Graphics&module=TileMap

and it has a FrameBufferObject implementation:
http://dgame-dev.de/?package=System&module=FrameBufferObject

But I'm not sure if that is helpful for you.
Mar 06 2014
prev sibling parent reply "ponce" <contact gam3sfrommars.fr> writes:
On Thursday, 6 March 2014 at 21:30:01 UTC, Nordlöw wrote:
 Does anybody have some sample code (example or project) lying 
 around that shows modern use of OpenGL (3 or 4) using some or 
 all of the following libraries:

 - DerelictGL3 (Org)
 - DerelictGLFW3 (Org)
 - Glamour
 - gl3n

 I'm planning a graph visualization engine in D and I would like 
 to use as high level D language abstractions as possible to 
 implement this in OpenGL.

 With modern I mean use of more high-level abstractions that 
 more type-safely handles efficient (vectorized) processing of 
 2/3/4-D geometry (gl3n) and allocation and use of Shaders, VBO, 
 etc similar to what

 http://kifri.fri.uniza.sk/~chochlik/oglplus/html/
Libraries that include an OpenGL wrapper are incredibly common in the D landscape. Everyone likes to make their own, why not. http://code.dlang.org/packages/ Here is a list in alphabetical order: anchovy batch-engine dash DGame GFM (my own, PLEASE, PLEASE CHOOSE ME) GLamour + gl3n graphite three.d ...and probably many others. From your library choices, it seems https://github.com/vova616/BatchEngine and https://github.com/Zoadian/three.d should be pretty close to what you want.
Mar 06 2014
next sibling parent reply =?UTF-8?B?Ik5vcmRsw7Z3Ig==?= <per.nordlow gmail.com> writes:
 GFM (my own, PLEASE, PLEASE CHOOSE ME)
From what I've seen so far I like the structure of GFM the most :) On thing though...why did you choose SDL2 of GLFW3?
Mar 06 2014
parent reply =?UTF-8?B?Ik5vcmRsw7Z3Ig==?= <per.nordlow gmail.com> writes:
 On thing though...why did you choose SDL2 of GLFW3?
I of course mean SDL2 *over* GLFW3.
Mar 06 2014
parent "ponce" <contact gam3sfrommars.fr> writes:
On Thursday, 6 March 2014 at 23:03:35 UTC, Nordlöw wrote:
 On thing though...why did you choose SDL2 of GLFW3?
I of course mean SDL2 *over* GLFW3.
Mostly familiarity because I've never used GLFW. What I really like in SDL is the software/DirectX renderers, which provides a tiny feature set, but allows reliable rendering with no graphics API whatsoever :). In all case you will be able to use gfm:opengl with GLFW, to create and select an OpenGL context is the only requirement.
Mar 07 2014
prev sibling parent reply =?UTF-8?B?Ik5vcmRsw7Z3Ig==?= <per.nordlow gmail.com> writes:
 GFM (my own, PLEASE, PLEASE CHOOSE ME)
I'm trying to build your package using dub but I get the error θ61° [per:~/justd/gfm] master ± dub Error executing command run: Main package must have a binary target type, not none. Cannot build. I'm using a recent build of dub from git master. What is wrong?
Mar 06 2014
next sibling parent Mike Parker <aldacron gmail.com> writes:
On 3/7/2014 8:16 AM, "Nordlöw" wrote:
 GFM (my own, PLEASE, PLEASE CHOOSE ME)
I'm trying to build your package using dub but I get the error θ61° [per:~/justd/gfm] master ± dub Error executing command run: Main package must have a binary target type, not none. Cannot build. I'm using a recent build of dub from git master. What is wrong?
dub build
Mar 06 2014
prev sibling parent "ponce" <contact gam3sfrommars.fr> writes:
On Thursday, 6 March 2014 at 23:16:26 UTC, Nordlöw wrote:
 GFM (my own, PLEASE, PLEASE CHOOSE ME)
I'm trying to build your package using dub but I get the error θ61° [per:~/justd/gfm] master ± dub Error executing command run: Main package must have a binary target type, not none. Cannot build. I'm using a recent build of dub from git master. What is wrong?
I get the same behaviour, but this looks reasonable to me. dub tries to build the package named "gfm", which has targetType "none" because it's an umbrella package to group sub-packages. What you can do instead is just referencing the sub-packages you need in your dub.json. Should work then.
Mar 07 2014