POV-Ray : Newsgroups : povray.off-topic : Learning C++ : Re: Learning C++ Server Time
6 Sep 2024 21:19:12 EDT (-0400)
  Re: Learning C++  
From: Invisible
Date: 12 Dec 2008 08:56:24
Message: <49426d88@news.povray.org>
Warp wrote:

>   Some languages, such as Java, come with standard libraries for drawing
> graphics

But using it is still nowhere near the level of "plot a pixel here please".

> but in general the no-graphics-libraries trend is probably
> because languages want to be portable, and it's very hard to make portable
> yet efficient generic graphic libraries.

Yeah, that's about the size of it.

>   OpenGL is a very good, cross-language attempt, but you can't do
> *everything* with it. Its target application range is rather narrow
> (basically only hardware-accelerated 3D and 2D graphics, but it doesn't
> have any support for eg. windowing systems).

Indeed. Without having a way to talk to the native graphics control 
system to set up a drawing surface, OpenGL is no help. (There also seems 
to be some disagreement above whether you can use GLUT on Windows...)

>> (Back when I was a kid, you could just say "plot 4, 7" and it would draw 
>> a dot there. Ah, I had no idea how good I had it!)
> 
>   In those days portability was not an issue for the people who made the
> compilers.

In those days, nobody had multitasking either (so you don't have to 
*share* the framebuffer with anybody). That probably helps.

>> This made me actually laugh out loud. For real. Such a glowing 
>> recommendation of the Win32 API! :-D
> 
>   I once tried to look how I would create a simple dialog which contained
> some radio buttons, textfields and buttons directly with the Win32 API, and
> I was absolutely horrified at how horrendously difficult it is.
> 
>   With the Win32 API you have to define *absolutely* everything by hand.
> Every pixel coordinate, every width and height, every color. Everything.
> And often in the hardest possible way.

Well, I guess that means you have lots of control over what it does. On 
the other hand... tedious, much?

>   The standard answer to this is "you don't create windows with the Win32
> API directly, you use a graphical GUI creation software, and it will
> generate the coordinates for you".

Indeed. I typically use GTK - because I can't get SDL to work. (Which is 
a pitty, because SDL does way more stuff!)

>   The only problem in this particular case is that, AFAIK, VS Express does
> *not* come with such a GUI creation module. (At least VS 2005 Express didn't.)

*My* problem is that... well GTK isn't something you usually find on 
Windows. :-S


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.