View Full Version : Is it just me?
03-18-2009, 07:47 PM
I was just wondering if anyone else ran into so many problems when first learning OpenGL. I'm just getting into it and I've spent about 5% of the time actually programming/debugging and 95% trying to solve ridiculous errors on various PC's. On one PC I haven't been able to compile or run a single OpenGL program for 3 weeks!!! Thread Link (http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=254727#Post254727)
I know my way around C and still find myself stumbling around for days with mysterious problems like runtime crashes and linker issues. It's worse when I try to switch between IDE's, where one gives me a console and the other doesn't, or linker issues where the other works fine, even though I'm straight-up copying code and link libraries!
I guess I have two issues: One, do other people constantly run into problems they can't solve by searching google or scanning a textbook, or is it just me? And two, is this something I'll get over with experience, or am I missing something? Will switching to a Mac solve all my problems?
I love programming. I hate weird exceptions nobody's seen but me. And I'm very frustrated...
03-18-2009, 08:08 PM
I have very little experience of developing directly for OpenGL on a PC.
When I had to put a large GL project together on the PC I wrapped it in OpenSceneGraph.
From what I have heard and read it seems not to be a perfect world in PC OpenGL Land. And even when I was using OpenSceneGraph I had a lot of incompatibility problems and weird crashes when we deployed to certain clients machines.
If you are looking for a single unified ecosystem who's native graphics library is OpenGL then a Mac is a good choice. The OS, Dev Software and most importantly the Hardware is all put together by one company, and IMO a pretty good company.
OTOH with the PC OpenGL is kind of the bastard little sister of D3D, and you have lots of flavors of hardware, development environments and the OS is in flux because of the Vista debacle. When I have developed on the PC I have insisted that anything I develop is for XP. Period. If it runs on Vista, hey you got lucky!
That is not to say that while learning OpenGL (or any API) you won't still have wierd exceptions, crashes, IDE problems etc. etc. That's just the way it is. But I think you may be compounding your own problems by jumping from machine to machine and setup to setup..
Just my 2c.
03-19-2009, 02:09 AM
When you have such bad luck, maybe you should humble yourself to start using older, proven things:
- only WinXP 32-bit SP2
- a Geforce 7x00 or 8x00 (I was a raving ATi fanboy until I tried coding for opengl and d3d on their cards...)
- a proven framework.
- ARB shaders for non-GF and NV_fragment_program3 (use cgc.exe)
- a "operator new" and "operator delete" overriders to find leaks, bad behavior, and anyway clear allocated data to zero.
- VS2005 or VS2008. The only problem they can cause is sometimes getting intellisense cluttered and having to delete the .ncb to bring it back.
- sandbox new functionality, test it there, before adding it to the bigger project.
OpenGL 2.1 and 3.0, when used like they should be used (minus GLSL), are clean tiny nice APIs.
03-19-2009, 03:15 AM
My experience of OpenGL programming has been developing over the last 8 years exclusively on the PC using Delphi.
The most major problems I faced initially were
1. Translating c headers into Delphi
2. Building a suitable GLWindow framework
3. No built-in library support (maths)
In time both of these were solved by sheer hard work debugging on various h/w platforms, making corrections to code, header files and making exceptions (work arounds) for h/w with bugs.
The most fundamental thing to get right initially is clean and efficient OpenGL rendering window code and then handling various types of image files for textures. The most tedious part is the WGL proc addresses for all the OpenGL functions and getting my head around those took a while (especially with dodgy c header files translated rather badly into Delphi).
After that, comes various OpenGL extensions and plumming those into to the OpenGL framework - even now when I know what to do, it can still take several hours to add two or more extensions to my GL framework.
In the end the time taken get less and less and you will end up with something robust and useful. In years to come when looking back, you'll even wonder just what the fuss was ever about!
03-19-2009, 03:56 AM
X-Macros in C/C++ makes adding use of extensions to your project ridiculously easy :P. Look at the .def file and how it's used in http://www.ultranos.com/OpenIL . If C/C++ macros weren't so simplistic, it'd be a matter of just typing "ADD_EXT(glSomeExtARB);", and save you from marking word, Ctrl+Shift+U, adding "PFN" and "PROC". .... :)
Then, nV-math for the math stuff.
03-19-2009, 09:10 AM
Is it possible I should rather be learning DirectX and D3D? I guess this might make sense since DirectX is designed for Windows whereas OpenGL is platform-independent.
I would have considered getting a macbook for my latest laptop but the tablet technology on macs is... well I would say 'bad,' but really it's non-existent, and I love my tablet =)
03-19-2009, 07:32 PM
For me C/C++ always causes a lot of trouble (no matter if OpenGL is involved or not) and I know C/C++ for years and even earn my money with it. :)
OpenGL on Windows is a major PITA, too.
But after doing both C++ and OpenGL on Windows for some time the troubles are not as troublesome and the problems not as problematic as they used to be.
In private I use Object Pascal on Linux and have nearly no problems. At least no weird runtime crashes or linker errors. Most of the problems are my own fault (driver bugs excluded) and that's how it should be.
If you are absolutely sure that Windows development is all you want to do D3D might be the better API for you. But that's a question only you can answer.
03-20-2009, 02:42 AM
for me everything is alright with C/C++ and OpenGL on multiple platforms. it just takes alot of time to figure out how to put it all together. D3D is much easier sure and supported on Windows only, whats the challenge? just keep it for a long time will sort everything out (hopefully) and checking on some quake3 source on how people do various things is available as well.
03-20-2009, 03:36 AM
Choose your development environment and stick to it. I use Linux, vim, GLFW, GLEW and have no problems. Leave deployment problems for later. At first you should focus on pure development. I do not recommend Windows Vista. Good luck.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.