Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / GetImage -> TextureObject - Size Matters

Author
Message
old man
20
Years of Service
User Offline
Joined: 25th Feb 2004
Location:
Posted: 3rd Mar 2009 17:52 Edited at: 4th Mar 2009 09:27
Meanwhils back at the getimage problem....

I have been using dbgetimage and using getarounds to avoid the problem of the texture not filling the object, but the time has come to get to grips with it.

I have made a simple jpg by scanning in a line of 5 playing cards butt up next to each other, and then;

dbLoadBitmap("clubs1to5.jpg",1);
int dw=dbBitmapWidth(1);
int dh =dbBitmapHeight(1);
i=0;
while(i<5){
dbGetImage(i,0,dh*i/5,dw,dh*(i+1)/5+5,1);
dbMakeObjectPlane(i,dw/10,dh/50);
dbZRotateObject(i,90);
dbTextureObject(i,i);
dbPositionObject(i,(i-2)*dh/40,0,0);
i=i+1;
}

Yes I have all the textures clipped perfectly but, as ever, the texture does not fill the object. I have played around with this for some time and am unable to improve.

What am I doing wrong??

Help please!!

EDIT

Doh, I used a texture flag of 1, should have used zero.

Sorry!

uff

Login to post a reply

Server time is: 2024-09-30 19:35:15
Your offset time is: 2024-09-30 19:35:15