Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 132,081 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 2,265 people online right now. Registration is fast and FREE... Join Now!




General C++ question

 
Reply to this topicStart new topic

General C++ question

nick2price
post 6 Oct, 2008 - 04:15 PM
Post #1


D.I.C Head

**
Joined: 23 Nov, 2007
Posts: 231



Thanked 6 times
My Contributions


Hi, new to C++ this year, i am generally helping out in the java forum where i can. This year i have to use C++ with the glut library. My question is: Does c++/glut have anything like the java api, or anything where i can see all the library actions and what they do?
cheers
User is offlineProfile CardPM

Go to the top of the page

csmanoj
post 7 Oct, 2008 - 03:15 AM
Post #2


D.I.C Head

Group Icon
Joined: 6 Aug, 2007
Posts: 139



Thanked 3 times

Dream Kudos: 50
My Contributions


You can see the glut documentation - http://www.opengl.org/documentation/specs/...pec3/spec3.html
User is offlineProfile CardPM

Go to the top of the page

nick2price
post 7 Oct, 2008 - 09:41 AM
Post #3


D.I.C Head

**
Joined: 23 Nov, 2007
Posts: 231



Thanked 6 times
My Contributions


I am just trying to get a better grasp of this, so that i understand it better. Everything i code is c++ but it just uses methods from the glut library?
Also, how simular is c++ to java? is it legable to keep in a MVC structure, do i ceate methods, can i create multiple linked classes?
The only reason i ask this because the code i have seen just seems to have action after action in a very top to bottom approach e.g.
create line
make line change colour
make line explode?

If this is the correct way to do it, then i would feel comfortable getting on with it, just wanna double check so that i dont make silly errors.
cheers
User is offlineProfile CardPM

Go to the top of the page

csmanoj
post 10 Oct, 2008 - 11:51 AM
Post #4


D.I.C Head

Group Icon
Joined: 6 Aug, 2007
Posts: 139



Thanked 3 times

Dream Kudos: 50
My Contributions


Yes, everything you use from glut would be in C language only (and so usable in C++). And about similarity with Java, Java was designed with C++ programmers in mind. The syntax is almost the same. You only need to worry about the language policies. But there too, Java is strict, and C++ is not. So it'll be easier to program in C++ but equally easier to make mistakes (that's why you as a java programmer find it strange because java won't let you out of the boundaries while C/C++ gives you all the freedom you need). And regarding the programming structure, it's really the programmer's work that comes out. I write object oriented programs using OpenGL. But a lot of programmers out there skip the pain and just use them in plain C. GLUT can be used in both ways. It's so flexible. It's how you choose to use it.

My suggestion is get your C++ foundations strong before getting yourself into OpenGL (or GLUT). It's worth the time spent.
User is offlineProfile CardPM

Go to the top of the page

Reply to this topicStart new topic
Time is now: 11/21/08 08:31AM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month