Directx & Sdl

Post: #1
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.

Quote this message in a reply
Posts: 312
Joined: 2006.10
Post: #2
Ummm, you do know this is a Mac Developers forum? DirectX is for windows. I doubt you're going to get much help here.
Quote this message in a reply
Posts: 3,591
Joined: 2003.06
Post: #3
We do use SDL with OpenGL though, so if you switch to using OpenGL instead of DirectX then we can probably help. Smile

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.
Quote this message in a reply
Posts: 713
Joined: 2002.04
Post: #4
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
Student and freelance OS X & iOS developer
Quote this message in a reply
Posts: 100
Joined: 2006.05
Post: #5
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...
Quote this message in a reply
Posts: 522
Joined: 2002.04
Post: #6
If the OpenGL driver and feature situation was better, maybe more would use it.
Quote this message in a reply
Posts: 567
Joined: 2004.07
Post: #7
Well, it's a good sight better than the-nonexistent-directx driver.

It's not magic, it's Ruby.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  OpenGL vs DirectX warvstar 28 15,333 May 17, 2003 09:53 PM
Last Post: warvstar