www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/14/23:02:23

From: Doug Eleveld <D DOT J DOT Eleveld AT anest DOT azg DOT nl>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Z-buffering for Allegro (long)
Date: Mon, 15 Sep 1997 00:12:56 +0200
Organization: Rijksuniversiteit Groningen
Lines: 23
Message-ID: <341C6168.93B0601E@anest.azg.nl>
References: <34145012 DOT D39BD118 AT xs4all DOT nl>
<hiPrcABThHG0EwOz AT talula DOT demon DOT co DOT uk> <5vccuo$6ht AT freenet-news DOT carleton DOT ca> <ye0vjeA+lrG0EwO1 AT talula DOT demon DOT co DOT uk>
NNTP-Posting-Host: client36-36.oprit.rug.nl
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Shawn Hargreaves wrote:
> But maybe most importantly, is Allegro not already quite object oriented
> enough? Just compare a typical bit of code:
> 
>     BITMAP *bmp = create_bitmap(320, 200);
>     clear(bmp);
>     putpixel(bmp, 10, 10, 2);
>     destroy_bitmap(bmp);
> 
> with a C++ implementation of the same:
> 
>     BITMAP *bmp = new BITMAP(320, 200);
>     bmp->clear();
>     bmp->putpixel(10, 10, 2);
>     delete bmp;
> 

Bravo!  I (of course) originally started programming in C and then moved
to C++ because I liked the IMHO easier and customizable syntax.  What I
have realized while studying the Allegro code and writing DEGUI is that
C can also be wonderfully object oriented, if it is used correctly. 

Doug Eleveld

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019