OpenGL effects?


Is it possible to use OpenGL to create effects? Something like filling polygons with colors, lightning, splashes, water etc.
It would be great way to make cool effects.

P.S. Is there way to use MonoGame framework with C++ or C? I can handle myself with C#, so I’d like to start learning other languages during Summer.

You can use shaders in MonoGame (I’m assuming that’s what you mean), but you should write them in HLSL. HLSL is very similar to GLSL though. You can also use OpenGL directly if you want, but you’ll need to provide your own interop stuff because MG doesn’t expose any of that low-level stuff.

You can use C++/CLI to easily call C# code. Other than that, I really don’t know.

1 Like


Yes you can write shaders just the way you can in XNA. You do write them in HLSL though, they get translated automatically to your target platform

You can only use monogame with c# or f# as far as I know

1 Like

This just happened:
Maybe MG could be built with it for consumption by C/C++.

1 Like

I’m looking for something like this
So shaders are used to achieve this?

Looks promising, but I lack the knowledge how something like that would work in practice :stuck_out_tongue:

You’re in luck! MonoGame has a couple of built-in shaders that you can use, so you don’t have to write any yourself to get started. Drawing a polygon like in the video is easy in MonoGame! Here’s a great tutorial (for XNA, but works exactly the same in MG) for gettings started with 3D stuff: