Forum

(updated) GL resources and tutorials for beginners

Discuss programming topics that involve the OpenGL API.

Moderator: InsideQC Admins

(updated) GL resources and tutorials for beginners

Postby frag.machine » Tue Apr 17, 2012 3:19 pm

Even being a professional programmer for a lot of years, I consider myself almost completely n00b regarding OpenGL/DirectX programming.

Of course, I already messed a lot with the Quake source, and learned a lot of stuff with it (read: I know/understand the basic math behind OpenGL, and I already messed with a number of "draw your first textured cube" tutorials). Problem is, nowadays Quake cannot be considered a good starting point regarding best practices for the more recent OpenGL incarnations (specially the older and simpler engines, like my Q2K4 engine - PLEASE, DON'T USE THAT AS REFERENCE!). And if you try to find in the internet something as comprehensive as Nehe's tutorials to OpenGL 3+ you'll have a hard time ahead.

So, I am asking to our more experienced engine coders if you guys can recommend online tutorials, manuals and even books that could help me to learn more about the last OpenGL resources and how to correctly use them. And, why not ? Any material covering DirectX essentials would be good, too. Thanks in advance.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2069
Joined: Sat Nov 25, 2006 1:49 pm

Re: (updated) GL resources and tutorials for beginners

Postby JasonX » Tue Apr 17, 2012 3:53 pm

I second his request. It's very hard to find good material that is not obsolete.
JasonX
 
Posts: 407
Joined: Tue Apr 21, 2009 2:08 pm

Re: (updated) GL resources and tutorials for beginners

Postby Spike » Tue Apr 17, 2012 4:19 pm

try some gles2 examples/documentation.

just make sure you always use vbos where feasable.

gles2 isn't identical to destktop gl3core, but really the difference is that gles doesn't mandate vbos and uses a non-geometry-shader form of glsl, and has precision specifiers.


however, such tutorials are generally quite heavy in matrix maths, which makes them harder/longer than legacy/nehe tutorials.
Spike
 
Posts: 2883
Joined: Fri Nov 05, 2004 3:12 am
Location: UK


Re: (updated) GL resources and tutorials for beginners

Postby mh » Tue Apr 17, 2012 7:11 pm

I've an experimental Quake 2 engine that's GL3.x-ish (still uses client-side arrays for one or two things, still uses the matrix stack) but that's also not wildly different from the original source, and that might serve as a useful reference. It shouldn't be considered suitable for general gameplay but I can provide the source - PM if interested.

For Direct3D, the best resources I found online were the codesampler and toymaker pages:

http://www.codesampler.com/dx9src.htm
http://www.toymaker.info/

Supplement those with the DXSDK info and you should get something basic up and running reasonably fast.

For a first project in either I'd recommend something simpler than a port of a full engine. Writing a simple BSP or MDL viewer will exercise a good chunk of the code you'll need in a full engine port, and you'll be able to reuse a lot of it when you do come to do a full port.

Beware that writing code for a modern API requires a somewhat different way of thinking to writing code for GL1.x - in particular you need to plan out your VBO usage a little in advance. It would pay off to invest time into building up an understanding of how VBOs work behind-the-scenes, how to use them more efficiently, etc. Time spent doing that now will lead to much less time wasted later on when things go wrong.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
User avatar
mh
 
Posts: 2287
Joined: Sat Jan 12, 2008 1:38 am

Re: (updated) GL resources and tutorials for beginners

Postby frag.machine » Tue Apr 17, 2012 10:45 pm

Thanks everyone for the links. Bookmarked!

@mh: I have interest in any "good practices" code example, even if I don't grasp everything at start, so please, I'm PM'ing my e-mail.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2069
Joined: Sat Nov 25, 2006 1:49 pm


Return to OpenGL Programming

Who is online

Users browsing this forum: No registered users and 1 guest