[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Xlib problems (Lol. I've only been programming in it for 10days...)






>> But why don't you just create an XImage
>> and put the data ino XImage->data ?
>>
>> You must however make sure that you use the right format.
>> (Depending on your system.)

>*nods* Sounds good to me. HTF do I do it? It's not like it's totally
>transparent...

Well, my (latest) Lib isn't finished yet.
It only does RGB565. (Which is 16bpp on most i386 based systems.)

I don't know much about palettet modes,
but I asume XCreateColormap is a good starting point.

>The data handle is:

>char *data;

>What do I do with that? Last time I checked pixel values are integers too...I'm
>pretty sure casting them as chars would do _something_ but I'm less than
>convinced it'd do what I want it to.

How do you create the data ?
And what speed do you need ?

Usually it's best to create the data in the format that is accepted by the
XServer.
I'm limited to 16bpp right now, but it's fast.

>> Then just do an XPutImage.

>*nods*, yup that works. But, as I said, I need to make the image first. Got a
>tutorial / book on X images? This X lib tutoral (excellent as it is), is for
>X11R4, and has 2 pages, telling me a) what an Ximage is, b) what it's structure
>is, c) what functions to use on it and d) that it's new and so there's not much
>else to say 'bout it...

Nope.
Well, right now I'm cheating. I do a XGetImage on the window after creation
and the manipulate it's data.

There are some quite good O'Reilly books on X11.


>> If you really need speed. Well, use DGA.

>DGA? Expln pls?

DGA = Direct Graphics Access.

On some systems (Intels ?) you can access the video memory directly.

But if you've never done that, you might be better of using something like
clanlib or ggi.

Sorry, my lib isn't in a usable state.
It has only the functions that I need.
And I don't have the time to clean it up.


>> Or use share memory.

>How does that help?

If you write directly to the XServers memory (assuming it's local) you don't
have to copy
your buffer to the XServer.


>I'll look it up. Thnx for the prompt response!!

Sorry, if I had more time I would go deeper into it ... but ... I've only 13
days left. And that is not enough.

ciao
Anti