@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet


Comments:

<0> qman: just * faik
<0> afaik
<0> yes, *
<1> err there is no mul in the glsl spec
<0> is in mine
<1> wait
<0> 5.10
<1> remember gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
<1> how about vec * matrix;
<0> works too
<1> version 1.2
<1> where can I dl your version?
<0> from opengl.org
<0> thats where i got it anyway :)
<1> same place



<1> but mine is older apparentlyu
<0> http://www.opengl.org/documentation/specs/
<0> http://www.opengl.org/registry/doc/GLSLangSpec.Full.1.20.8.pdf
<0> specifically
<1> yeah
<1> that's what I dl'ed
<0> section 5.10 (starts on page 38, or 44 in acrobat reader)
<1> there's no mul in there
<0> im looking at it :)
<0> 5.10 Vector and Matrix Operations
<1> yeah I saw it too
<1> so vec/vec^T * mul works right?
<1> s/mul/matrix
<1> basically v * m
<0> yeah, as described in that section
<1> yippy!
<0> v * m <> m * v though, as i can see
<0> u = v * m;
<0> is equivalent to
<0> u.x = dot(v, m[0]); // m[0] is the left column of m
<0> u.y = dot(v, m[1]); // dot(a,b) is the inner (dot) product of a and b
<0> u.z = dot(v, m[2]);
<1> err .. m * v should be quite different
<0> u = m * v;
<0> is equivalent to
<0> u.x = m[0].x * v.x + m[1].x * v.y + m[2].x * v.z;
<0> u.y = m[0].y * v.x + m[1].y * v.y + m[2].y * v.z;
<0> u.z = m[0].z * v.x + m[1].z * v.y + m[2].z * v.z;
<0> yes, and it would appear it is ;)
<1> all righty
<1> problem resolved
<0> specs are nice ;)
<1> guess what... I'm converting HLSL code
<0> groovy
<1> wow I feel like kicking MS in the gonads
<0> hlsl wouldnt be using "the other kind of major" matrices, as direct3d does?
<1> HLSL has 3x3 and 4x4 matricies
<1> I don't know what you mean by 'other kind'
<0> row major vs column major
<0> i just know opengl uses "the other kind" vs direct3d (cant be bothered to think which one uses what right now :)
<1> oh you mean non-cube matricies
<0> right, opengl uses column major
<0> no, column vs row major
<0> ie if you got a d3d matrix, you had to transpose it for it to work in opengl
<1> ohh I see what you mean
<1> well the matter of having to transpose is a matter of working in which coordinate system
<1> left or right hand
<1> however, contrary to what people think, D3D does support both LH and RH system
<1> just depends on whether you use the functions D3DXMatrixPerspectiveRH or LH and D3DXMatrixLookatLH or RH
<1> like gluLookat and gluPerspective
<1> LordCrc, did I answer your Q?
<1> or there is still doubt
<0> ah, never used d3d much
<0> "Matrix packing can be changed with the "#pragma pack_matrix" directive, or with the "row_major" or the "col_major" keywords."
<1> I have to say
<1> accessing matricies is the same
<1> m[1][2] means row 1 column 2
<1> well row 2 column 3 in reality :d
<1> :D*



<0> im used to zero based counting ;)
<0> yeah thats row major
<1> heh
<0> opengl is column major
<1> so m[1][2] means colum 1 row 2?
<0> yes
<1> CRAP!
<1> that's backwards
<1> =/
<0> well, depends on who you ask i guess :P
<1> well come on, if you're indexing an array to an array you don't go backwards do you ? :D
<1> you would get confused
<1> array to arrays*
<0> "LoadMatrix takes a pointer to a 4 4 matrix stored in column-major order as 16 consecutive floating-point values [...] (This differs from the standard row-major C ordering for matrix elements)"
<0> same with glsl, column major
<1> is there some function that I can use to tell GLSL to go row major
<1> because this is really awkward
<1> so this line sets the column vector ? LightToWorld[0] = Tan;
<1> LordCrc, btw thanks for the tip... probably saved me alot of debugging time
<0> should yes
<0> and no i dont know if you can switch it around
<0> havent seen any info suggesting you can
<1> the FAQ says you can use any notation
<1> http://www.opengl.org/resources/faq/technical/transformations.htm
<0> good point
<1> well I could just write my own function =P
<1> or ***ign element by element
<1> crap and I thought I was accessing rows all along X_X
<1> no wonder I had trouble getting bump mapping to work
<1> what kind of a maniac sees m[0] as 1st column? (no disrespect to Lord :D)
<0> qman: i read an explanation for where the "column majorness" came from, but i cant recall it now
<0> certainly no programmer :P
<1> what is meant by abstract parameters in GLSL?
<2> texture question, if I'm going to build a texture from scratch to use in a openGL application, what are my size restraints? (in pixels)
<3> You can query the max supported size.
<3> However if you are insane, 4096x4096 textures have been supported since Geforce 2 GTS.
<3> Use glGet* to query the max width and height.
<2> ok, so it can vary depending on the video card then, right?
<2> and does the image have to be square ? like 256x256 or could it be 256x64 or something?
<4> has to be power of 2 unless non power of 2 textures is supported
<4> but it does not have to be square
<2> ok, thanks.
<3> jenova: Rectangular textures is another extension
<5> why would you want to multiply matrices? I mean what's the result in layman's terms?
<6> JohnnyL, when solving equations and such
<6> A * A^-1
<5> incubus, when solving equations? can't that be said true of *any* equation?
<7> hi folks. i'm trying to add a texture to a glutSolidCube but it doesn't work. however, it works just fine with glutSolidTeapot. any ideas?
<4> dont use glut is a good one
<7> yeah... I know... i'll try to write my own cube-method and see if it works then. if not, i'll be back:-P
<7> i fixed it. hey jenova, can i ask you a question?
<7> just answer if you got the time.. :) how often should you update the screen when programming games? i suppose Sleep() is not a good method if you want to make calculations in the mean time..
<4> sleep is definitely not something you have time for in games
<4> i would update the screen in fps
<1> What is the function in GLSL to kill a fragment in the fragment shader?
<4> kill?
<4> or you mean fail a test?
<1> I meant 'discard' ... thanks anyway
<8> hi all - I'm having trouble colouring points, they always seem to take a colour from the last texture used
<8> can't work out what I'm doing wrong
<8> can anybody give me any advice?
<8> it's either that, or they are white - I can't work out how to use colour on points
<8> actually, that's wrong, I can do it, but I can't do it in this case, so I would imagine I've done something else which makes is so I can't
<3> Code on pastebin please :-)
<8> righto...
<8> I'm working with python, though it doesn't look too different from C++
<3> I'm novice with python, but not totally unfamiliar.
<8> http://pastebin.co.uk/8544
<8> though there is more code that goes on before and after that
<8> :/


Name:

Comments:

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






Return to #opengl
or
Go to some related logs:

jurki lumme
#delphi
#beginner
#politics
#winvista
#ubuntu
sasuketea +miles
#winxp
#winxp
lawn morde



Home  |  disclaimer  |  contact  |  submit quotes