0

If i dont know win32 i cant learn opengl??
i learn C++ and i want to use graphics and opengl it look good.
if i can learn opengl without win32 you can give me tutorial??
thanks
sorry about my english..

3
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by moshe12007
0

Sounds like you need a bit more experience with C++ before you start messing around with graphics. Seriously though, there's is a whole process you have to do just to set up OpenGL with C++. Are you using Visual C++? You can do some things with OpenGL without win32 but why would you want to? Your program will run slow.

0

You can use GLUT (http://www.xmission.com/~nate/glut.html) or SDL (http://www.libsdl.org/) or other similar libraries, which basically abstract away the underlying OS windowing and input mechanisms such that you can theoretically* write OpenGL code that can compile for a large number of operating systems.

*that is, providing you dont rely on OS-specific features elsewhere

It's not 'slow' either, since GLUT/SDL calls translate into equivalent WinAPI+WGL calls on windows, and XGL calls on X-based platforms.

Depending on what you want to do - GLUT is very easy to set up, you can get started without about 10 lines of (GLUT) code. It's good to use for say, making a demo or testing something in a single OpenGL window.. and there's no reason you couldn't use it to do something more complicated, but the input handling it provides is somewhat limiting.

SDL takes longer (more code) to set up and is a more complicated library, but it handles a wider range of input devices and OS-independant threads. Plus it has a load of companion libraries that can handle graphics import, audio, network and so on.

If you want OpenGL in a windowed application, e.g. if you want to create some 'forms' with OpenGL panels; the winAPI might be the way to go on windows.. However, UI toolkits like GTK, Qt, wxWidgets, etc, allow you to use OpenGL panels in a similar manner, and keep your code OS-independant at the same time.

So, depending on what you want to do, you can probably get away with never touching the windows API.

0

ok if i want to start visual C++ you can give tutorial to get experience
to learn win32...
i programming in linux and windows .i can programming in linux visual C++????

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.