Open GL with 'normal' C++

I was just wondering… can you use Open GL with normal C++? If so would the code be the same?

-Aditya

just what do you mean by “normal”?

b

Do you mean like ANSI C and others types of C?

I mean like some C++ that does not use the Win Main()… you know … I think it is called a console application… well, let me put it this way, how did open gl programmers program in open gl before VC++ came out with its WinMain thing?

-Aditya

I have been coding in a console app for quite a while now…I find it to provide a useful debug window while running fullscreen - The console goes to the other monitor

How the heck do you get the console to go to the other monitor. I have been wondering how this would work even though I don’t have a two monitor system yet.

jpummill

If you mean with normal c

Borland C++ Or Turbo C Or Turbo C++

there exits no WinMain in these languages

add to this the system message loop …

so it will be not easy …

use glut

b

If you have a dual Monitor ATI card, it come with the software that allows that.

I only have used the multiple desktop feature which can come in handy.

Originally posted by jpummill:
[b]How the heck do you get the console to go to the other monitor. I have been wondering how this would work even though I don’t have a two monitor system yet.

jpummill[/b]

ok just wondering since some day I would want to make my engine platform independent…

-Aditya

There seems to be a bit of confusion about what console apps are. If you can create a window then you can use OpenGL. You can create windows with console apps beginning with the regular old “int main(int argc, char *argv[])”. Therefore, you can use OpenGL with console apps.

KShots, I too use the console window for debugging purposes. It’s pretty handy, huh?

Originally posted by Hazem_vb:
there exits no WinMain in these languages

add to this the system message loop …

so it will be not easy …
I’m not sure what you mean. Anything that you can do in WinMain, you can do in main. Windows are created by calling Win32 API functions. The message processing loop is just a couple of API function calls in a loop. All API functions can be called from a console app. It’s just a matter of linking the right import libraries (gdi32, etc.).