@# Quotes DB     useful, funny, interesting





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



Comments:

<0> is there a d3d channel?
<1> yes, I think Dr^Nick know but he probably isn't here right now
<1> know == knows
<2> methane: #directx
<0> w00t! taaaaankYOU
<3> hi all, noob here. Will someone explain the opengl coordinate system to me? In what units are these coordinates measured?
<4> none
<4> you make up your own units :p
<3> okayyy...explain *that* to me please
<4> k
<4> if you draw a model
<4> all the vertice points could be -1 .. +1
<4> or you could draw the same model but with all the points between -10 .. +10
<3> so what determines it?
<4> depending on where the 'camera' is they will look identical
<4> if you get me



<3> I'm not sure I do.
<4> not really sure how best to explain it
<4> but u can use whatever scale u want
<3> i think i sort of get what you're saying...everything is relative since you can pull back or forward with the camera?
<4> yeh
<4> pretty much
<3> so, at a specific depth, can I determine where, for instance, the edges of my window are?
<4> erm :]
<4> you want to know in world coordinates where the edge of your window is?
<3> bah, lemme explain. I guess I should consider if opengl is really appropriate for what I'm doing, eh? I thought I'd start out learning it, but basically I'm just trying to make a really simple 2d interface.
<4> a 2d game ? :)
<3> I mean, this will probably progress to more later, but at the moment, yeah, a 2d game
<5> how the hell do you render tri strips counter clockwise?
<4> you want to use an orthographic projection matrix then :p
<4> instead of the normal perspective matrix generated by glfrustrum or glu whatever it is
<4> http://www.mevis.de/opengl/glOrtho.html
<4> ^
<4> u want to call that :)
<4> then bottom of your screen is 0,0 and top is window height etc
<3> ah, that sounds better :)
<3> thanks much
<4> np
<4> then when u draw stuff, give the z paramater a 0 :p
<4> or use glVertex2f(
<4> which just sets last paramater to 0
<3> okay
<3> okay, so now that I am using an orthographic projection matrix, how is everything measured? It seems to work as if everything is in relation to the size of my window, ie the edge of the window is at 1.0. Is this correct?
<4> edge of window is 0 i think
<3> well yeah, left edge/bottom edge, yes?
<4> bottom left = 0,0 i think
<3> Yeah, I get that. So, is there any way to just be in normal pixels? :)
<4> that is normal pixels
<3> well, maybe I need to fix something then... :\
<4> fix what ? ;p
<3> when I draw a polygon with with points at (0,0) (.5, 0) (.5,.5) (0,.5), it takes up a quarter of the screen
<3> which is 256 by 256
<4> you did glortho with the projection matrix set right? :]
<4> and you set glviewport
<4> etc
<3> eek nevermind :P
<3> I ended up mixing up the order of the arguments in gluOrtho2D()
<3> heh
<4> gluortho2d just wraps the standard glortho function
<4> with the last params being 1,-1 or maybe other way around :]
<3> yeesh. now I see nothing at all...
<4> user error
<3> :(
<3> http://rafb.net/paste/results/GPKp6L86.html ...anything obviously wrong?
<3> GAH wait!
<3> now i have...
<3> screwed things up embarrasingly
<3> don't look at that :D
<4> yes :p
<4> see like a hundred errors :p
<4> gluOrtho2D(0.0, 1.0, 0.0, 1.0);
<3> hehe
<4> your screen is 1 unit high ?
<4> your viewport ..
<4> glViewport(0, 256, 0, 256);
<4> should match the screen width and height
<4>



<4> u set the matrix mode as
<4> glMatrixMode(GL_PROJECTION);
<3> I had found another tutorial somewheres and was changing the viewport instead of the values in gluortho
<4> then you push the matrix ...
<4> then pop it later ?
<4> so discarding any changes you've made :p
<4> hm i suppose u could do that
<3> what's viewport for anyway...if I do it with gluortho?
<4> viewport sets final screen mapping
<4> u always need to define it
<3> ok
<4> your point in 3d space goes sommit like
<4> 3d point * modelview matrix * projection matrix
<4> then finally viewport mapping
<3> ok. the reason I was pushing the matrix and popping it later was that someone IM'd me this: http://rafb.net/paste/results/0Ytyl157.html
<4> well for what ure doing
<4> u can set the projection matrix once
<4> then never touch it again :p
<3> I should probably read up on the matrix. hah. But this is of course how I operate when I learn things. Screw them up and then fix them and then continue doing it wrong until I cause a horrible error and then learn the right way.
<3> :D
<4> it really is worth learning the basic matrix maths, what the projection/modelview matrix is
<4> and viewport etc
<4> makes life so much easier
<3> I shall. I basically started looking at windows programming and opengl yesterday, soooo...
<6> the learning curve is too high with opengl to trial and error your way through it
<6> cause you need math theory along with your hack and whacking
<4> theres not that much to learn for the basics tbh
<7> !gimme redbook
<6> topic
<3> meh, I need to start doing things the right way.
<7> heh
<4> looking at this was helpful for me
<4> exactly how vertices in 3d space end up on your screen ..
<4> http://extraball.sunsite.dk/notepad.php?ID=20383&parse=c
<4> ^
<3> thanks, I'll give it a look
<4> the gluMultMatrixVecd just multiply the matrices :)
<4> so sommit like 3d point * modelview matrix * projection matrix * viewport width etc
<3> well, I have a date with a chemistry textbook about now. Thanks for all the help, dukey!
<4> lol hf
<3> oh, I know I will
<3> thanks again; byes
<5> Olu: whats this south central farmers link?
<5> I see a pictur of a mexican looking man crying
<5> neat
<5> multitexturing time
<5> grr
<5> How'd I end up typing that in here
<5> gah!
<3> is this normal? If I cover the window I'm drawing in w/ another, my program suddenly takes up most of the cpu...
<3> That certainly doesn't sound good.
<5> i'm having an issue with multitexturing
<5> When I use it, all texturing breaks completely
<5> I enable it like so: glActiveTextureARB(GL_TEXTURE0_ARB); glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, Texture[5]); glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
<5> everything turns green though
<5> i lied
<5> no other textures work though
<5> If I use multitexturing, can I not use "regular" texturing?
<5> http://cpp.sourceforge.net/?show=19160
<5> WHY IS IT BREAKING MY DAMN REGULAR TEXTURING
<5> GAAAAAAAAH
<8> first, why ARB?
<8> its core now
<8> second, do you actually mean glActiveTexture or glClientActiveTexture?
<8> (the separation is retarded)
<9> howdy.
<9> for some reason when i'm trying to draw quads in ortho mode it draws them pow(scale, 2). it only started to happen not long ago i can't figure out why. i'm certain when i'm drawing them i'm p***ing the correct values, but when it appears on the screen it looks scale^2. any idea why this might be happening?
<10> hello, Im trying to figure out glDrawArrays, but so far it keeps crashing..
<10> I have my data in two vectors.. one that contains RGBA structures, and one that contains Vector3f structures
<10> then I do
<10> http://rafb.net/paste/results/LP9iMH28.html
<10> the gl function crashesDrawArrays
<10> erm


Name:

Comments:

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






Return to #opengl
or
Go to some related logs:

filtercheck
ubundu root commands
heatsink amd cpu clamp too tight
#windows
#beginner
mcnamarra WW2
gamegardın
#politics
because the collation of the value is unresolved due to a collation conflict
#rhino3d



Home  |  disclaimer  |  contact  |  submit quotes