Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Future of C,C++,OpenGL,DirectX.

This topic is 5643 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

In the last few months I have been thinking about the future of C and OpenGL.In fact I dont know whether the game community will support neither of them as the time goes by.DX and C++ is gaining momentum and frankly I dont know what to do now that my degree paper is starting and the teacher is asking for a final decision of which to choose:C and OpenGL or C++ and DirectX.He strongly supports open source and advises me to go for OpenGL and in order to help me says learn C which is easier,both will give you a more fast product than C++ and DX and portable. However seeing all the fuss about DX9 and seeing also that OGL hasnt had an upgrade for some time I dont know what to do.Add to the above the fact that many games are using DX.I do know that 3DLabs has released a proposition for OGL 2.0 but I havent seen any news about that. With all this I have found myself in front of a dillema.I like OGL and C,Doom III from what I have seen was built with them,but what about the future? Let me point out also that I want to concetrate in the graphics department so the rest of DX features,like input etc.,are for the time not my primary concern. I am waiting your opinion.Please notice that if at anytime this thread starts to show sign of flame war between C and C++ or OGL and DX then the moderator will close it.

Share this post


Link to post
Share on other sites
Advertisement
talking about 'all the fuss' - who's making the fuss? you're falling fowl of the publicity machine.

opengl doesn't need an upgrade - it's already extensible and has been extended without having to call it 3, 5, 6, 7, 8, 9.

there is going to be a change in opengl 2.0. there new features. but it won't be with the fanfares that directx gets. opengl has a quiet confidence and is an industry standard used on many platforms. if you only dwell in the mainstream consumer world of microsoft windows it can be easy to miss the importance of this open standard.

i'm not having a downer on directx. it's become well designed and actually similar to opengl.

but don't worry too much about what the buzz is. just enjoy learning either or both. directx can be called from c and opengl is callable from c++.

if you don't know either of the languages then i'd recommend ruby, python and opengl. then move on to c++ once you've got some programming experience under your belt.

speed issues in c/c++ aren't an issue but the designs of the language achieve different goals. c and c++ are both designed to be implemented as efficient languages.

talking about the future, who will you listen to? the best bet is to take an strong interest in everything and see what keeps you interested. you'll develop. don't worry about backing the right horse.

edit: got rid of a reference to something i misread.

[edited by - petewood on December 7, 2002 3:07:33 PM]

Share this post


Link to post
Share on other sites
Near as I can tell, the 3D parts of DirectX are just OpenGL with a slight accent.

Personally, I never use C anymore. I use C++, and I only ever use OpenGL for graphics stuff.

Although OpenGL is extensible, the problem with the whole extension thing is that different companies come up with different extensions to do the same things, forcing programmers who want to do the Right Thing to put lots of special case code in their programs depdending upon which extensions are available. It''d be easier if (1) there was a standardized library for accessing extended features in a consistent way - which would be pretty much the same as the DirectX upgrade-a-day situation - or, (2) developers could implement their own extensions in a programming language which was compiled to a code object executed on the graphics hardware - which is what OpenGL 2.0 proposes.

Personally, I''d like to see an interface to C++ join the interface to C in the GL specification.

Many games are using DX. Many games are using OGL. But a lot of games are using both. Fundamentally, it doesn''t matter.



Carmack uses it. Don''t doubt the god. skjinedmjeet

Hail Eris! All fnord hail Discordia!

Share this post


Link to post
Share on other sites
Hello,

Mayrel is right about the problem with extension, except he left out one small point These company differences are not a common occurence, and usually do not cause much of a problem in the development community. When the ARB releases new versions of OpenGL, most of the updates are approving and standardizing the extension which then becomes part of the standard OpenGL feature set.



"With my feet upon the ground I lose myself between the sounds and open wide to suck it in, I feel it move across my skin. I'm reaching up and reaching out. I'm reaching for the random or what ever will bewilder me, what ever will bewilder me. And following our will and wind we may just go where no one's been. We'll ride the spiral to the end and may just go where no one's been." - Maynard James Keenan
Name: TheBlackJester
Team: Wildfire Studios

Projects
O A.D.
The Last Alliance


[edited by - TheBlackJester on December 7, 2002 6:44:37 PM]

Share this post


Link to post
Share on other sites
Yeah, TheBlackJester. I overstated the problem somewhat.

But, even if you can be sure that there''s only one extension for a particular purpose, it''s still an inconvenience to have to use the extension mechanism.

With OGL2 you get vertex and fragment shaders, which means that many extensions will be redundant. Most current extensions which aren''t rendered pointless by shaders are part of the core OGL2 functionality.

Personally, I''d like to have a graphics API in which every stage of the pipeline was extensible by the developer, rather than leaving him/her at the mercy of hardware manufacturers. For that you''re going to need a software renderer, and if that''s going to be comparable with graphics hardware, I figure you''re going to need SMP.



Carmack uses it. Don''t doubt the god. skjinedmjeet

Hail Eris! All fnord hail Discordia!

Share this post


Link to post
Share on other sites
Please, learn to use spaces after commas and full-stops (periods for you Americans out there). It will make your posts much easier to read.

Anyway, back on topic:

DirectXGraphics and OpenGL are (in general) equal in speed - any speed differences are basically down to the drivers, some drivers give better DirectX support, some give better OpenGL support.

C and C++ are also equal in speed as long as you're using a modern compiler. Which one is easier to use is simply a matter of opinion.
If you're so worried about speed that you think it'd be worth moving away from C++, then you should be using assembler anyway (or changing your algorithm) - always remember the 20/80 rule, 20% of the code will take 80% of the execution time, only ever optimise that 20%, optimising anything else is a waste of time unless you're doing it to learn or because you just happen to find it fun.

As has been said, C++ can be used perfectly well with OpenGL. C can be used with DirectX, although I would really advise against it - you'll end up with some horrible code, but that shouldn't worry you, it's perfectly possible to use a C++ compiler, and still write almost entirely in C, just using the C++ extensions to make DirectX code clearer (the execution time will be practically the same, and as above if you're worried about it you should be using assembler).

John B

[edited by - JohnBSmall on December 7, 2002 7:04:19 PM]

Share this post


Link to post
Share on other sites
By the way I am waiting to see how DX9 and C# are going to work since C# has no pointers and stuff.
From what Microsoft says it will be far easier to make code and it will introduce RAD to the game community.

Share this post


Link to post
Share on other sites
quote:
Original post by Antony52
C# has no pointers and stuff.

Since when?



For those who believe in God, most of the big questions are answered. But for those of us who can''t readily accept the God formula, the big answers don''t remain stone- written. We adjust to new conditions and discoveries. We are pliable. Love need not be a command or faith a dictum. I am my own God. We are here to unlearn the teachings of the church, state, and our educational system. We are here to drink beer. We are here to kill war. We are here to laugh at the odds and live our lives so well that Death will tremble to take us -- Charles Bukowski

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by Arild Fines
Since when?


C# and Java don´t have pointers.



Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!