Posts: 483
Joined: Mar 2004
Reputation:
0
great work guys, have to say i'm really impressed :thumbsup:
they all look great, though planestate has to be my favourite
Posts: 10,520
Joined: Sep 2003
Reputation:
10
Gamester17
Team-XBMC Forum Moderator
Posts: 10,520
2005-03-04, 11:08
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
Posts: 4
Joined: Mar 2005
Reputation:
0
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.
Posts: 24
Joined: Feb 2005
Reputation:
0
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.
Posts: 4
Joined: Mar 2005
Reputation:
0
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.
Posts: 4
Joined: Mar 2005
Reputation:
0
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.