06-10-2014
OOP doesn't necessarily make everything easier. What matters is what you do with it. It's a programming style like any other. It's possible to write disorganized, messy C++ code and rigorously organized C. I always think you should learn C before you learn C++, C++ tries to hide a lot of the messier things but they're not really gone, and can bite you if you don't know them. It's a lot easier to understand with a proper foundation in C.
Writing in C makes it easier to export your code as libraries, even to other languages... Big ones like Perl and Python make it possible to build special loadable modules which use them, but there's a lot more hoops to jump through for calling C++ functions than C ones.
And if you want to program embedded things like handheld video games, C is probably the language you'll deal with. Also to handle the linux kernel, C is what you must know.
As for whether they're worth the effort... There's a plethora of other languages these days ranging from perl and python and ruby all the way to extremely high level things like javascript... For many purposes they're simpler and less effort than C. Except -- what were they all written in? C/C++, of course.
5 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have been wanting to get much deaper into the world of computers for quite some time. I know a lot of c++, and plenty of website programming, and decided that the next step should be Unix.
But here's the thing - I know nothing about Unix. I installed it and everything, but it just seemed like... (3 Replies)
Discussion started by: GuyWithAPen
3 Replies
2. UNIX for Dummies Questions & Answers
So my family is cleaning out our house and my dad stumbled on a Unix system with Unigraphix installed on it, and he remembers that it was 1 of 6 computers in a set that he used at a tool and dye machine shop where he worked. He said that the computer by itself with the monitor was $20,000! I was... (8 Replies)
Discussion started by: NVOtosReborn
8 Replies
3. What is on Your Mind?
Recently while reading an linux magazine I understood that FOSS (Free or open source software) is gaining momentum.. And in my home town there is an reputed university which offers M.Sc online program on FOSS.
The course covers:
INTRODUCTION TO COMPUTING, PHILOSOPHY AND PRACTICE OF FOSS,... (4 Replies)
Discussion started by: Arun_Linux
4 Replies
4. Linux
I'm new to the Linux world and whilst I've been learning the ropes, I've read some conflicting opinions regarding the creation of separate partitions for /home and other directories during OS install.
Some say that having these directories in separate partitions allows you to reinstall without... (12 Replies)
Discussion started by: maerlyngb
12 Replies
5. What is on Your Mind?
I have just been on RedHat SA 3 training course (4 days) and sat exams EX200 (RHCSA) and EX300 (RHCE)
The daft thing was that politics meant I wasn't allowed to take courses SA 1 or 2. So I learnt about stuff I would never use (SELinux; iSCSI; NFS Kerberos encrypted with user specific access... (22 Replies)
Discussion started by: rbatte1
22 Replies
LEARN ABOUT OPENDARWIN
scene_polygon3d
scene_polygon3d(3alleg4) Allegro manual scene_polygon3d(3alleg4)
NAME
scene_polygon3d, scene_polygon3d_f - Puts a polygon in the scene rendering list. Allegro game programming library.
SYNOPSIS
#include <allegro.h>
int scene_polygon3d(int type, BITMAP *texture, int vc, V3D *vtx[]);
int scene_polygon3d_f(int type, BITMAP *texture, int vc, V3D_f *vtx[]);
DESCRIPTION
Puts a polygon in the rendering list. Nothing is really rendered at this moment. Should be called between clear_scene() and render_scene().
Arguments are the same as for polygon3d(), except the bitmap is missing. The one passed to clear_scene() will be used.
Unlike polygon3d(), the polygon may be concave or self-intersecting. Shapes that penetrate one another may look OK, but they are not
really handled by this code.
Note that the texture is stored as a pointer only, and you should keep the actual bitmap around until render_scene(), where it is used.
Since the FLAT style is implemented with the low-level hline() function, the FLAT style is subject to DRAW_MODEs. All these modes are
valid. Along with the polygon, this mode will be stored for the rendering moment, and also all the other related variables (color_map
pointer, pattern pointer, anchor, blender values).
The settings of the CPU_MMX and CPU_3DNOW flags of the cpu_capabilities global variable on entry in this routine affect the choice of low-
level asm routine that will be used by render_scene() for this polygon.
RETURN VALUE
Returns zero on success, or a negative number if it won't be rendered for lack of a rendering routine.
SEE ALSO
create_scene(3alleg4), clear_scene(3alleg4), render_scene(3alleg4), destroy_scene(3alleg4), polygon3d(3alleg4), cpu_capabilities(3alleg4),
exscn3d(3alleg4)
Allegro version 4.4.2 scene_polygon3d(3alleg4)