@# Quotes DB     useful, funny, interesting





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



Comments:

<0> im trying to "fill" an area that is outlined by points - i thought GL_POLYGON would work best, but it seems to create a weird drawing effect when it curves a certain way .. is there any control over how it fills ?
<0> is there a pastebin for images?
<0> found one - here ill show you
<0> http://imagepaste.nulldigital.net/viewimage.php?id=65
<0> so im trying to fill the bottom right shape - the darker blue
<0> i know my points follow that curve .. but it seems to fill the triangle
<1> GL_POLYGON can only be used for convex polygons
<1> You would have to break the polygon into triangles yourself, or you could use the glu's tesselator
<0> hmm, i guess i could try triangles
<2> Is there any common reason why SDL_GL_SwapBuffers() can sometimes take 1 second to execute
<2> sorry, GL_SwapBuffers();
<2> Or whatever the openGL command is
<2> Every 10th or so frame it does that
<3> I've got an object oriented api I've been working on, and I've found the need to store extra data with certain objects, temporarily, and so I realized having a user data pointer might be a good idea.
<3> so now I have a user data pointer which is just a void *, and you can get and set it, however when it comes time to deconstruct the object, what do you think I ought to do if there's user data?
<1> Should be the user's task to clean up behind him, not the library's



<3> do I need to set up a callback so the user can clean up their data, or do you think I should make a base user data cl*** thing
<3> right
<3> I suppose
<3> so, hrmmm the thing is I'm dynamically creating these user data things, so I guess I need to insert them in some sort of container, so I can delete em later
<3> well it feels like an extension of the object in the library
<3> that's why I sort of felt like it could have something to do with the lib
<3> I'm saying it'd be nice if the lib could tell the user when to clean up their data.
<1> Most likely, the user will hold the structs or pointers for use of your library within its own structs already
<4> why cant the user just subcl*** the objects?
<4> using a void* sounds very C :)
<3> It's a C interface actually
<4> ah
<3> I just implemented the library in C++
<1> The user will contain the interface's stuff into its own structs/cl***es/whatever, an extra pointer would not usually be necessary
<1> Unless you can run some kind of "search" and you need an user-provided by-object pointer to identify the objects, but I don't think that's appropriate in your case
<3> basically what's happening is I'm reading data from an exporter and shoveling it off directly to the API
<3> however I had some extra data I needed to have ***ociated with the object I was specifying data for that wasn't really a property the library cares about
<3> I just needed it later
<3> so I could either have a map of the library objects to extra data objects
<3> or I could make the library support a user data pointer
<3> which is what I was trying to go for.
<1> Contain the interface's components within your own structs/cl***es, I don't think there's a point in having an extra pointer
<3> you're probably right.
<3> actually yes
<1> Unless you do stuff like physics and you need to provide the user with information back on what object was hit, for example
<3> I see it clearly now
<3> I get what you mean
<3> hrmm, then again
<3> :P
<3> I am doing an object lookup using the API of the system.
<3> a search.
<3> In fact I think I might be doing what you were saying before...
<1> What do you need any kind of search for?
<3> let me see what I was doing
<3> I sort of haven't touched this code in a couple days and I didn't leave in a good spot
<3> ok, basically, what's going on is at some point I specify a bunch of materials
<3> materials being one of the objects
<3> a set of properties on those materials are a handful of filenames to textures.
<3> that's all the library really cares about anyway, however
<3> hrmm I'm trying not to make this too confusing
<3> let me re-evaluate what I'm trying to figure out
<3> the end goal is that when I'm specifying surfaces (the object that contains a set of faces ***ociated with a single material), I have a lookup to find the material with a certain name for the current surface.
<3> and I also have a bunch of UV Maps I've already loaded as well.
<1> Using "names" sound inefficient to me, unless you mean opengl-style integer names
<3> I'm in exporter land
<3> oh err basically that's the thing
<3> I'm having trouble putting it into words, bare with me.
<3> So I have a bunch of uv maps loaded, and a bunch of materials loaded. And I'm trying to define a surface. The surface has a reference to a material, which has a list of textures for a pre-defined set of attributes. I basically need to connect the textures for the various attributes to specific uv maps.
<3> the exporter has a string that is a unique slot on a material, and one uv map is ***ociated with it, as well as one texture.
<3> and I'm having to sort of after the fact remove the middle man
<3> I'm sure I'm making this way more confusing than it is.
<1> Why can't the user just p*** pointers to whatever resource he wants to use?
<3> he can. If I understand what you're asking
<3> the middle man I'm talking abuot is something I'm having to deal with during the export process
<3> the library takes the references more directly.
<1> The library should keep track of stuff of pointers internally as well, why would you need to search for anything?..
<3> ok, less abstract.
<3> um, I provided searching for materials by name
<3> just for convenience
<3> this library is not a runtime library



<3> err
<3> bad way to say that.
<3> it's not a time critical library.
<1> A name is more convenient than a pointer? :) I don't know, maybe it's the custom in the world of inefficient software... There's much worse than that out there
<3> it's meant for gathering data and writing a file.
<3> actually, the library uses pointers, but if the user needs to see if a material is already loaded with the same name, it queries the library
<3> to find the material if it exists and returns its handle (pointer)
<1> Wouldn't the user have loaded that material, and therefore know about it?
<3> yes, but...
<3> I added it to make it easier for the user
<3> the reason it's hard for the user to track is materials are shared for multiple meshes on a model
<3> and the exporter is loading one mesh at a time
<3> and so, it's not that it's "hard" per-se it's just nice of the library to tell you if you've already loaded the material with the same name earlier, (like when you were loading a different mesh)
<3> alright let me re-think this for a bit
<3> I'm sure I can find a way to do this junk without touching the library
<3> Basically, the tricky business comes from the fact that for a set of faces, I have a material, with a set of textures for properties like color, bump, whatever, and I need each of those textures to use the proper uv map. And the trouble is coming from the exporter making it difficult to find the connection between those two things (uvmap and material specific texture)
<5> does anyone here know how i can see stderr output in the vs2005 ide?
<5> or any other way i can return a message to it while my opengl app is running
<5> so i actually know the code is executing and not just skipping it...
<6> you should see stderr down in the Output window
<5> hmm thats what i was expecting but it just lists a m***ive list of all the libraries its linked and doesnt seem to show any of my output
<6> hmm
<5> im using fprintf(stderr, "successfully started audio");
<6> not sure sorry bud
<5> oh well, thanks anyway
<7> I found out what im having problems with.
<7> r= cos(phi) and x = r cos(theta) then x = cos (phi)cos(theta)
<7> I dont know how to the math combines them
<7> I wish I could see the full work through
<7> why does cos(phi) = r ?
<7> nm got it figured
<7> x = (r*cos(theta))*cos(phi) <--- this formula helped me
<8> Unit41, sholdn't it be x = r*cos(phi)*sin(theta) for polar coordinates
<7> I dont understand why it matters
<7> it just depends where you want your axises ?
<8> Unit41, http://en.wikipedia.org/wiki/Spherical_coordinate_system
<8> Unit41, you have the lenght of the vector (r) then you have the angle to the x-axis (phi) then you have the angle from the z-axis (theta). thus giving, for x, what i stated above.
<7> <8> Unit41, sholdn't it be x = r*cos(phi)*sin(theta) for polar coordinates
<7> is that true ?
<8> Unit41, no. for spherical coordinates.
<8> Unit41, sorry. i wrote the wrong name
<8> actually i did that transformation today with pen and paper. studying for a math test
<7> cool
<7> what name were you tlaking about
<7> y ?
<7> no
<7> yes ?
<8> Unit41, spherical coordinates. (polar coordinates are for circles that is 2D)
<7> I thought polar coordinates ment that it was in the cartesian system
<8> no. that is spherical coordinates.
<7> so x = r*cos(phi)*sin(theta) is still valid
<8> you could have polar coordinates in catesian system as well but then the z-axiz would be constant
<8> or z coordinate constant i mean
<7> hmmm
<8> it is all on wikipedia.
<8> quite good actually
<7> ok so anyway.... why did you write this x = r*cos(phi)*sin(theta) is mine wrong ?
<8> it depends.
<7> x = (r*cos(theta))*cos(phi) is what it says anywhere I looks
<8> if you are going from cartesian system to spherical coordinates it is x = r*cos(phi)*sin(theta)
<8> but if that is not what you are doing i may have just been wasting your time :-/
<7> why does it matter ?
<7> its not a waste, I like knowing everything about everything
<8> well first off cos(theta) != sin(theta)
<9> unit's time is worthless, so it can't be 'wasted' :)
<8> hehe
<7> exactly Erik, its only your time that is wasted
<8> Unit41, look at this: http://en.wikipedia.org/wiki/Spherical_coordinates
<9> it'd probably be a lot easier if you had a good grounding in polar and cylindrical coordinates before doing spherical
<8> yes
<8> which is also in wikipedia
<9> then when you're solid at sperical and complex numbers, you should give quaternions a shot, they're kinda nifty
<9> "liquormortis", I like that on ehehehe
<7> I (limacon) you guys


Name:

Comments:

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






Return to #opengl
or
Go to some related logs:

#nhl
hyprocacy meaning
pgirls.com
#politics
#gamedev
#worldcup
#winxp
#firebird
#gentoo
suv4x4 stan



Home  |  disclaimer  |  contact  |  submit quotes