The MASM Forum

General => The Campus => Topic started by: Guenther78 on November 13, 2014, 08:17:23 AM

Title: DirectX or OpenGL
Post by: Guenther78 on November 13, 2014, 08:17:23 AM
Hello Forum,

there is a good OpenGL example in the masm32 Folder (C:\masm32\examples\exampl04) and I found a book about OpenGL. It makes a good Impression, I think I will order it.
Is it a good idea to work with OpenGL or should I better work with DierectX?
I like the OpenGL example, it would be great if I could program similar things!
Best regards!

Guenther
Title: Re: DirectX or OpenGL
Post by: Siekmanski on November 13, 2014, 08:35:42 AM
Hi Guenther,

I made this OpenGL example for my nephew some years ago.
It loads textures from file or from resource and has some basic routines, 3D rotating cube, line draw routine and a transparent texture.

Marinus
Title: Re: DirectX or OpenGL
Post by: Guenther78 on November 13, 2014, 09:39:49 AM
Hello Marinus,

thanks for this great program!

Günther
Title: Re: DirectX or OpenGL
Post by: redskull on November 13, 2014, 11:36:35 AM
Quote from: Guenther78 on November 13, 2014, 08:17:23 AM
Hello Forum,

there is a good OpenGL example in the masm32 Folder (C:\masm32\examples\exampl04) and I found a book about OpenGL. It makes a good Impression, I think I will order it.
Is it a good idea to work with OpenGL or should I better work with DierectX?
I like the OpenGL example, it would be great if I could program similar things!
Best regards!

Guenther

Whichever you choose, it's worth pointing out that most OpenGL examples and tutorials (and for that matter, printed books) are hopelessly antiquated and do not represent the so-called "modern" shader-based OpenGL API, which is far more flexible and feature-rich (but equally more irritating to use).

-r

Title: Re: DirectX or OpenGL
Post by: GoneFishing on November 13, 2014, 08:39:15 PM
As stated  here  (http://en.wikipedia.org/wiki/Fixed-function) OpenGL transitioned from fixed-function version to shader version in v2.0 and you may just search for "modern opengl examples" or explicitly specify the version you want (3.1):
An introduction to shader-based OpenGL programming (http://webstaff.itn.liu.se/~jonun/web/teaching/2009-TNCG13/Siggraph09/courses/shader-based-opengl.pdf)
Old MASM32 forum has lots of OpenGL stuff. 
P.S.:P.P.S.:
see also  " an accelerated introduction to programming OpenGL, emphasizing the most modern methods " (http://www.meetup.com/SV-SIGGRAPH/events/16253618/)
Title: Re: DirectX or OpenGL
Post by: Farabi on November 24, 2014, 02:44:24 PM
Hi,
Based from my narrow experience. Using a COM style programming for C is difficult. On assembler, you will need to know where the pointer is passed to you in what order the function is, it is complicated. And that is what DirectX was. For a big budget developer, DirectX is way to go, because they can afford to buy a simplified DirectX function from Visual Studio. But for me personaly, a hobbyist programmer, its way overkill. As an ex-freeloader I tend to use anything marked as "Free" with a food stamp  :icon_mrgreen: . But hell, my job now is as a web developer. After I understand how everything worked, I get bored with 3D programming.
Title: Re: DirectX or OpenGL
Post by: Guenther78 on December 07, 2014, 09:36:35 PM
Hello,

thanks for the answers. I just have started a new Job, so I hadn't had time to continue learning.

@Farabi
QuoteAfter I understand how everything worked, I get bored with 3D programming.
The same would happen to me!

Best regards, Günther
Title: Re: DirectX or OpenGL
Post by: Guenther78 on December 24, 2014, 08:26:50 PM
Hello Forum,

@Redfull
Actually there were two interesting books. One from 2010 and one from 2012. I remembered Your post and bought the newer one. It is called "Basics of 3D-Programming". There is a lot about Shaders, great.

Best regards, Guenther
Title: Re: DirectX or OpenGL
Post by: xandaz on December 25, 2014, 10:40:32 AM
   everythings bores after a while.... prolly women too althought we're always prone to think is the exception. It's just what i heard.... Directx is faster.
Title: Re: DirectX or OpenGL
Post by: Gunther on December 27, 2014, 02:14:20 AM
Quote from: xandaz on December 25, 2014, 10:40:32 AM
It's just what i heard.... Directx is faster.

That's right, is not so platform dependent.

Gunther
Title: Re: DirectX or OpenGL
Post by: Siekmanski on April 26, 2015, 04:51:29 PM
Just got a PM from Jochen that the glm.lib was missing in the OpenGL example i posted in reply #1.
Here it is,

Marinus