Originally posted by Bobboau
what you need to do is get a little lower level than gr_bitmap, you might need to make a vertex buffer, that would defenately be faster than the way your doing it,but maybe I should make an interface for complex on the fly geometry, and give it some utility functions whle I'm at it.
if you can't get it wirking by the time I commit my code base I'll get that done for you, other things have needed this for a while anyway.
You know, what I was thinking of suggesting for Ferrium was making a class for simple objects, which would store all the info needed to draw it. Then you could do something like:
bitmap *bmp_ptr;
bitmap bmp
void room_init()
{
bmp_ptr = new bitmap(id, xloc, yloc);
//or - more flexible but takes up more mem
bmp.init(id, xloc, yloc);
}
void room_frame()
{
bmp_ptr->draw();
}
What would happen is when the bitmap was either inited or created, all the stuff related do drawing that bitmap in the current location (the 3D data, vertex buffers, what-have-you) would be stored in the class. When draw() is called, the information is simply sent off to the video card. For stationary objects with a stationary eyepoint (read: interface), that would give a nice speed increase, while keeping all the variables in a nice tidy package.
Anyway, I think I'll be able to make myself at least a stretch function.