3d accelleration without ogl / d3d

Started by
15 comments, last by popsoftheyear 15 years, 4 months ago
Quote:Original post by psycoding
Quote:and if it was possible, I'd also like to do this on my own.


this refers to the framebuffer, and the window(s) stuff
You can't. You're running on an operating system, you need to go through the OS to get to the hardware. And the only way to the hardware from the OS, is through drivers. And since there's only drivers for OpenGL or Direct3D, you have to use one or the other.

If you just want to put pixels onto the screen, you could write your own OS, and use interrupts to print pixels in mode 13h, but that still won't give you any hardware acceleration.

What you're trying to do is the equivalent of flying halfway around the world without wanting to use an aircraft.
Advertisement
Uhm, will you also write your own BIOS and a Bootmanager, plus device drivers for your harddisk, both of them? What is with microcode? Don't forget to support the hardware of your teachers.

Basically I can understand you, but then where is the limit? If you sanely want to show your nuts, then take a frameuffer, and write the rendering code in your application onto it (canonical software rendering).

But also look at OpenCL + CUDA, as cignox mentioned :)
All you need to do is write a kernel module that can initialize the card and exports a suitable API to userspace. This API will need to provide things like creating objects in the case of Nvidia, or whatever the equivalent is for AMD and Intel cards, memory management, and submitting command buffers. Then on the userspace side you'll have to use that API to create a suitable context and then you can start filling command buffers and dispatching them to do what you want.

So basically you'll have to write an entire driver. Good luck.
Quote:Original post by outRider
All you need to do is write a kernel module that can initialize the card and exports a suitable API to userspace. This API will need to provide things like creating objects in the case of Nvidia, or whatever the equivalent is for AMD and Intel cards, memory management, and submitting command buffers. Then on the userspace side you'll have to use that API to create a suitable context and then you can start filling command buffers and dispatching them to do what you want.

So basically you'll have to write an entire driver. Good luck.


"All you need to do" heh. Anyway, that's great and all, but it's not like there will have to be a driver per manufacturer (1 for intel, 1 for nVidia, 1 for AMDTI). More like, 1 per card that they came out with... and that's a lot of cards. Even if the OP managed to write some super-optimized radiosity renderer going directly to hardware by way of a self-written kernel-mode driver, it'll work with and only with the card he wrote it for, and not for the other gazillion billion million gfx cards out there. This is an unarguable reason as to why he should trust the black box of OpenGL or Direct3d - unless of course he only wants it to work on his gfx card.

... Not to mention the fact that the driver written by the same company that made the gfx card (note the singular form of that word "card") will probably do things safer and better anyway... but there's always the slight chance (anything's possible) that the OP could possibly know the card and its quirks better than they do...

Cheers
-Scott
The company that build videocards hardware also build the code (aka drivers) for give full access to their hardware via directx and opengl; and they code in a way that the hardware is used in the fastest and best way posible; after all they are selling this kind hardware for videogarmers people that want to have high end frame rate with high end features...

So, if you code in directx or opengl and your app perfomance is poor, it is very unlikely the fault is from the programmers that code the drivers or from the programmers that code directx/opengl; it is most likely you are not using the API in the way thats gives best result; there are a lot docs that explain guidelines for get best result from those APIs
Quote:Original post by popsoftheyear
Quote:Original post by outRider
All you need to do is write a kernel module that can initialize the card and exports a suitable API to userspace. This API will need to provide things like creating objects in the case of Nvidia, or whatever the equivalent is for AMD and Intel cards, memory management, and submitting command buffers. Then on the userspace side you'll have to use that API to create a suitable context and then you can start filling command buffers and dispatching them to do what you want.

So basically you'll have to write an entire driver. Good luck.


"All you need to do" heh. Anyway, that's great and all, but it's not like there will have to be a driver per manufacturer (1 for intel, 1 for nVidia, 1 for AMDTI). More like, 1 per card that they came out with... and that's a lot of cards. Even if the OP managed to write some super-optimized radiosity renderer going directly to hardware by way of a self-written kernel-mode driver, it'll work with and only with the card he wrote it for, and not for the other gazillion billion million gfx cards out there. This is an unarguable reason as to why he should trust the black box of OpenGL or Direct3d - unless of course he only wants it to work on his gfx card.

... Not to mention the fact that the driver written by the same company that made the gfx card (note the singular form of that word "card") will probably do things safer and better anyway... but there's always the slight chance (anything's possible) that the OP could possibly know the card and its quirks better than they do...

Cheers
-Scott


He asked a direct question, I gave him a direct answer. He didn't ask whether or not it was a good idea, he can hopefully decide that for himself if he knows basically what's involved, although if you read what I wrote carefully you'll see I don't think it's an easy task at all.
Oh, no, I'm sorry for the miscommunication... I completely understood what you were saying outRider. I enjoyed the "All you need to do".

My post was more for the OPs benefit :)

-Scott

This topic is closed to new replies.

Advertisement