| | |
help opengl
![]() |
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.
*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.
Plato forgot the nullahedron..
![]() |
Similar Threads
- Using OpenGL in Visual C++: Part I (Game Development)
- I need a solution for a opengl thing (C++)
- Randomize number with OpenGL (C++)
- Need advice using openGl with win XP (C++)
- OpenGl project and windows XP (Game Development)
Other Threads in the Game Development Forum
- Previous Thread: Need help with Directx meshes, textures etc.
- Next Thread: Directx9 bitmap movement problem.
| Thread Tools | Search this Thread |
3d advertising ai algorithm ban c++ cambridge camera censorship china competition console development engine fov fpx game gamer games gaming gauntanamo government idaho in-gameadvertisement intellectualproperty laracroft live manhunt math mathematics matrix mercenaries microsoft mmorpg modded msn naked news nintendo obama opengl palin physics pirate playstation politics projection ps3 rpg search selection software sony stephenhawking stocks studio technology terrorism tombraider uk videogame web wii world-of-warcraft xbox xbox-live xbox360






