www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - dmedia.dprogramming.com - two new tutorials

reply Tom S <h3r3tic remove.mat.uni.torun.pl> writes:
I have written two new tutorials for DMedia
( http://dmedia.dprogramming.com/ )

- Getting started with OpenGL - creating a window
- Drawing basic primitives using OpenGL

Grab them while they're hot ;)


Disclaimer: I'm not a native speaker so if you encounter any language 
errors, please report them to the email given in the Contact section: 
http://dmedia.dprogramming.com/Main/Contact


-- 
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/M d-pu s+: a-->----- C+++$>++++ UL P+ L+ E--- W++ N++ o? K? w++ !O 
!M V? PS- PE- Y PGP t 5 X? R tv-- b DI- D+ G e>+++ h>++ !r !y
------END GEEK CODE BLOCK------

Tomasz Stachowiak  /+ a.k.a. h3r3tic +/
May 07 2006
parent reply Hasan Aljudy <hasan.aljudy gmail.com> writes:
Tom S wrote:
 I have written two new tutorials for DMedia
 ( http://dmedia.dprogramming.com/ )
 
 - Getting started with OpenGL - creating a window
 - Drawing basic primitives using OpenGL
 
 Grab them while they're hot ;)
 
 
 Disclaimer: I'm not a native speaker so if you encounter any language 
 errors, please report them to the email given in the Contact section: 
 http://dmedia.dprogramming.com/Main/Contact
 
 
Nice! I just started reading, and noticed you're using toStringz for strings. I've tried using SDL with D before, and I noticed that you don't need to use toStringz at all, for example, this works just fine: SDL_WM_SetCaption("My SDL Window", null); at least it worked when I tried it.
May 07 2006
parent reply "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Hasan Aljudy" <hasan.aljudy gmail.com> wrote in message 
news:e3lqt1$2h1f$1 digitaldaemon.com...
 I've tried using SDL with D before, and I noticed that you don't need to 
 use toStringz at all, for example, this works just fine:

 SDL_WM_SetCaption("My SDL Window", null);

 at least it worked when I tried it.
That works because string literals in D are implicitly null-terminated, although the literal length won't reflect that. The problem arises when you try to pass in a dynamically created string, which is usually not null-terminated.
May 07 2006
parent "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Jarrett Billingsley" <kb3ctd2 yahoo.com> wrote in message 
news:e3lv9h$30du$1 digitaldaemon.com...
 That works because string literals in D are implicitly null-terminated, 
 although the literal length won't reflect that.  The problem arises when 
 you try to pass in a dynamically created string, which is usually not 
 null-terminated.
Damn crossposted topic. I hate these.
May 07 2006