OpenGL programming.

n72.75

Move slow and try not to break too much.
Orbiter Contributor
Addon Developer
Tutorial Publisher
Donator
Joined
Mar 21, 2008
Messages
2,696
Reaction score
1,353
Points
128
Location
Saco, ME
Website
mwhume.space
Preferred Pronouns
he/him
Does anyone have advice on which way to go with OpenGL; my options, as I see them are GLUT or GLFW.

I'm working on a secret project, and I want to know which will be the least "limiting", ease of use notwithstanding.

If I give details, I'll jinx myself and be doomed to never complete it.
 

MikeB

Member
Joined
Feb 25, 2009
Messages
185
Reaction score
0
Points
16
Location
Seattle
I can give you some advice, but first you'll have to tell me all about your secret project. :lol:
 

escapetomsfate

OBSP Developer
Addon Developer
Joined
Jun 21, 2008
Messages
282
Reaction score
0
Points
0
Location
GB
GLUT's my favourite. It condenses all the OS-specific tasks (like opening a window with an OpenGL view inside it, or capturing keypresses) into simple functions with syntax that's really easy to remember. The actual graphics-drawing part is just the usual OpenGL functions, so you can define models/animations/whatever else however you like. If you prefer doing things the low level way, but don't want to write the OS-specific stuff yourself, I think you should go with GLUT :thumbup:

There's no functions for reading texture files in GLUT, so you'd have to write that code yourself or use a texture library like DevIL.

Another option might be SDL. You can set it up somehow so that you can draw using OpenGL directly rather than SDL's surface blitting functions. You'd also have a solution for sound and a wider range of input, and I think there's even some way to convert an SDL_Surface into an OpenGL texture id.

Whichever library you choose, good luck for the secret project! :)
 

Artlav

Aperiodic traveller
Addon Developer
Beta Tester
Joined
Jan 7, 2008
Messages
5,790
Reaction score
780
Points
203
Location
Earth
Website
orbides.org
Preferred Pronouns
she/her
Depends on what you want.

If you want a fast start, use GLUT, SDL or any other library - they only wrap the OS-dependent things into nice functions and do all the initialization, allowing you to get cracking on the actual idea.

If you want to learn, or get something highly custom (i.e. render 3D into an Orbiter texture a-la Dragonfly's navball), set up the OpenGL on your own (not good if your project is ever to leave Widows).

OpenGL part would be the same regardless of the bottom level.
 

dumbo2007

Crazy about real time sims
Joined
Nov 29, 2009
Messages
675
Reaction score
0
Points
0
Location
India
(i.e. render 3D into an Orbiter texture a-la Dragonfly's navball),

Just wondering...why not use directX to do it since Orbiter uses DirectX already ? Seems a bit of an overkill to link with opengl just to render a navball !
 
Last edited:

dumbo2007

Crazy about real time sims
Joined
Nov 29, 2009
Messages
675
Reaction score
0
Points
0
Location
India
Hehe, yeah I know :)

Hmm I guess for a vessel addon developer, it doesnt matter.
 
Top