XBMC Screensaver Competition
#76
that's looking very nice jme! let's hope some guys build and release a new version soon so we (the ppl who aren't building the releases themselves) can see your work in action!

and to the other devs.. can you also pimp your creation a bit? i'm quite curious Wink
Reply
#77
great work guys, have to say i'm really impressed :thumbsup:
they all look great, though planestate has to be my favourite
Reply
#78
Question 
(dinomight @ mar. 02 2005,19:07 Wrote:gamester17 i'm not sure if you are getting the pm's i'm sending you
i have recieved yours and all the other winners mails/addresses and will try to post the packages later today (or tomorrow at the latest)
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.
Reply
#79
finally had chance to do a cvs update, and wow! awesome set of screensavers, guys!

i've had some requests about how to go about changing the cubemaps used in cpblobs, so i wrote up this document:

http://www.coolpowers.com/projects/xbmc/..._howto.txt

that should tell you everything you need to know.
Reply
#80
Thumbs Up 
fyi, the adapters were posted yesterday by myself (those of you in europe should get it within a week and those in the states in two weeks, tops), let me know when you get them :d
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.
Reply
#81
ok...i know that the contest is over and everything...but i've been trying to work on this "xp style screensaver" [you know...the one where it just puts the xp logo at random places on the screen] with the xbmc logo for that past two days or whatever. my problem is this...i can make triangles and quads and all that good stuff without textures...but when i try to load a textured quad to display the the logo...all i get is a black screen.  it very well maybe that i have the createtexturefromfile location wrong...but i doubt that because i made a standalone of my screensaver that works just fine. i was assuming i didn't have to do 3dsetrender/texturestate stuff...and also that i don't have to or am even capable of doing something to the back buffer. also i was thinking that in order to have a "slideshow" of pics...or movies...all you would need was standard "screensaver" that takes in an argument for a directory in the loadsettings()...and then just use findfirstfile and findnextfile to populate a dynamic playlist for random/continous playback. i hope/think   Shocked


here's some sample code...it's kinda messed up right now because i got so furious that i started seeing if i could display just a quad....one quad...and g_pd3ddevice = pd3ddevice:


Quote:lpdirect3ddevice8 g_pd3ddevice;
lpdirect3dvertexbuffer8 g_pvertexbuffer = null;
lpdirect3dtexture8         g_ptexture = null;



struct customvertex
{
   float x, y, z;
   dword color;
   float tu, tv;

};


#define d3dfvf_customvertex (d3dfvf_xyz|d3dfvf_diffuse|d3dfvf_tex1)


void drawquad()
{

   void* pvertices;

   customvertex cvvertices[] =

   {

{100.0f, 350.0f, 0.5f, d3dcolor_xrgb(0, 0, 255), 0.0f, 1.0f}, //vertex 1 - blue (100, 350)
       
{100.0f, 100.0f, 0.5f, d3dcolor_xrgb(255, 0, 0), 0.0f, 0.0f}, //vertex 2 - red (250, 100)

{400.0f, 350.0f, 0.5f, d3dcolor_xrgb(0, 255, 0), 1.0f, 1.0f}, //vertex 3 - green (400, 350)

{400.0f, 100.0f, 0.5f, d3dcolor_xrgb(255, 0, 0), 1.0f, 0.0f}, //vertex 4 - red (250, 100)

       

   };

d3dxcreatetexturefromfilea( g_pd3ddevice, "q:\\screensavers\\logo.bmp", &g_ptexture);

   //create the vertex buffer from our device

   g_pd3ddevice->createvertexbuffer(3 * sizeof(customvertex), 0, d3dfvf_customvertex, d3dpool_default, &g_pvertexbuffer);

   //get a pointer to the vertex buffer vertices and lock the vertex buffer

   g_pvertexbuffer->lock(0, sizeof(cvvertices), (byte**)&pvertices, 0);



   //copy our stored vertices values into the vertex buffer

   memcpy(pvertices, cvvertices, sizeof(cvvertices));



   //unlock the vertex buffer

   g_pvertexbuffer->unlock();



     //rendering our triangle

   g_pd3ddevice->setstreamsource(0, g_pvertexbuffer, sizeof(customvertex));

   g_pd3ddevice->setvertexshader(d3dfvf_customvertex);

  g_pd3ddevice->settexture(0,g_ptexture);

   g_pd3ddevice->drawprimitive(d3dpt_trianglestrip, 0, 2);



       g_pvertexbuffer->release();
       g_ptexture->release();



}
Reply
#82
uhmmm..ps...the values used in there for the x and y coordinates are for testing purposes only...i know what they should be...but that doesn't work either.
Reply
#83
if you just want a 2d textured logo showing on the screen without any 3d effects i think your better of skipping the whole 3d. so go to untransformed 2d coords instead. in this case i think you would be better of by just taking my "matrix trails" screensaver that got entered into the compo and remove everything that has to do with the matrix trails effect. it has the texture loading and it should also show you how to render a triangle strip to the screen without transforming it.

on the subject of your code.
to show a texture you better setup some render states. you never know what state you get from xbmc. you dont allocate 4 vertices. you only allocate 3. have you set up the perspective view so you are sure a z of 0.5 is visible on the screen?

anyway, keep on coding!
Current project Plane9 a 3d music visualizer/sound responsive screensaver. Author of the planestate, matrix trails, asteroids and ping pong xbmc screensavers.
Reply
#84
uhmmm....how do you draw a quad with just three vertices? unless i missed something...that's not possible. and there is no transformation code whatsoever. it's set to xyz...not xyzhrw. to "transform the picture" i was just goin to use a translation matrix and random numbers. i completely forgot to change the z coords though. but those don't really matter because the default view is "straight on". even with the z coords setup like that...i can still see a nontextured polygon. but my main concern is why i'm getting only a black screen. presumably...i should be able to see something...even if the z coords are like that. because if i don't have a texture set up...i can see the diffuse colored quad just fine. i'm thinking it has something to do with either the createtexturefromfile function --- ie. the path is wrong. in the standalone xbe...if i just put "d:\\anyfolder\\logo.bmp"...it will load from there  -- no matter where it is. i noticed that the blobs saver just uses "data\\somefilename.dds". i've tried that convention too...with no success. so i don't think it's that...but in my original code...i did have the texturestages states set. i will try putting that in and get back to you all in just a few minutes.
Reply
#85
i'm looking at your matrix code...and...i see that u manage to do it with three vertices (i think) but i don't see where it happens. i'm looking at it...and it's so "object-oriented" (laughs) and u have all these things put in for shorthand...but it's uncommented so i have no idea where everything is going. i'm really not trying to make the next big graphic intensive screensaver. i'm but a humble college student with little experience with dx. i'm just trying to make something basic...make a few cubes dance around the screen...you know..something simple. the standalone version of my saver...the xbe...is just that code...plus the translation matrix...and an initialization funtion. i'm looking at your types header...and i can see that the cvector class is what's being used and that's it a vector3 based class with coordinates for the texture. but i don't see where you actually make the 3 vertices. it looks like you just render one vertex. i'm utterly lost when i try to go between the different calls..etc. what i'm trying to do shouldn't take up more than....200-250 lines...total. it think it should load a texture...and then draw it...but translate the position to let's say rand() * (height - 20) and rand() * (width - 20). that way something is always visible.
Reply

Logout Mark Read Team Forum Stats Members Help
XBMC Screensaver Competition0