Type-Safer Modern High-Level Performant OpenGL

2014-03-06 Thread Nordlöw
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?


Re: Type-Safer Modern High-Level Performant OpenGL

2014-03-06 Thread Namespace

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.


Re: Type-Safer Modern High-Level Performant OpenGL

2014-03-06 Thread ponce

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.







Re: Type-Safer Modern High-Level Performant OpenGL

2014-03-06 Thread Nordlöw

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?


Re: Type-Safer Modern High-Level Performant OpenGL

2014-03-06 Thread Nordlöw

On thing though...why did you choose SDL2 of GLFW3?


I of course mean SDL2 *over* GLFW3.


Re: Type-Safer Modern High-Level Performant OpenGL

2014-03-06 Thread Nordlöw

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?


Re: Type-Safer Modern High-Level Performant OpenGL

2014-03-06 Thread Mike Parker

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


Re: Type-Safer Modern High-Level Performant OpenGL

2014-03-07 Thread ponce

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.


Re: Type-Safer Modern High-Level Performant OpenGL

2014-03-07 Thread ponce

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.