Best way to setup OpenGL

Started by
10 comments, last by swiftcoder 13 years, 9 months ago
I'm not certain that portability is the big advantage for OpenGL that it's often made out to be. In a well-structured application the rendering API specific code is going to be a very very small part of the overall code (in the most extreme case you might even have only one draw function that everything goes through), and will likely be utterly dwarfed by other OS-specific code such as windowing system, input, sound, networking, etc. And don't forget the number of vendor-specific hacks that are *still* often required to get even by-spec OpenGL code working properly. But this is me wandering way off topic now.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

Advertisement
Quote:Original post by mhagain
I'm not certain that portability is the big advantage for OpenGL that it's often made out to be. In a well-structured application the rendering API specific code is going to be a very very small part of the overall code (in the most extreme case you might even have only one draw function that everything goes through)
This isn't entirely true. Unless you have gone whole-hog and implemented your own shader language and compiler, along with a complete content pipeline, graphics portability is a *very* big deal.

Consider the need to reimplement your entire shader library, re-export/compress all your textures, *and* implement all your drawing/state-management functions in the new API.

Then consider that quite apart from their respective APIs, The iPhone, XBox 360 and Wii have completely different graphics *capabilities* from each other, and you have yourself a considerable amount of work.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

This topic is closed to new replies.

Advertisement