Jebbs / DSFML

DSFML is a D binding of SFML
Other
95 stars 23 forks source link

OpenGL Derelict3 #47

Closed auRose94 closed 11 years ago

auRose94 commented 11 years ago

I want to know how to get Derelict 3 paired with dsfml. Whats the best way to go about setting that up? I am probably not the only one wanting to find out how to do that as well... so it should be answered.

Currently I got it to compile with dsfml but my problem seems to be a issue with OpenGL context and I am kinda clueless on where to start first.

I do know how to draw OpenGL with SFML but with dsfml... Kinda clueless.

Jebbs commented 11 years ago

I planned on writing a wiki entry about this actually!

I have been able to get these to work together, so maybe I'll just write it sooner so that you can get it working too. ;)

Jebbs commented 11 years ago

It was going to be part of #21

auRose94 commented 11 years ago

Much appreciated, I got this one Idea and I want to use Derelict3; Using its Assimp3 and OpenGL libs. My game is a 2D Platformer,Similar to Limbo(Technology wise, Not story or color scheme), but I got this cool idea to put 3D stuff in the background and keep the gameplay 2D to mess with people and give an "awe" factor and its seems like a simple thing to figure out because I can make the models in 3DS and use of assimp3 and openGL to render it.

Jebbs commented 11 years ago

My last day of classes for this term is Thursday, so I should be able to make a very quick and dirty tutorial for you that weekend.

I should also have a beta version of the next version of DSFML done the same weekend by the way. :D

auRose94 commented 11 years ago

Looking forward to it!

auRose94 commented 11 years ago

Meanwhile... I am going to try to figure it out myself. I would still like to hear what you got though, even if I figure it out first.(yours could be better)

Jebbs commented 11 years ago

You're actually in luck!

I have a little bit of spare time so I'll have a minimal example in a few minutes.

Jebbs commented 11 years ago

I didn't have time to put in any code that actually draws stuff, but hopefully this will be enough to get you up and running.

https://github.com/Jebbs/DSFML/wiki/Using-Derelict-OpenGL-with-DSFML

You can pretty much follow any OpenGL tutorial from there!

auRose94 commented 11 years ago

I got ARB and it doesn't crash! I wasn't far off either; I didn't apply all the values to context(Depth) and I didn't reload after I made the window! Thanks man! Also... would setActive(bool) have an effect on anything?

Jebbs commented 11 years ago

Only if you want to switch between windows or render targets. You have to make a context active before you can draw using it.