DirectX Exploits
#1
hey guys,
   after working on starburst, i decided i wanted to make a pluginwrapper for annother mp3 players plugins. i have the api for the other plugins and it looks doable. basically thier visual interface sends over a spectrum and waveform array, a width and a height of the space to draw. then it returns an array of pixel colors. if i can figure out how to use directx to color in each pixel as defined in the array i can make the wrapper. since i am not a directx guru i have no idea how to use directx to just change the color of each pixel. if you guys have any ideas how to do this let me know.
  the other problems i am having are with direct3d. in my starburst code i can't seem to get it to render anything 3d. here is a link to my  starburst code hopefully you guys can see something i don't.
the lines that should be rotating the camera around my 3d vis are as follows:
Quote:setupcamera();
setuprotation(m_frotation+=5.0f, m_frotation+=5.0f, m_frotation+=5.0f);
setupperspective();
you will need to take a look at the rest of the code to see what happens in my methods.

thanks so much
  dylan
 [email protected]
Reply
#2
direct rendering is pretty easy - lock the back buffer and dump your pixel data in (you have to make sure it's in the right format).
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
could you give me an example i'm not really sure what methods to use to change each individual pixel. usually i would use a vertex buffer then draw a primitive. but all i have is what color each pixel should be. thats kinda what confuses me.
Reply
#4
lock the backbuffer, this gives you a pointer to the surface memory. write the colour values to that memory. Image

also, make sure you write every byte in order - otherwise you'll suffer a massive performance hit.



Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#5
another way is to setup a texture (in whatever format you like) and lock that and write into it just as butcher says. i believe the spectrum vis has code for doing that (it generates the colour faded bar texture by writing direct into the texture memory at startup.)

see the createbartexture() code in spectrum.cpp.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#6
using a texture is better if you need format conversion, yeah.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply

Logout Mark Read Team Forum Stats Members Help
DirectX Exploits0