PDA

View Full Version : How to use G-TRUC.net OpenGL exmaples



Tanji
04-10-2011, 07:33 AM
hi,

How to properly configure the VS2008 enviroment to work with G-TRUC.net "OpenGL Samples Pack 4.1.5.1" Is there any definitions for novices.

Generally i've added most of the required folders and additional dependencies but compiler still complains the something about redefined, undeclared identifiers, it's for sure I'm messed something up and need to clean it.

here is the some of the codes produced by compiler.


Error 270 error C2065: 'glGetBooleani_v' : undeclared identifier
Error 271 error C2065: 'PFNGLGETBOOLEANI_VPROC' : undeclared identifier
Error 272 error C2146: syntax error : missing ';' before identifier 'glfGetProcAddress'
Error 273 error C3861: 'glfGetProcAddress': identifier not found
Error 274 error C2065: 'glGetIntegeri_v' : undeclared identifier

Any clean installation description or faq will be appreciated!

Groovounet
04-10-2011, 09:01 AM
You need to use CMake to generate your VS2008 project and everything will be setup automatically.

Tanji
04-10-2011, 04:26 PM
ok, used Cmake, with 1st configure attempt I got the all lines red. Clicking the configure once again results in all configurations are white-grayed. Then runing the generate (VS 9 2008 native compiler)

Opening the "ogl-samples-pack.sln" in VS2008 loads all the bundle no matter If I choose any individual project. Building them, produces the "build/debug" and "samples/(each project name folder)" directories but with still no any VC++ project to run.

What am I doing wrong?

Groovounet
04-11-2011, 03:29 AM
Have you tried to run them from Visual C++?
Everything is setup to run that way with Visual C++.

Tanji
04-11-2011, 06:16 AM
Probably something is wrong with my perception of how things are configured/oriented in VS2008.

I thought that loading them in VS2008 with *.cpp extension "automagicaly" VS2008 IDE loads the required interface C++, C# compiler etcc...


Have you tried to run them from Visual C++?
Everything is setup to run that way with Visual C++.
No, don't even know where the Visual C++ is located. but the VS2008 says that's VisualC++ 2008 is installed.

Could you help me to overcome that hurdle.

Tanji
04-11-2011, 08:36 AM
any suggestion please?

Groovounet
04-11-2011, 03:49 PM
I don't really understand your issue but you only need to run the samples in Visual C++ and it will just work fine. (if your GPU supports OpenGL 3.3/4.1) otherwise it will exit directly.

Build the VS solution with CMake, open the solution, build it and run the sample you want to run. There isn't must to see usually.

Alfonse Reinheart
04-11-2011, 04:16 PM
I thought that loading them in VS2008 with *.cpp extension "automagicaly" VS2008 IDE loads the required interface C++, C# compiler etcc...

So you're saying that you don't actually know how to use Visual Studio. You should probably have some familiarity with your build tools before actually trying to use OpenGL. Until you're comfortable with using VS to build and execute C/C++ projects of decent size, you're not ready to start in on OpenGL.