PDA

View Full Version : Brand new to OpenGL on windows



jblevins1991
06-08-2011, 03:18 PM
I am just learning OpenGL and have a book that is very useful. I have heard OpenTK is great for programming games, but everytime i try to put any command like;

GLShaderManager.InitializeShaderStock();

it does not recognize any of the above. i am using visual basic 2010 with c++.

Alfonse Reinheart
06-08-2011, 03:21 PM
What do you mean by "it does not recognize any of the above?" Is this a compiler error (does VB get compiled?) or a runtime error?

jblevins1991
06-08-2011, 03:25 PM
ERROR; this declaration has no storage class or no type specifier

Alfonse Reinheart
06-08-2011, 04:22 PM
I did a quick Google Search for "GLShaderManager OpenTK" so that I could find exactly what this object does. The very first hit on the search was this question (http://www.opentk.com/node/2432) on the OpenTK site.

GLShaderManager is not part of OpenGL. It is part of a C++ library that the OpenGL Superbible version 5 uses in an (in my opinion misguided) effort to hide details from the user until the author feels that those details can be better explained. OpenTK only exposes actual parts of OpenGL, not parts of other libraries that use OpenGL. So it is not available to you from .NET.

You'll have to make due without it.

jblevins1991
06-08-2011, 05:21 PM
so if i use an IDE or compiler that does not use .NET i can use it?

like code::blocks?

Alfonse Reinheart
06-08-2011, 05:53 PM
so if i use an IDE or compiler that does not use .NET i can use it?

It's a C++ library that ships with the OpenGL Superbible 5. So you will need a C++ compiler and you will need to write C++ code to use it. It has nothing to do with .NET specifically; you couldn't use it from a pure-C compiler either. Or a Java compiler. And so on.

jblevins1991
06-08-2011, 05:54 PM
oh ok much better