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..

Recommended Answers

All 3 Replies

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.

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.

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++????

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.