Problem with hardwarebuffer

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
horux
Gnoblar
Posts: 13
Joined: Fri Sep 17, 2004 12:38 pm
Contact:

Problem with hardwarebuffer

Post by horux »

I'm trying to load an image in one texture, before last OGRE version 1.0 I use the function blitToTexture, but in the 1.0 version the texture class has lost this usefull function. I have seen that texture class has a new function getBuffer() that retuns a HardwarePixelBufferSharedPtr. I think that with this class I can access to he graphical card memory and draw my image. The problem is that the c++ compiler (linux) show me this error when I try to create a variable of HardwarePixelBufferSharedPtr:

Code: Select all

myBillBoardSet.cpp:74: error: invalid use of undefined type `struct
   Ogre::HardwarePixelBufferSharedPtr'
The line 74:

Code: Select all

HardwarePixelBufferSharedPtr hpb;
I have tried to compile this:

Code:

Code: Select all

HardwareVertexBufferSharedPtr hpb;

and I haven't got no problem.

I'll hope that someona can help me. And excuse me for my poor english.
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67
Contact:

Post by sinbad »

You need to actually #include OgreHardwarePixelBuffer.h if you want to use it.

The new hardware pixel buffer interface is much more powerful (and less buggy) than the old blitTexure() method.
Stach
Gnoblar
Posts: 5
Joined: Thu Jun 09, 2005 12:17 am
Location: Belfort (France)
Contact:

Post by Stach »

I got the same error by trying the tutorial on dynamic textures...
sinbad wrote:The new hardware pixel buffer interface is much more powerful (and less buggy) than the old blitTexure() method.
Does anyone know how to proceed with the new hardware pixel buffer interface ? (without including OgreHardwarePixelBuffer.h, i would like an up-to-date code ! ;))
Post Reply