my fav list

  • www.creativehuman.blogspot.com

Sunday, February 22, 2009

C++ Multimedia Lecture

C++ Multimedia Lecture
by Raymond
For Blacksun Research Facility [BSRF]
http://blacksun.box.sk

- Source Code to FLARE.H and documentation can be downloaded in zip format from http://blacksun.box.sk/tutorials/FLARE-1.0.zip

led raymon talk
so you learned c++
so i learned alot about the graphical functions in the gdi32.dll
and then i learned C++
one of the most powerfull functions in gdi32 is BitBlt or StrechBlt
most C++ windows prgramers have used it
i wanna learn c++ ray, Any advice fer me?
keep quiet arsenic
yes, think very structured
=)
read alot
lecture
LET RAY TALK THEN QUESTIONS
-- Lecture seriously begins approx. here --
what BitBlt and stretchblt do
is copy rectangkles of image data to other Device Contexts
*** rek has joined #bsrf
*** ChanServ sets mode: +o rek
this can be the basis for bitmaped image output
*** snider sets mode: +v Raymond
*** rek is now known as rek[away]
then what?
?
while bitblt is considerd a fast function
what include do we need for BitBlt and stretchblt?
it can become very slow when not used in an acceptable fashion
*** Skulker has joined #bsrf
btiblt and stretchblt can be accesed thru win32 by the windows.h
and should not require and lib inclusion
hey, why aint you nice 2 newbies to your server
now, to get back to the begining on windows and graphics
just cause i dont know c/c++ doesnt mean i dunno unix syntax
windows by nature is slow graphicly
but widnows has many ways to exploit fast image routines
oen feature is the windows DIB object
it stands for Device Indipendant Bitmap
*** rxcv has joined #bsrf
and it simply stores logical image data in ram
not in video memeory
* pitpat- nods
this is a very important feature
becsaue yuo can aquire a pointer to the image data's bytes
*** rxcv Quit (Not enough time connected)
*** DeadKro1 has joined #bsrf
and do extreamly fast image manipultions with that pointer
*** rxcv has joined #bsrf
this can be as simple as ploting pixels
*** DHamster has joined #bsrf
or as complex as drawing an overlayed sine wave on an image to produce the effect of water
Does anyone know the PHP header function to that'll seamlessly change URL's?
I can't find it.
shhhh devin
lecture
hiwo all agian
im now going to ask everyone if they have a certain direction they would like me to go with this lecture
be it game specific
please continute ray
or multimedia specific
multimedia ray
*** DHamster is now known as _Dhamster-
show us a little coding
game?
is that hunanomous?
game
ok game
ok game it is
*** devin has left #bsrf
i will now shwo you a fucntion that i use for extramly fast pixel manipulation
please wait...
* pitpat- holds
ok, sorry for the wait
void __forceinline WritePixel(signed long x,signed long y,FC_Image *lpImage,FS_Color *lpColor)
{
if(x>-1&&y>-1&&xImageWidth&&yImageHeight)
{
unsigned char *lpByte=(unsigned char*)&lpImage->lpImagePixels[y*lpImage->ImageWidth+x];
*lpByte=lpColor->B;
lpByte++;
*lpByte=lpColor->G;
lpByte++;
*lpByte=lpColor->R;
}
}
this function writes a single 24 bit color pointer into an existing image
Raymond: try pvting it to him next time (chan flood...)
rek
its a lecture
it's lecture
opps
the advantage of using this fucntion over the well known function SetPixel
is that is is extramly fast in comparison
SetPixel does alot of color table matching in the background
hehe... luckily rek didn't kicked Raymond as a warning ;)
and simply will not do for graphical manipulation
hehe
the same method can be applied to extract a pixel from an image
void __forceinline ReadPixel(signed long x,signed long y,FC_Image *lpImage,FS_Color *lpColor)
{
if(x>-1&&y>-1&&xImageWidth&&yImageHeight)
{
unsigned char *lpByte=(unsigned char*)&lpImage->lpImagePixels[y*lpImage->ImageWidth+x];
lpColor->B=*lpByte;
lpByte++;
lpColor->G=*lpByte;
lpByte++;
lpColor->R=*lpByte;
}
}
note that out-of-bounds checking is done in thsi function
*** DeadKro1 (Fux4r@64.40.167.BOX-3589) Quit (Read error: 113 (No route to host))
makign higher level functions that use this one, not have to haev such a check
one thing that i always hear people saying
is how they want to perform animation on a window
short of using an avi file
you can splice together all of your animation frames
into one bitmap
:)
load it into an HBITMAP using the LoadImageFunction
and use BitBlt to actualy clip out
and draw
induvidual frames
onto a window's device context
another common question i hear is that they want to draw images that have certain colors extracted
i haev made a routine for this..pleae wait
*** hehe (hehe@BOX-24664.navipath.net) has joined #bsrf
*** hehe is now known as Raymond_2
...
The lecture's not bad but I need to sleep (3:21am here), if someone would e-mail it to me, I'd appreciate it.
sorry about that io lost my connection
void ImageTint(FC_Image *lpImage,bool RedOFF,bool GreenOFF,bool BlueOFF)
{
unsigned long i=0;
unsigned char *lpPixelByte=(unsigned char*)lpImage->lpImagePixels;
while(iImageSizePixels)
{
its ok
if(BlueOFF)*lpPixelByte=0;
lpPixelByte++;
if(GreenOFF)*lpPixelByte=0;
lpPixelByte++;
if(RedOFF)*lpPixelByte=0;
lpPixelByte++;
*** Skulker is now known as Rimmag
i++;
}
return;
}
this function allows you to turn off the color channels or an image
*of
*** MOOCOWMOO has joined #BSRF
the function that i have that is similar to this
hrmm....
is for alphablending
nice ray
i think i cracked that wargame thing
void ImageFade(FC_Image *lpImage,FS_Color *lpColor,unsigned char Alpha)
{
unsigned long i=0;
unsigned char *lpByte=(unsigned char*)lpImage->lpImagePixels;
while(iImageSizePixels)
{
*** Raymond (hehe@BOX-23318.navipath.net) Quit (Ping timeout: 180 seconds)
ther's an ftp running on port 21
*lpByte=(Alpha*(lpColor->B-*lpByte)>>8)+*lpByte;
lpByte++;
*lpByte=(Alpha*(lpColor->G-*lpByte)>>8)+*lpByte;
lpByte++;
hey
*lpByte=(Alpha*(lpColor->R-*lpByte)>>8)+*lpByte;
lpByte++;
i++;
can someone here teach me BNC real quick?
}
return;
or how to use it
}
this will put an overall color shade on an image
moocow we have a lecture
yeah, sh
ok i b quiet
hehe,
*** rek[away] Quit (Quit: )
so, getting back to the story
after about two years of research
good nite, if someone could remember that please mail this lecture to me when it'll be finished.
cya
ive finaly come up with a very advanced multimedia and game development engine
cya elf
nitey nite
it sport's it's own image type called the GMB
*** ElfQrin has left #bsrf
and has the option of RLE compression
in some cases, for animation streams
compresion can be as high as 12 mb file to 2 mb file
*** Red_Death is now known as Smoking_Death
*** _sangoma- has joined #bsrf
the engine also supports an object framework
for creating buttons scrollbars
windows
and the custom objects that are used in the engine
those being..
Actor2D
Actor3D
HotSpot
SpotLight
and zBuffer object
the real power of this lecture is in that i am going to distribute my engine to anyone who wants it
free of charge
*** essex Quit ()
i want it
and to do with whatever you like
i have it
hehe
;)
but, obviously
ther is no warently impiled
k
and you face all conciquences of using it
yea pay respect to ray if you use it
k
he spent 2 years developing it
a comment about me would be nice
but not totaly neccisary
i simply want the people in the world to have the best tools possible
ray: what's the advantage of doing this vs using something like directx or opengl?
the advantage of using my engine over DX or opengl
is that the software rendering that it does
is faster that the software rendering of directx
while it doesn nor support hardware modes
*not
it also requires no dependency
otehr than what win32 already has
*** sheepnus has joined #bsrf
so with those tools I ll have almost everything right?
and the functionaly was built very moduarly
so you coudl adapt it to directX
ray: well it's definitely tied to win32
with the file i am going to distribute
definetly
if you haev MSVC++ 6.0
you can use this engine
it may be possible to use it on other compilers
but i havent tested it on such
the engine has been tested on win95, 98, me and 2k
and do you support all of the operation that directx does or do they need to be implemented
i doont suport all of what directx does
for instance
i dont support a rotation blt
or an alphablt
*** Smoking_Death is now known as Red_Death
but ther implementation can be very easily worked into the existing class structure
sicne bitmaped images are handled in the FC_Image Class
and all other functions take a pointer to an FC Image
ther is lots of base functionalty
and lots of room for expansion
the best part of the engine tho
and actualy that part that i almost didnt wana give away
is that it has a multichannel audio mixer
for async wave file play
:)
meaning that you could play up to 200 waves simultaniously
:)
yea that's alot
*** Raymond_2 (hehe@BOX-24664.navipath.net) Quit (Read error: 104 (Connection reset by peer))
oh no
*** Raymond_2 has joined #bsrf
Raaaaayyyyyy!!!!!!1
=)
lol peer took you away
hehe
so, without futher or do
im going to give the source to snider
and he will distribute it to those who want it -- Look near end of file
*** RealStony is now known as Stony
ray
k
can i put it up on my site?
people can go and grab it
pitpat - where's you site
you can, but obviously it would be nice if you gave me a bit of credit on the site
yea
www.mmm69.com
nothing yet
ya
dont pass it off as your own, hve pride=)
lol
don't worry ray
i will now take any questions on the engine or the lecture
uhm...
so this program your talking about it will go faster right?
it provies the fastest possible output from the base graphical system of windows
that is without using DirectX
or any other Library
cool
*** Trance has joined #bsrf
*** ArSeNiC Quit (Quit: )
so how do we get it?
it also supports the playing of avi movies and the like
im working with snider right now
ok
ok
k
*** Temp-nick is now known as AlienDaemon
i'll send it, if you need it right away. or you can pick it up from the lecture log (tomorrow)
*** XarZ has joined #bsrf
where will the lecture log be?
im also including the documentation for the engine
not it is incomplete
*note
but it will shed alot of light on the objects
damn....i missed a lecture
well I wanna wait for the documentation when can i get it with everything?
and also
if ther becomes the need
and i get alot of intrest
let pitpat know about it
and he will get back to me
:)
and maybe we can post some code samples of the engiens use on his page
:)
what engine?
anything you want ray
gfx?
kewl
multimedia engine
specialy developed for games
o
kewl
but can be used for multimedia
like a dX thing
and high quality sound and animations
*** AciBiBeR Quit (Ping timeout: 180 seconds)
like dx, but it's standard win32
so where will the lecture log be tomorrow, where we can download it?
*** MurDoch has joined #bsrf
Mtcx ask snider
*** Antid0t has joined #bsrf
snider?
I think he's busy
well....the only thing i hate about dX is that u need the whole SDK to use it correctly...and those are lots of filez...
yeah i was gonna set up an auto-transfer script but what the hell
snider are you gonna put it up on the site?
yes, but i don
err
don't have access, so mikkkeee will have to get it first
*** _Dhamster- Quit (Quit: Leaving)
bsrf´s site?
*** Antid0t Quit (Not enough time connected)
blacksun.box.sk yes
*** MurDoch has left #bsrf
k
where's mikkkeee
*** Jesteruk has joined #bsrf
ray thanx for the lecture
:)

---End of Lecture--

No comments:

Post a Comment

 
Gadolinium Lawyers
blogspot visit counter