Directx & Sdl
Hi all!
I am trying to manipulate a 2D picture using sdl and directx. The purpose is to get the specular picture from the source one. Does anyone know how to do it? It is like the function available in the photoeditor softwares (the mirror effect).
Furthermore, I need a special type of cursor. I know there is the function CreateCursor but it doesnt let me customize the cursor. I want the cursor being coloured and that could use an image by loading it. Is that possible? In that case I would appreciate any suggestion or better, source code example for both questions.
Thanks in advance.
Coder
I am trying to manipulate a 2D picture using sdl and directx. The purpose is to get the specular picture from the source one. Does anyone know how to do it? It is like the function available in the photoeditor softwares (the mirror effect).
Furthermore, I need a special type of cursor. I know there is the function CreateCursor but it doesnt let me customize the cursor. I want the cursor being coloured and that could use an image by loading it. Is that possible? In that case I would appreciate any suggestion or better, source code example for both questions.
Thanks in advance.
Coder
Ummm, you do know this is a Mac Developers forum? DirectX is for windows. I doubt you're going to get much help here.
We do use SDL with OpenGL though, so if you switch to using OpenGL instead of DirectX then we can probably help. 
Besides, what's the purpose of using DirectX with SDL? IMHO, if you want to use Microsoft-only technologies for your games (not sure if you're trying to make a game or not) and you don't want to bother with the windowing, then I would *highly* recommend using XNA instead of raw DirectX.
BTW, if you aren't making a game, then be aware that SDL isn't flexible enough to be used for general applications, so you should probably write your own windowing code if you still want to use DirectX for what you're doing.

Besides, what's the purpose of using DirectX with SDL? IMHO, if you want to use Microsoft-only technologies for your games (not sure if you're trying to make a game or not) and you don't want to bother with the windowing, then I would *highly* recommend using XNA instead of raw DirectX.
BTW, if you aren't making a game, then be aware that SDL isn't flexible enough to be used for general applications, so you should probably write your own windowing code if you still want to use DirectX for what you're doing.
As far as the cursor is concerned, just take the mouse position from SDL_MOUSEMOTION events and blit an SDL_Surface at that position, having hidden the system cursor using SDL_ShowCursor( SDL_DISABLE ); that gives you any size of cursor, and any number of colours in the cursor (as well as animations, transparencies, etc.)
Mark Bishop
I think the world would be a better place if everyone used OpenGL. Then porting between platforms would pretty much be a matter of writing windowing code and no one would be bickering about game X not being available for platform Y...
Well, it's a good sight better than the-nonexistent-directx driver.
It's not magic, it's Ruby.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| OpenGL vs DirectX | warvstar | 28 | 8,965 |
May 17, 2003 09:53 PM Last Post: warvstar |
|

