0

I'm trying to set up a project with freeglut and openGL for an assignment, and I haven't touched c++ in a while, so I'm about to blow my brains across my screens trying to configure dependencies, and figure out which set of conflicting instructions to follow, etc.

Is there some kind of pre-built template project I can just download, open a .sln file and have everything work? With the proper dll's referenced in project settings, and headers included, and whatever else? Just some kind of a baseline so I can actually get to coding, rather than dealing with this garbage?

I feel like it must exist. Please let it exist.

NathanTempelman
  • 1,301
  • 9
  • 34
  • I've never used GLUT or FreeGLUT before, but they should not have any complicated dependencies whatsoever. It is about as simple a framework as they come, nothing like SDL or Qt. If you want to avoid any dependencies at all, you could always code to the metal and use your platform's native APIs. In Visual C++, this would mean Win32 and WGL - [NeHe.gamedev.net](http://nehe.gamedev.net/tutorial/creating_an_opengl_window_(win32)/13001/) has a bunch of tutorials that have the bare minimum necessary to setup a render context on this configuration. – Andon M. Coleman Feb 08 '14 at 00:13
  • @AndonM.Coleman I have to use them, it's for an assignment for a class. I don't suppose you would know a good link for adding frameworks in general? – NathanTempelman Feb 08 '14 at 00:23

1 Answers1

0

Although it is probably not a complete answer to your question, here is a check-list:

  • GL\glui.h

  • GL\glut.h

  • glu32.lib

  • glui32.lib

  • glut32.lib

  • opengl32.lib

  • Ignore libcd.lib under Release mode.

  • glut32.dll

The GLUI library can be found at http://www.cs.unc.edu/~rademach/glui.

The GLUT library can be found at http://www.pobox.com/~nate/glut.html.

You can have a look at this OpenGL project, though it's like 10 years old or something (on VS 6.0): http://planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=10256&lngWId=3

barak manos
  • 29,648
  • 10
  • 62
  • 114
  • I've got all those files, and I'm wondering, is there a way I can just drop the files into certain folders in my solution and just have it work? That would be amazing, I'm at the end of a rope trying to figure out which conflicting tutorial to follow to add these libraries – NathanTempelman Feb 08 '14 at 00:35
  • Well, you need to open up your project settings (not sure what IDE you're working with), and check the search path of the IDE. If it's VS that you're working with, then you might already have some of the header and library files in your VS path. Of course, you can always "throw" these files right next to your local files, and include/link them from there... (not exactly sure if that's the problem you're dealing with, but if it is, then it's a general problem which doesn't have anything to do with OpenGL)... – barak manos Feb 08 '14 at 00:46
  • that would be awesome, I don't care if it's ugly, I just need it to work. I'm using VS 2013, and a bunch of the menu's for adding project dependencies are buggy. Where do I throw these files, and how do I convince the IDE to search around in the project folder for them? – NathanTempelman Feb 08 '14 at 00:49
  • Well... right-click your project in VS. Make sure you're right-clicking the project and not the workspace. Choose `Properties`. Open the `Configuration Properties` menu: 1. Choose `C/C++`, then `General`, then add your header file path to `Additional Include Directories`. 2. Choose `Linker`, then `General`, then add your library file path to `Additional Library Directories`. You will have to add the DLL through the registry, or simply by adding it into your `C:\Windows\System32` (or something similar). – barak manos Feb 08 '14 at 01:01