@# Quotes DB     useful, funny, interesting





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


Comments:

<0> I want a model to displayed in two tones that are not supposed to be specified anywhere within the model itself. Is it possible to do this inside a display list without requiring that all the objects of one of the colors be rendered before the other?
<1> you could just change the color like normal...
<1> probably will slow it down a bit
<0> The problem with this is that the models don't know in advance what colors they will be rendered in.
<0> The caller chooses that.
<1> do you want to modify whats in the display list or create the list with new values?
<0> I was hoping to somehow dynamically alter the colors that are used in certain places in the display list.
<1> afaik the list cant be modified
<0> And in particular, I was hoping to be able to do this from within a display list.
<1> did you look at vertex arrays?



<0> okay... let me explain in detail what I'm trying to do...
<0> I'm not wanting to change vertex info, I'm just wanting to change the colors that certain things inside the model get rendered in.
<1> i think the best you could do is not set a color in the list and have it use whatever is current before its called
<0> Each model in a scene to be rendered is composed of some combination of primitives and sub-models.A primitive can be drawn in either the main color or auxiliary color supplied for the model, or else an explicit color.A sub model can be drawn either using the same main and auxiliary colors as the current model or else an explicit main/auxiliary color pair.
<0> I'm hoping to be able to put the models into display lists...
<0> but is that sort of structure too complicated to be done with display lists?
<1> a display list is supposed to hold a static object
<0> yeah... the object is static... except for its color.
<1> so its not static :)
<1> you would have to create a new list for each model
<0> crap.
<0> so that means I need to create a new list for each main/auxiliary color pair that I want to render it with... that could get messy.
<0> although I imagine that most objects won't need every color pair in most scenes... it could still get pretty hairy for some objects that are displayed in many different colors.
<0> the alternative is to not use display lists at all.
<1> did you look at vertex arrays?
<1> that would be messy too, but you can change them
<0> From inside a display list?
<1> no
<1> vertex arrays are just arrays of vertices/normals/colors
<1> so they are called like display lists, but they are user defined
<1> from what i understand thus far :)
<0> vertex arrays seem to be made for storing per-vertex data, which isn't what I want. I'm using flat colors for whole primitives.
<0> If there was a way of pushing the current color onto a separate stack, I could do this, by using the attrib stack.
<0> but if I pop 2 values from the attrib stack (GL_CURRENT_BIT), the 1st one is lost.
<0> The other way is to divide the object into 3 display lists, list 1 draws in the main color and only contains commands that use that color, list 2 is the same for the auxiliary color, and list 3 contains all the explicit color references... but I'd rather hoped to not detatch the order I was rendering objects in from the order they are originally specified in the object structure, since that can be user-defined.
<0> seems like the simplest thing to do is not use display lists... grrr...
<1> are your primitives actually primitives?
<1> cubes and whatnot
<0> Yes. GL_TRIANGLES, GL_QUADS, etc.
<1> well i mean are they really small, like 6 sides
<1> because display lists work best for medium-sized models
<0> the primitives are literally opengl primitive. an object would not be likely to have any fewer than a couple of dozen primitives, either directly or indirectly (through sub models)
<1> what i read says you will take a performance hit if the data in a display list is too small due to the overhead of using the display list
<0> well how small is too small?
<1> it depends i guess
<1> http://www.lighthouse3d.com/opengl/displaylists/
<1> most of what i know about display lists i learned from there
<1> i have to run out
<1> bbl
<0> I can always inline a particular submodel when I generate the model if the submodel is too small.



<1> hmm
<1> if i render nothing in my scene, i get 60fps. if i render world geometry only i get 60 fps, and if i render models only i get 60 fps
<1> but if i render both i get 30fps
<2> and what's weird there?
<1> i get 30fps? :/
<2> because you're rendering more stuff..?
<3> always exactly 30?
<1> pretty much
<3> and always exactly 60?
<1> pretty much
<3> "pretty much" or "yes"?
<2> always exactly 60, even on a blank window with vsync, is damn near impossible.
<1> its always between 59.9999 and 63.something
<1> or 30.something and 31.something
<3> is it possible that you render the world, then call something that waits for vsync, then renders the characters, then call something that waits for vsync?
<3> like a SwapBuffer or Flush call twice in a "total scene render"?
<1> its possible
<1> swapbuffer is only once
<1> and no flushes
<3> odd
<1> probably just buggy code
<3> http://paste.lisp.org/ ?
<1> too much to paste :)
<3> (that it's so exact at those rates makes me think something fishy is going on :)
<1> i will see if i can narrow it down a little
<1> i know that rendering more stuff means less fps, but it just seems odd to me that each run fine at full speed and together drop half the frames
<4> hey..
<4> I drew two rectangles, one on top of the other (underneath it in the z-axis). They're supposed to be the top and bottom faces of a table.. I want to rotate the scene so it's like looking at a table from the side, so I rotate 90 degrees around the x axis (90, 1, 0, 0), but then I don't see anything. Any ideas?
<5> You are rotating but not "looking towards" the table probably?
<5> It really helps to understand how matrices work, how the eye is fixed looking at -Z and how you rotate the world around it by multiplying vertices by your matrices
<4> hmm
<3> heh, thus the mantra "there is no camera"
<4> how would I look towards it, if that's the case?
<3> like the spoon, but more opengl-ey
<4> or what should i read to understand this better?
<5> The redbook should cover this well, and there's a popular "matrix and quaternion faq" you can google for if the maths appear like mysticism
<5> The Redbook is available in topic
<4> alright thanks
<4> i thought i had this down a couple years ago with GL.. actually trying to use RenderMan atm and having problems :/
<6> heya
<6> so, I found a compiler crash in visual studio 2005 :P
<6> I wrote a simple program to reproduce it.
<6> http://www.rafb.net/paste/results/gJii5q31.html
<6> The formal parameter for the member function pointer crashes in 2005 using clr support
<6> even simpler: http://www.rafb.net/paste/results/UqBR6C17.html
<7> ``Erik - Whats a good scheme to use?
<3> for what?


Name:

Comments:

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






Return to #opengl
or
Go to some related logs:

penishill
#flash
#beginner
#hardware
#computers
pigtailsroundasses tiffany
#mirc
REFLETIONS XP
#politics
NHL highlight reals



Home  |  disclaimer  |  contact  |  submit quotes