Java linux HTML qmail C++ PHP Debian MySQL ASP JavaScript perl Delphi NetBSD Solaris etc etc etc [...]

Page: 1 2

<vali> i have installed mingw C compiler on windows xp. i can not compile opengl programs because i don't have gl.h, glu.h etc. where can i download the opengl libraries and headers?
<Maloeran> Are you sure you don't have that in {foo}/include/GL ? I thought it came with mingw
<vali> maybe i didn't get al the packages
<Maloeran> I'm quite sure it was part of the mingw distribution when I had to compile on windows, you are looking for a include/GL directory, right?
<Maloeran> Oh, and the libraries are called libopengl32.a instead of the usual libGL.a, so that might be why you weren't finding them
<Maloeran> ( libglu32.a, libglut32.a as well )
<vali> aah
<vali> i came a bit further now
<vali> +nst)]
<vali> [#opengl]
<vali> oops
<vali> "undefined reference to __glutCreateMenuWithExit" etc
<Maloeran> -lglut32
<vali> i did add that and then i got rid of about half of those messages
<Maloeran> If you still got some, you might need to update glut
<Maloeran> I would personally recommend to use SDL eventually, though

<vali> hmm, i just downloaded the newest version
<vali> sdl?
<Maloeran> Right
<vali> oh
<vali> well, i am just trying to learn opengl
<Maloeran> *nods* Stick to glut for a bit then
<vali> i just need to find out how to go about this error
<vali> the only thing that was missing was glut.h
<vali> so i downloadde the glut 3.7 from
<vali> and put it in include/glut.h
<Maloeran> I never used glut myself, I couldn't be of much help there
<vali> and then that one worked
<^Fishman> I did use glut but that was a long time ago
<^Fishman> also, that has nothing to do with opengl and everything to do with your knowledge of your compiler and linker
<vali> Maloeran: i think i know what's wrong
<vali> Maloeran: i found a website that says "If these are the only three undefined references then you probably linked with -lglut32 instead of glut32.lib"... and those are the messages i get
<Maloeran> That doesn't make any sense. Just throw the "menu" stuff out of the window anyway
<vali> menu?
<``Erik> o.O
<vali> ``Erik: shake your booty!
<``Erik> mwahahahaha
<``Erik> do vegetarians eat animal crackers?
<ShawnM> yea but they give them bad guys
<ShawnM> gass
<ShawnM> gas
<Lightnin> Afternoon
<Lightnin> I'm trying to work with OpenGL. Passing my vertex data to the DirectX driver I have results in seeing what I expect, however, when trying to pass the data to the opengl version, i only have a black screen.
<Lightnin> I'm alittle bit confused as to where to look or how to easily pinpoint the failure
<Lightnin> It appears to initialize properly and is sending vertices via glVertex3fv
<Maloeran> You do know that matrices are handled differently by the two APIs, right?
<Lightnin> yes, however it is going thru a conversion in the d3d one
<Lightnin> actually trying to debug the other programmer's code as he is a bit lost as to why it doesnt work
<Maloeran> glClearColor(), glClear(), anything else than black?
<Lightnin> if i set those to white, i just get white. i tried forcing the clear to white and triangles to black. no dice
<Maloeran> So the setup is indeed fine. You are aware that identity matrices in ogl "look" at -Z?
<Lightnin> i just flipped the frontface to gl_ccw and started getting data. on gl_cw it was a bit empty. might be on the right track now
<Lightnin> I'll continue working on this. It's a pain due to the incoming data needing to be parsed and figured out (on a command type structure)
<Maloeran> Mmhm, good luck
<dukey> quick question to anyone thats here ..
<dukey> under windows
<dukey> will wglGetProcAddress get the address of opengl 1.1 functions
<ElQueffo> dunno.. try it?
<dukey> may as well spose :]
<dukey> hm
<dukey> fail :/
<jake`awy> from msdn: "The wglGetProcAddress function returns the address of an OpenGL extension function for use with the current OpenGL rendering context."
<dukey> yeh i know
<dukey> i was hoping it may work with non extensions of 1.1
<dukey> ;/
<jake`awy> do you want to dynamically load opengl?
<dukey> what do u mean by dynamically ?
<jake`awy> well, usually you would tell your compiler to link with opengl32.lib
<jake`awy> thats static linking
<dukey> yup
<jake`awy> so if opengl32.dll does not exist, your program wont start
<dukey> yeh
<jake`awy> dynamic means, you load the dll, the functions etc "manually" at runtime

<dukey> i'll tell u what im doing exactly
<jake`awy> and if the dll does not exist, you can catch that
<dukey> writing this opengl wrapper which lets u run programs in stereo :p
<dukey> old screenshot ->
<dukey> it works pretty well, but immediate mode is SLOW cause the data gets copied about all over the place
<dukey> goes like wrapper -> copied once or twice -> real opengl32.dll -> the driver
<dukey> so ends up butchering the frame rate
<dukey> was wondering if could just skip the opengl32.dll totally and get the function straight from the driver to try and speed things up
<jake`awy> ooh and you want the adresses of the functions in the actual icd?
<dukey> yeh
<jake`awy> gotcha .. dont have any experience with that
<jake`awy> but
<jake`awy> i doubt thats your problem
<dukey> i assume that is what wglgetprocaddress does with all the extensions
<jake`awy> otherwise, it would be a problem in any opengl program already
<dukey> well
<dukey> its a bigger problem for me
<dukey> because to render stereo u have to pass the data twice
<jake`awy> but dont you have to do this either way?
<dukey> what u mean
<jake`awy> what im getting at: the detour thru opengl32.dll is not really a bottleneck
<jake`awy> the real bottleneck is the duplicate render, whether you pass it thru opengl32.dll or not
<dukey> well
<dukey> put it this way
<dukey> if i render with say um
<dukey> gldrawelements
<dukey> its like
<dukey> 300% faster than immediate mode using stereo
<dukey> and without my opengl wrapper
<dukey> the difference is 20% at most ;p
<jake`awy> hmm cant follow .. what are you comparing?
<jake`awy> oh wait, youre comparing gldrawelements with multiple glvertex?
<dukey> yeh
<dukey> like .. take the screenshot of quake3
<jake`awy> well, thats not really surprising .. youre setting up a case where function calls do matter
<dukey> it has serveral rendering modes
<dukey> u can render with immediate mode, or gldrawelements
<dukey> gldrawlements is naturall faster maybe 20% faster
<dukey> but when i render with my wrapper that difference becomes, massive
<dukey> becuase immediate mode is copying the data all over the place
<dukey> where as gldrawelements just copies pointer few times at most
<jake`awy> i can imagine .. the immediate mode is not something youd use in performance critical applications ..
<dukey> i know,
<jake`awy> why cant you use gldrawelements with your wrapper?
<dukey> u mean, catpure immediate mode -> render with gldrawelemts ?
<jake`awy> nono
<jake`awy> use gldrawelements in your app, process the gldrawelements in your wrapper and pass the gldrawelements to opengl
<dukey> gldrawelemts works fine in my wrapper !
<dukey> my wrapper catpures gldrawelements -> render with gldrawelements
<jake`awy> and you just want to optimize the immediate mode because its slow?
<dukey> fps hit is a little over 100% which is expected rendering the scene twice
<dukey> exactly
<jake`awy> well .. my adivce: dont bother
<jake`awy> *advice even
<jake`awy> as i said, immediate mode is nothing youd use in performance critical applications
<dukey> hm
<jake`awy> so if you have this optimized, it would be seldomly used
<jake`awy> and if used, the speed would most probably not have mattered anyway
<dukey> well theres tonnes of legacy stuff out there which uses immediate mode tbh :/
<jake`awy> the other few extraordinary cases are probably not worth the hassle ..
<jake`awy> well .. legacy stuff should run smoothly on a decent geforce? :)
<dukey> thats the problem
<dukey> the FPS hit is SO great
<Maloeran> The legacy stuff has so low count of vertices that immediate mode is good enough
<dukey> it doesn't :p
<jake`awy> what kind of legacy stuff are we talking about?
<jake`awy> is q3 legacy already? *g*
<dukey> well any game for a start
<dukey> the fps hit seems to be up to 600%
<dukey> the more vertices the worse it gets
<jake`awy> whats theactual frame rate?
<dukey> 12-13 fps
<dukey> :p
<jake`awy> oi



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

Return to #opengl
Go to some related logs:

david barfham
High Fructose Corn Syrup Papa Johns
glut how to rotate a cone