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 / What am I doing wrong with dbWriteImage() ?

Author
Message
y2ksw
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location:
Posted: 25th Mar 2007 22:06
I'm sure this has been discussed many times, but since I'm unable to show search results with more than 100 records, I have to ask this again

I need to write to an image at runtime (terrain texture) and found dbWriteImage(), which seems to be able to do what I need.

However, it does not seem to address correctly the single pixels. In the following sample, I would expect to draw red coloured pixels every 4 pixels, evenly spaced all over. Instead it produces vertical lines, and would fill only about 1/4 of the whole image.

Also it seems, the Y axis goes not from top to bottom, but from left to right.

For me, any kind of addressing the pixel coordinates is fine, but it should be reliable. I tried also to use direct memory access with dbGetImageData/dbSetImageData, but it has other problems, so I'm falling back to dbWriteImage().

Can somebody link me please to a page where the usage of this function is explained, or to a good alternative?

Thanks,
Giovanni

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-11-19 12:24:08
Your offset time is: 2024-11-19 12:24:08