PDA

View Full Version : Basic Questions



Arachanox
07-02-2007, 10:17 PM
Hello, I am Arachanox. I am slightly new to the pascal language, but I have most of the basics down.

One of my next ventures is using bitmaps instead of drawing images using the basic draw functions. I've heard of people speak of commands and libraries that can do this...but I'm unaware of their location.

If someone could be kind enough to point me in the direction of some sort of tutorial, i'd appreciate it!

IlovePascal
07-02-2007, 11:03 PM
Hello Arachanox, welcome to PGD (stolen phrase from Will :) ), do you know about OpenGL?

If not, have a look here: http://www.friends-of-fpc.org/tutorials/graphics/dlx_ogl/index.html, it teaches you all the basics and that's where I learned to use OpenGL.

If you do know OpenGL and are looking for nothing else than using bitmaps, have a look at Tutorials 19 and 20 in that same page.

Hope it helps ;)

Arachanox
07-02-2007, 11:30 PM
Wow, this looks great! Thanks for showing me to OpenGL!

~Arachanox

Arachanox
08-02-2007, 01:12 AM
I apologize for the double post, but I have another question.

Is there any relatively simple way to increase the number of colors used in Pascal? Right now i'm suffering with only 16 bit colors.

Thanks for reading...

~Arachanox

IlovePascal
08-02-2007, 02:09 AM
When using OpenGL, you can set the colour by using glColor3f(real,real,real);
What this does is to set the colour in the RGB form with the first parameter for the amount of Red, the second for Green and the third for Blue. Those three values must be anywhere between 0.0 and 1.0. That should give you all the colours!

hope it helps ;)

PS: btw tht is part of the tutorial!