Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.

Adventures in Programming: The Start....Kinda....

Posted by Night Lone, in Adventures in Programming 18 August 2014 · 403 views

C++ OpenGL Programming
Well, not the start of my adventure in programming, that started when I was 14, and it started on a single core, 800MHz Pentium with 32MB RAM and 6GB HDD, but thats another story.
This is the start of my new attempt at a journal series! Here I'll discuss problems, and solutions I have while programming...just about anything I'm programming. This may be a weekly, bi-weekly or Monthly series, I may provide screenshots, code snippets, both, or just random talk and maybe good to know information...or completely useless information...but either way, I hope to be somewhat educational, if not entertaining, and a good read Posted Image

So, lets start!

Unfortunately, my OpenGL engine is already started, so the most interesting newbie problems and fixes are already done and over with, but, just so that you're not behind, current my engine has the following classes:
appFrame - Wrapper around SDL, basically, without this, no window, no context, no visuals; but it can be swapped out with anything, win32, x11, anything!...almost....
vect3/4 - No, not Vec, or anything like that, Vect....Why? Cause it just is! Now get over it! Posted Image It's a Vector, if you haven't guessed.
matrix4x4 - Umm...it's a matrix, with 4 rows and columns, but, you didn't need me to tell you that right?
quaternion - *cough cough* http://en.wikipedia.org/wiki/Quaternion ... Just putting that out there...You really don't need to know all what Wiki has to offer
shader - Really simple, it reads a file, and compiles them into shaders.
shaderProgram - Links 2 shader programs into a program....Might combine this and the above...
texture - Loads an image, and uploads it to OpenGL as a texture.
Scene/Scene Management:
scene - This, is the main scene, basically everything is done thru this.
octree - Every scene has an octree, every octree rather has a collection of objects, or another octree.
node - Name, Position, Scale, Rotation....and a little sugar and spice.
camera - Peek-a-boo I see you!
model - Once held the mesh inside here (aka, no mesh class), this now holds a few model separate variables, and references to a mesh instead
mesh - The new comer! I created this when I realized that I wasn't doing a good job on memory. This class holds one mesh, and it's associated vertices, colours, UV, Normals, etc etc etc.
ref - Okay, above is a lie, THIS is the new comer! This class is there to basically say "Am I being used? Yes: awesome, No: delete this;" code suicide?
ng3d_Loader - Long story short: I didn't want to support any other formats but my own!! WMHAHAHAHA....no, actually i found it fun to make my own file format Posted Image and the loader Posted ImagePosted Image then I looked at how Blender exported things....and cried myself to sleep that night (I didn't....but Blender's internal format for it's model's are ugly as far as I'm concerned)
** These are not the actual descriptions of ANY of my classes.

Now, we're all up to date? Awesome. I did that in 2 months, with a little help of Google, Wiki, countless articles, and good ol' testing!

Before I go, I do have something useful to say.
While programming, and if you need to test a feature of the language out, or test a theory, or anything you can do with just the language by itself, make a separate file, project, whatever, call it whatever you like (mine is testcrap) and just test in there; and test...and test! if you don't know the language that well, it'll help! If you do know the language, but are a little rusty on some parts, or a new feature has been added in, "testcrap" will help! It's there for you to Test Crap! Hence the name, testcrap.

If you've made it this far, wow, thanks for reading all that. If you've skipped this far, at least read the paragraph before this one!! Either way, Have fun, Start programming, and stay safe!
(turn up the music....grab some snacks...grab your favorite drink...)

For more information on a weekly basis, visit the Teams Tumblr here: http://ngdevs.tumblr.com/
To get the most recent information from the Team, or NightLone, Follow his twitter here: @nightlonegamer