| |
| |
| |
|
Comments:
<OliverKlo> Do any of you guys have advice on having 2d text/icons overlaying the scene? <ZeZu> Stevie-O: just switch to orthographic projection and turn of depth buffering <ZeZu> then render it to the screen like any 2d obj. <Stevie-O> hmmk <ZeZu> Anyone around that knows much about VBOs or something faster than vertex arrays, i'm getting really bad performance in some places and i dont know why <Dr^Nick> Hrm. I know a bit :P again, I use d3d more now <ZeZu> yea <ZeZu> well <androvsky> I know PBOs pretty well, but I don't know much about anything dealing with geometry <ZeZu> for some reason i'm getting some pretty awfull slowdowns using vertex arrays <ZeZu> I wonder if its all the state changes or the rendering <ZeZu> b/c d3d is a lot faster <ZeZu> and i copy the data twice with d3d <ZeZu> I looked at VBOs for opengl once, trying to find more info on it now, but it looked like it only worked for indexed geometry <androvsky> I think now that the PBO extension is out, you can put pretty much whatever you feel like in the buffer <Dr^Nick> they work pretty much the same as regular vertex arrays <Dr^Nick> except you put the data in the vbo first <ZeZu> what is PBO ? <ZeZu> maybe i'll kill setting the rendermode and see if its the state changes causing the slowdown <ZeZu> i'm on a 7900GT and only getting like 10fps in some demos when my d3d gets 50 <ZeZu> its killing me ;| <Kutulu> state changes are generally to be avoided when possible <androvsky> PBO is basically a VBO, but you can put textures in it... fewer restrictions basically <ZeZu> not possible to avoid them <ZeZu> I write a vid plugin for an emulator <Dr^Nick> ZeZu - put state changes in display lists <ZeZu> yes i was thinking of that <Dr^Nick> then call your DL to make the changes. <ZeZu> on my radeon9800 i never had this problem <Dr^Nick> but get rid of your vertex arrays and use vbos :p <ZeZu> well <androvsky> can you put a dynamic texture in a display list? <ZeZu> vbos are just a cache or can i write directly into memory ? <ZeZu> (vram) <androvsky> you can sorta write into memory... <Dr^Nick> ZeZu - you lock the data (get a memory ptr) and copy it over <androvsky> it either winds up in what's called agp memory (for fast DMAs) or it winds up on the card <ZeZu> so pretty much like vbuffer in d3d ? <Dr^Nick> PBO's btw, are just an extension of the buffer interface to include pixel data <Dr^Nick> so you don't want to use them "instead" of vbos <ZeZu> i dont need pixel data i dont think, i load textures and get an id in the normal method <ZeZu> then just cache them <androvsky> oh, and getting a real pointer with a VBO (mapbuffer or whatever) is typically pretty slow... getting the pointer takes much more time than the memcpy <androvsky> BufferSubData is much faster <ZeZu> huh? <androvsky> there's two ways of getting data into a VBO <androvsky> one is you call a mapbuffer routine and it gives you a normal pointer that you can use with memcpy or whatever (even disk reads) <androvsky> the other is to call BufferData and it uploads it for you, but you don't get a pointer to play with <ZeZu> hmm <androvsky> You have to call BufferData anyway to allocate the memory <ZeZu> well i'll check them both out, see if i can just use bufferdata <ZeZu> Is there somewhere better than just http://oss.sgi.com/projects/ogl-sample/registry/ARB/vertex_buffer_object.txt to get info on these ? <androvsky> no, the oss.sgi.com examples are the best and sanest and easiest to understand that I've found, sadly <ZeZu> ok <ZeZu> thanks <androvsky> out of curiosity, I've got a grand total of 16 textured quads... will immediate mode kill me, or do I need to switch over vertex arrays? <Dr^Nick> you'll be fine <androvsky> good... my texturing is kinda wonky <androvsky> wasn't looking forward to figuring out how to make it work in any other way <ZeZu> I hope this helps out, this data isn't getting stored and staying cached it will get replaced every frame <ZeZu> so that means i need to delete all of the buffers each frame i'd imagine as well <androvsky> no <androvsky> you just call BufferSubData to replace what's changed <Dr^Nick> zezu - you just tell them they're dynamic and sub the data <ZeZu> ok <androvsky> looks like all of my program's time is spent in BufferSubData <androvsky> seriously starting to suspect a motherboard issue <androvsky> speed test on our raid array runs at the same speed as a ramdisk :) <JohnnyL> hi <swppop> need help with push/pop matrix <Maloeran> Ask away <swppop> i;m drawing 6X6 lines to creat a "grid" can i paste code here? <Maloeran> Use rafb.net/paste preferably <swppop> whts rafb? <Maloeran> Post there and give us the url <Maloeran> It's commonly used to share code without flooding channels <swppop> whats the full url? <Maloeran> www.rafb.net/paste/ <swppop> ok sec <swppop> there http://rafb.net/paste/results/BRxnYn97.html <swppop> so i;m drawing the lines and after that i'm calling afunction that moves a QUADS but it clears the screen and i don't see the 'grid' <swppop> so i thought to use push pop matrix one matrix for the 'grid' and anothere for the QUADS <Maloeran> Are you drawing at a Z of 1.0 with a default modelview matrix when your near plane is at 0.1? <swppop> allso if posible can you recomand me an opengl book? <Maloeran> Topic, the redbook <Maloeran> The paper version covers more, but the basics are the same <Maloeran> at a Z of 0.0 I meant, with your glVertex2 <swppop> i use glVertex2 4 times to draw the lines each time diffreant values <Maloeran> Ah there's a glTranslate. Execution flow isn't entirely clear with this Java thing :) <swppop> where the glTranslate causes me the "lose" the grid? <Maloeran> This code is seriously weird. Why call glClear() before rendering quad and after the grid? The Push/Pop is quite useless there <swppop> i'm a bigginer... <Maloeran> Your glClear() is clearing the color and depth buffers, so your grid disappears <Maloeran> I recommend reading the Redbook and staying very far away from Nehe <swppop> hehe ok what line is the wrong call for glClear <Maloeran> Clear the buffers at the beginning of the frame, not after rendering the lines <swppop> i'm trying amazon and ebay to find Redbook it seems there a lot of rebooks is the a more specifiec name? <swppop> i've removed the glClear() but i got the same problem i had without this line the moveing qued is'n been cleared and i't all smeared when it moves <swppop> leaveing it's trail <Maloeran> Clear the buffers at the beginning of the frame <swppop> i'm not sure where is it <Maloeran> You really need to read the Redbook and understand the basics of opengl before poking around. These Nehe lessons have got everything wrong <swppop> ok thanks do you know where can i get it at and dose it have a more specific name may be an aouther name? <Maloeran> There's an url to an online version right in the topic <swppop> thanks alot for all your help! <Maloeran> The paper version covers more features regarding recent hardware, but you can learn the basics in any version
Return to
#opengl or Go to some related
logs:
openbsd+Envy24 #windowsxp #gentoo #delphi Dsd0.1.1424.0.msi
#asp _3fg
glulookat does nothing #windows #computers
|
|