|
|
#1 | |||
|
Junior Member
Join Date: Feb 2007
Posts: 9
|
APE Coding, How does the Framebuffer Work???
Hi
Im writing AVS Presets since im 11years and after beeing into trigonometry and advanced mathematics and learning c++, i Want to start writing APEs. But i simply cant figure out how the framebuffer works. Somewhere on these forums i read this: the *int framebuffer pointer points to the first pixel of the framebuffer, in which colour information is stored in 00RGB format (whatever this means) From the BOX Tutorial Example: Quote:
ADRESSFB=framebuffer And the Data (i think its colour information) via int COLPIXEL=*framebuffer is this right? so what does this: Quote:
Quote:
Plz help me understanding |
|||
|
|
|
|
|
#2 |
|
Junior Member
Join Date: Feb 2007
Posts: 9
|
It would help me too if someone could tell me if its possible to debug my APE with VS2002 with the DLL Debugger, simply cant get it to work.
thx Chaos_2k |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Feb 2007
Posts: 9
|
anyone???
im desperate
|
|
|
|
|
|
#4 |
|
Major Dude
Join Date: Oct 2002
Location: The United Kingdom of Great Britain and Northern Ireland
Posts: 1,374
|
quite frankly, if you are struggling with the concept of a framebuffer you really shouldnt be trying to code an APE.
I would normally post something more helpful but if your understanding is that limited I'm not sure where to start. Try reading some c++ tutorials (pointers and arrays in particular), then try looking up some basic graphics programming theory (framebuffers and pixel formats in particular) P.S. I personally have not got debugging of avs to work in VS.NET (bear in mind that it is a vc6 project and you do lose some stuff in the conversion) but apparently it is possible. http://PAK-9.deviantart.com ...innit |
|
|
|
|
|
#5 | |||
|
Junior Member
Join Date: Feb 2007
Posts: 9
|
mh, yeah after some redaing about Bitmaps i got the point.
I simply didnt konw where to start. Its nowhere stated that the framebuffer is organized like a bitmap. I havent had any experiences with framebuffers though ive already written little OpenGL aps. You shouldnt forget im just 15 and still learning *g* Im not that much skilled in c++ but i've already written some little games and stuff for parsing texts (wouldnt have to be in c++ nescesarely but i just wanted to try). After i spend some days relaxing and doing sth. else, i tried to find out myself how it works. But whats not documented: A Bitmap according to Microsofts Specs is starting with the first pixel on the bottom left. The AVS framebuffer starts with the top left Pixel. Also AVS can only use resolutions that are quadruples of 4 because it cant fill up 4 bytes with zeros so the ampount of bytes per line are divisible by four. Or has this a different reason? (i.e 32Bit what used by default will always give you a quadruple of 4, so why couldnt you use different resolutions?) some questions to the c++ code: and YES ive tried to find out myself and this is what i came up with, i just want to know if its correct. I know some questions are realy basic and i think i understood pointers & references. This is no hep forum for c++, but i think its quiet easy for you to answer as my questions arent that difficult. Ill give some code to explain. Quote:
Next question. if the width of my avs window is 322, is w given to the render function 332, or something else? Because if you want to advance to the next pixel, you would have to go 32Bits ahead. On a 32Bit system every Adress in the memory stores 32Bit of Data, so simply going on to the next adress means that there is the next pixel in the framebuffer, right? Quote:
Quote:
so whats the []operator??? The STL knows the bitset: perator[] but i dont think its waht this operator does.Could one of you be so kind and correct me? Sorry for my bad english and my inconvenience |
|||
|
|
|
|
|
#6 | ||
|
Major Dude
Join Date: Oct 2002
Location: The United Kingdom of Great Britain and Northern Ireland
Posts: 1,374
|
Quote:
Quote:
)___ I'm not going to quote the rest of your post because again I'm not sure where to start. You need to look up and experiment with arrays and pointers. Your basic knowledge gap is that an array IS a continuous block of memory, and there are two ways of accessing data in an array The pointer way... code: The array index way... code: Neither is better, they are just different, but you should understand how each works since other people may use either in their code (the AVS source is pretty pointer heavy). Again, try to learn at least some c++ before diving into a relatively difficult task like an avs ape. You can ask more questions if you like but try to keep the short and to the point, I'm not going to keep typing huge replies
http://PAK-9.deviantart.com ...innit |
||
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Feb 2007
Posts: 9
|
Thx for your answer, helped me a lot.
![]() You expressed exactly what i thought about Bitmaps, but you know my bad english *g* Quadruple was meant as something dividable by 4 or something multiplied with 4. ![]() I didnt know about the pointer way to acces arrays. Im not that unskilled in writing c++ apps but im lacking experience in programming as you already noticed *g* I've also tried to understand the avs Source, and i have to say im very impressed about the eel concept with VMs and stuff like that. Its a very good lesson to read and try to understand the Sourc. My deepest respect to those guys who wrote AVS *g* Thx Pak-9 |
|
|
|
|
|
#8 |
|
Major Dude
Join Date: Oct 2002
Location: The United Kingdom of Great Britain and Northern Ireland
Posts: 1,374
|
reading and understanding the AVS source is quite a good learning experience as you say, however it is not that easy since the code is pretty messy.
The best way to learn coding is to actually do it, the more practice you have the better you will get. http://PAK-9.deviantart.com ...innit |
|
|
|
|
|
#9 | |
|
Forum King
|
Quote:
Curse my computer for not working whilst such an awesome thread existed in the forums.
|
|
|
|
|
|
|
#10 |
|
Major Dude
Join Date: Oct 2002
Location: The United Kingdom of Great Britain and Northern Ireland
Posts: 1,374
|
I was a bit curious why you didn't dive in
http://PAK-9.deviantart.com ...innit |
|
|
|
|
|
#11 | |
|
Senior Member
Join Date: Feb 2002
Location: an UFO near planet earth
Posts: 164
|
Quote:
![]() Hope this helps. |
|
|
|
|
|
|
#12 |
|
Major Dude
Join Date: Oct 2002
Location: The United Kingdom of Great Britain and Northern Ireland
Posts: 1,374
|
Useful, thanks
http://PAK-9.deviantart.com ...innit |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|