Polytonic / Glitter

Dead Simple OpenGL
http://polytonic.github.io/Glitter/
2.48k stars 418 forks source link

Help moving from freeglut / glew to Glitter #16

Closed nosmirck closed 9 years ago

nosmirck commented 9 years ago

Hi @Polytonic I'm retaking my thesis (it is an engine to render terrains) which I started it back in late 2012. I have some stuff working with freeglut and glew that I would like to move to Glitter, but I have no idea where to start.

I've been out of the OpenGL picture for a couple of years working mostly with Unity3D and I'm finding very difficult for me to retake OpenGL and everything now is totally different from when I learned OpenGL (in 2007-2009 when I used Glut and just started using shaders).

I'm now interested to be back on the road of the OpenGL path, but it feels like I lost a century of advances. I came across Glitter, which seemed perfectly to start again, but just making a simple tutorial is being hard for me.

I have VS 2015 and my old code which I'll try to move, but first, It will be very helpful if you can help me make this code from http://www.learnopengl.com/#!Getting-started/Shaders to work with Glitter, I tried, but I'm totally lost and I don't know where or how to start with glad.

(SOURCE: http://www.learnopengl.com/code_viewer.php?code=getting-started/shaders-uniform)

EDIT: I forgot to mention that I could clone the repo and built the example with no errors, it worked like a charm, I even draw a triangle and everything XD (it felt like starting college again). So, at least I have it working with the sample.

Thanks in advance for any help you can bring!

Luis.

Polytonic commented 9 years ago

I have VS 2015 and my old code which I'll try to move, but first, It will be very helpful if you can help me make this code from http://www.learnopengl.com/#!Getting-started/Shaders to work with Glitter, I tried, but I'm totally lost and I don't know where or how to start with glad.

glad is an OpenGL function pointer loader. It takes the place of GLEW. I don't know what you mean by "how to start with glad" ... Glitter does all the heavy lifting for you. Just start calling gl____ functions, like you would, as if you used GLEW.

I'm not sure what exactly you are asking about -- you seem to be asking for a few different things. If you've managed to get Glitter working, you should be at the same step as Hello Window, and you should move onto Hello Triangle. If you're struggling with the shaders section, it may be worth reviewing the entire tutorial again, until you understand each and every line.

nosmirck commented 9 years ago

Hey @Polytonic Thanks for the answer.

I may have not made myself clear. But I solved my problems! I managed to compile the Hello Triangle and the shader example. I am a little rusty with all about OpenGL, I got used to Unity and I seem a bit lost here.

We can close this thread, I am now understanding (again) everything about OpenGL that I forgot, some things changed, I was used to GLUT, I see now that it is not only dead, but that using it was a bad practice. Glitter it definitively a GREAT point to start now. I wish it existed back in 2007 when I started to learn OpenGL...

I would love to ask something, do you plan to add some GUI Library in the future? or do you recommend any GUI lib to start with simple projects?

Thanks again for your time and this awesome stuff!

PD: Do you accept donations?

Polytonic commented 9 years ago

I would love to ask something, do you plan to add some GUI Library in the future? or do you recommend any GUI lib to start with simple projects?

What do you mean by GUI library?

Glitter is just a starting point, not a full-featured engine ...

PD: Do you accept donations?

I am not equipped to accept donations at present, thanks though! If you found Glitter useful though, I'd appreciate if you share it with others, or give some of my other libraries a try. :smile:

nosmirck commented 9 years ago

By a GUI library I meant something like this: http://anttweakbar.sourceforge.net/doc/

It is a good GUI library for small educational projects, it has controls like buttons, sliders, transformations, color picking, etc. Would be great to have this (or anything similar) on Glitter out of the box for simple interfaces.

I'm definitively looking at everything on your Git, you have really interesting stuff here! Specially Chlorine, When I studied OpenGL I never got the chance to learn compute shaders and anything related to GPGPU. Chlorine, as I see, will help me understand and start simple with something I didn't have the chance to learn 4 years ago.

Thanks again! keep up the good work!

Polytonic commented 9 years ago

By a GUI library I meant something like this: http://anttweakbar.sourceforge.net/doc/

I have no plans to integrate something like this into Glitter, as there's no commonly used, open-source, major library that handles GUI middleware. Glitter is just a starting point, not an all-inclusive package that bundles everything under the sun.