@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2



Comments:

<0> or at least the same # :P
<0> Managed C++. Ta dah.
<0> More powerful than C#, with all the niceties.
<0> Anyway timons, to anwer your question....
<0> Effect effect = Effect.FromFile( device, "shader.fx", null, ShaderFlags.None, null); will do it
<1> there are some real uglies w/ managed C++
<1> i've heard bad things, and microsoft has tried to throw a pile of sand over it
<0> Seems they dont support .net 2.0
<1> hehe
<0> at one point they had decided to kill it off
<0> or so I've heard
<0> but they kept it around (it was all the work of one man, who left ms..)
<1> o.O
<1> crazy



<1> heh he probably went crazy
<0> I think it was the same guy leading the managed C++ stuff before 2k5
<0> when managed C++ was ***.
<1> hmm, i'm going to have to do some 2d rotations manually ;|
<0> okay?
<1> not ok, sortof ****s
<1> esp since i can't think of a good way to do it
<2> 2D rotations what
<0> what do you mean you cant think of a good way to do it?
<2> splain yoself
<0> v'=Mv;
<2> tell DrGhaleon where it hurts
<1> err
<1> my math skills are 0 mind you
<2> so what are you tryin to do
<2> I can help
<1> i need to do the math on the points on a quad
<1> so it will rotate
<2> e-z
<1> i know
<2> just use sin/cos
<1> sin ?
<2> sin is y, cos is x
<1> yes thats where i am now
<2> angle is angle
<1> i just multiply then ?
<1> or add ?
<1> i spose the problem is my using cos for both of em
<2> well
<2> what do you want to do
<2> rotate them, or supply an absolute angle
<1> err i'm supplying an angle now, but all i need is a simple rotation on the Y.. clockwise
<2> supplying an angle makes it easy
<1> for(int i=0; i<8; i++)
<1> pos[i>>1][i&1] *= cos(di.rotAngleY);
<1> hehe
<1> bit of a strange effect
<2> float a = angle; for (int i = 0; i < 4; ++i) { vtx[i] = Vector3(pos.x + cos(a), pos.y + sin(a), pos.z); a += PI/2; }
<2> pos is a vector to the center
<2> that help you any?
<1> yes kindof
<1> the problem is that its still going in a big circle
<1> not really "rotating"
<2> in here you are multiplying -> pos[i>>1][i&1] *= cos(di.rotAngle
<2> in my for loop I am setting absolute
<1> err
<1> lets see that may have fixed it
<1> its not rotating but it doesn't go crazy anymore either
<1> for(int i=0; i<4; i++) {
<1> pos[i][0] += cos(di.rotAngleY);
<1> pos[i][1] += sin(di.rotAngleY);
<1> }
<2> see, you're using += there
<2> you need to use =
<1> yes well your adding as well
<2> and preserve the original center position
<1> hmm, but then how does it keep its position
<1> ?
<2> because you preserve the center
<2> you don't change it ever
<2> unless you really want to move it



<1> err
<1> hmm, so you preserve the center elsewhere and then subract these values to get the real positions, i dont see in your code where its preserving the center value, i see it adding pos.x + cos(a)
<2> but it's ***igning to vtx[]
<2> which is not pos
<2> and pos is not an array
<2> it's a single vector3
<1> i see
<1> think i got it figured, i'll play with it
<1> i'll subtract the values i have to get the center and offs the angle from it like you are, guess i wasn't thinking about what you were saying .. i got a horrible hangover and two days to get the finishing touches on two games ;|
<1> http://rafb.net/paste/results/6zHt1722.html doesn't work either, and that looks the most like exactly what your code does
<1> but i'm blind so i likely have missed something
<2> 0.f != di.rotAngleY
<2> what's that aboot
<3> exact comparison with 0? :P
<3> narsty
<3> aav > *
<2> well
<2> 0 is more rounder, and lady like
<3> :P
<3> just like your momma
<2> :D
<2> datz right
<1> hmm?
<1> not everything has to rotate
<2> it's just weird tho
<1> if its zero it just splits coords from center coords
<1> weird or not i dont see it should affect it any
<2> I wasn't sure what it was for
<1> oh
<1> man i really wish i hadn't drank so much last night
<4> Are there any good resources for learning shaders?
<2> huhu
<4> for MDX
<1> its 7:30 pm .. and i'm still hurt
<2> Timons: the shaders are the same in regular and MDX
<4> Yeah, but I don't understand the C++ code
<2> hehe
<2> ZeZu: so what happens now?
<1> its not visible
<4> I'm not real sure how shaders work. I know how to load one now thanks to Dr^nick though
<2> I would debug it, and see what the output points are
<2> Timons: most of the work spent on shaders is in the shader
<2> which is the same across languages
<4> yeah, but that still doesn't tell me how I acctually implement the shader into my progarm
<4> All I know is how to load the shader file, not p*** it data and stuff
<2> ah I see
<2> well I can tell you
<2> ............... in C++!
<4> Heres how I load a shader
<4> Effect effect = Effect.FromFile( device, "shader.fx", null, ShaderFlags.None, null);
<1> hmm
<1> i see the problem
<1> a: 0.006 :: 76.000 - -5.994
<1> a: 1.576 :: 74.995 - -5.000
<1> a: 3.146 :: 74.000 - -6.004
<1> a: 4.716 :: 75.003 - -7.000
<1> a: 0.012 :: 76.000 - -5.988
<1> a: 1.582 :: 74.989 - -5.000
<1> a: 3.152 :: 74.000 - -6.010
<1> so very not valid at all
<2> I'm confused at what any of that means
<2> point out the numbers for me
<1> a: is a, the other is the x - y sorry
<2> there are 7 points in your quad?
<1> no only four but it seems i copied more from the log than i intended to
<1> thus the reason a goes back to 0.0xx
<2> =]
<2> try printing out just the first point
<2> and past me a series of those in pm
<4> Can you explain to me how exactly shaders work? Then I can try and figure it out for MDX


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #directx
or
Go to some related logs:

#beginner
#sql
fruedian sli[
#stocks
#politics
#eggy
#worldcup
#stocks
#gamedev
wehateyou.com



Home  |  disclaimer  |  contact  |  submit quotes