Strictly speaking, this is blitz related, it's being wrote in vC+/blitz for blitz...and I'm not about to sign up to another forum just to ask one question...
-
Any one here have any expiance with the gl extension pixel buffer objects? It's a brand new (nvidia/ati) extension to vertex buffer objects.
In that it lets you upload and use video/agp memory for image/pixel data, so that when you call glDrawPixels, it's renders from an offset of that. I.e, no more slow system memory to agp transfers.
HArdware accelerated 2d right? Wrong. I have coded, all working. The engine can dynamically switch between regular sys mem blits and agp memory blits.
Blitting one images with regular slow memory I get 160fps. This is to be expected as it's generally accepted 2d is slow in gl, using native methods.
Blitting the same image with vid mem/pixel buffers, I get 60fps.
Yet, vertex buffer objects are working fine, and fast.
Is it because they are a recent(march 04) addition to the drivers? I do have 60x series nvidia drivers(I know a guy who knows a guy.) and I figured it's basically going to work fine on a g5...
but is it something only really suitible for the new gpus? Seems silly if so..i mean it's only memory management..
(Btw, pixel buffers are not pbuffers)
Any ideas? I know quite a few gl programmers reside around here....
Here's the code I use to upload the image,
and the code to blit the image
drawpixels2 is just drawpixels1, but it accepts an integer(offset) instead of a blitz bank, like the first one. still calls drawpixels without any linking, so again that can't be the problem.
-
Any one here have any expiance with the gl extension pixel buffer objects? It's a brand new (nvidia/ati) extension to vertex buffer objects.
In that it lets you upload and use video/agp memory for image/pixel data, so that when you call glDrawPixels, it's renders from an offset of that. I.e, no more slow system memory to agp transfers.
HArdware accelerated 2d right? Wrong. I have coded, all working. The engine can dynamically switch between regular sys mem blits and agp memory blits.
Blitting one images with regular slow memory I get 160fps. This is to be expected as it's generally accepted 2d is slow in gl, using native methods.
Blitting the same image with vid mem/pixel buffers, I get 60fps.
Yet, vertex buffer objects are working fine, and fast.
Is it because they are a recent(march 04) addition to the drivers? I do have 60x series nvidia drivers(I know a guy who knows a guy.) and I figured it's basically going to work fine on a g5...
but is it something only really suitible for the new gpus? Seems silly if so..i mean it's only memory management..
(Btw, pixel buffers are not pbuffers)
Any ideas? I know quite a few gl programmers reside around here....
Here's the code I use to upload the image,
glGenBuffersObj(1,tempBank) out\pBufId=PeekInt(tempBank,0) glBindBufferObj(GL_PIXEL_PACK_BUFFER_ARB,tempBank) glBufferDataObj(GL_PIXEL_PACK_BUFFER_ARB,BankSize(out\rgba),out\rgba,GL_DYNAMIC_DRAW_ARB) glBindBufferObj(GL_PIXEL_PACK_BUFFER_ARB,0)(The function names are slightly diff from gl because I'm calling these in blitz using a wrapper. It's linking directly to the gl func though, so that's not the cause.)
and the code to blit the image
Function glDrawImage(image,x,y) glFlatScreen() img.image=Object.image(image) glRasterPos2i x,GraphicsHeight()-(y+img\h) If img\pBufId glBindBufferObj(GL_PIXEL_UNPACK_BUFFER_ARB,img\pBufId) glDrawPixels2 img\w,img\h,GL_RGB,GL_UNSIGNED_BYTE,0 glBindBufferObj(GL_PIXEL_UNPACK_BUFFER_ARB,0) Else glDrawPixels img\w,img\h,GL_RGB,GL_UNSIGNED_BYTE,img\rgba EndIf glProject() End Function
drawpixels2 is just drawpixels1, but it accepts an integer(offset) instead of a blitz bank, like the first one. still calls drawpixels without any linking, so again that can't be the problem.