• Advertisement
Sign in to follow this  

way out of Windows

This topic is 4613 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Lately I have gotten into windows programming and I have to tell you guys its hell!!!Is there a way out of this.I mean I have to write 60 lines each lines takes forever for a basic window.Can someone tell me a way of using Direct x without using window programming??????.Its driving me crazy :blink: Another thing is it possible to use allegro and direct x toegther?like using allegro to make the window and program in direct x or something like that?

Share this post


Link to post
Share on other sites
Advertisement
Why don't you use SDL? I know you can use OpenGL in SDL(I am pretty sure you can.)Though, I am not sure what you can use it for. In SDL, it is VERY simple just to get a window going.



Sorry,
if you are going to learn programming for Windows and other systems, then you are going to have to learn it the one and only way. Sorry, when you learn programming, their are NO shortcuts.


Chad.

Share this post


Link to post
Share on other sites
These are only 60 short, straightforward lines that you can almost always copy-paste from the DirectX samples. Why is that so troublesome? All you can do anyway is replace those 60 lines with, say, 10 short, straightforward lines you'll copy-paste from the samples of another API, and compared to the average size of a program, the difference is negligible.

Not to mention that, when using DirectX or any rendering API, you will spend a big part of your initialization code testing device capabilities and enabling properties (things you can't avoid, since you need to decide things about them).

Share this post


Link to post
Share on other sites
Quote:
Original post by thugkilla
Lately I have gotten into windows programming and I have to tell you guys its hell!!!Is there a way out of this.I mean I have to write 60 lines each lines takes forever for a basic window.Can someone tell me a way of using Direct x without using window programming??????.Its driving me crazy :blink:

Err, yes? Take the 60 lines you wrote, paste them into your DirectX program, and there you go. That's all the windows programming you need, and you already have it. Now you can just copy/paste it to any new project you might start on.

Share this post


Link to post
Share on other sites
If you don't want to use 3d acceleration, Allegro is fine and pretty easy to use.

Internally it uses an older DirectX component, DirectDraw to allow it to set the video mode and draw on the screen - this is fairly efficient for software rendering (but does not use 3d hardware).

Mark

Share this post


Link to post
Share on other sites
yah I guess you guys are right just its that I have been using allegro and allegro makes the window so its hard to change habbits.Whatever I have to snap out of it.***slap myself**

Share this post


Link to post
Share on other sites
If you wanna do 3d programming, why not use a 3d engine, like Irrlicht. It's a way to easyer.
// example ( don't have to use WinMain )
#include <irrlicht.h>
using namespace irr;

#pragma comment(lib, "Irrlicht.lib")

int main()
{
IrrlichtDevice *device = createDevice(EDT_SOFTWARE, dimension2d<s32>(512, 384), 16,false, false, false, 0);
device->setWindowCaption(L"Hello World!");
// and so on...
}
Its very easy, don't have to worry about anything like drivers.
Check out Irrlicht here

Share this post


Link to post
Share on other sites
There is a article on how to use SDL and directx 9.0 together here. Haven't read it, because i don't use directx, but SDL is easy to initialize.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement