Lowest Level of Graphics on Windows
-
I have been working on GDI previously. It is fine, but all the graphics libraries including GDI have limits. Eg:- Let's say you want to create a gradient with
GDI
(or any other API), of course they're pre-defined functions for you to use. But What if I want to create my own function for a gradient effect. Maybe with theSetPixel()
function. But those APIs (GDI, GDI+
....) are high level APIs. Creating such effects with a high level library slows down the program (because, there's a long pipeline from a GDI call to the Graphics Card). So, What is the lowest possible level of graphics programming on Windows ? Can I program directly to the GPU ? Or Are there any low level Graphics libraries available on Windows ? -
yeaaah... It's a pretty good library for Graphics. But it's probably not the one I'm looking for, i guess. Alright, then, What's under DirectX or GDI or etc.. On what environments are those APIs on ?
-
yeaaah... It's a pretty good library for Graphics. But it's probably not the one I'm looking for, i guess. Alright, then, What's under DirectX or GDI or etc.. On what environments are those APIs on ?
-
Pravinda Amarathunge wrote:
What's under DirectX or GDI or etc
See DirectDraw Architecture (Windows Drivers)[^] for a nice drawing.
Veni, vidi, vici.
Well, that seems a nice one :) Thanks
Pravinda
-
I have been working on GDI previously. It is fine, but all the graphics libraries including GDI have limits. Eg:- Let's say you want to create a gradient with
GDI
(or any other API), of course they're pre-defined functions for you to use. But What if I want to create my own function for a gradient effect. Maybe with theSetPixel()
function. But those APIs (GDI, GDI+
....) are high level APIs. Creating such effects with a high level library slows down the program (because, there's a long pipeline from a GDI call to the Graphics Card). So, What is the lowest possible level of graphics programming on Windows ? Can I program directly to the GPU ? Or Are there any low level Graphics libraries available on Windows ?GDI is actually pretty low-level... not sure what you're trying to accomplish (overall) but maybe you're doing something wrong if GDI is too slow. Remember that you can draw off screen then transition that over to the screen, that method is blazing fast.
-
GDI is actually pretty low-level... not sure what you're trying to accomplish (overall) but maybe you're doing something wrong if GDI is too slow. Remember that you can draw off screen then transition that over to the screen, that method is blazing fast.
Never heard about a such thing before, but soundly cool. Any clue of how to ? :omg:
-
I have been working on GDI previously. It is fine, but all the graphics libraries including GDI have limits. Eg:- Let's say you want to create a gradient with
GDI
(or any other API), of course they're pre-defined functions for you to use. But What if I want to create my own function for a gradient effect. Maybe with theSetPixel()
function. But those APIs (GDI, GDI+
....) are high level APIs. Creating such effects with a high level library slows down the program (because, there's a long pipeline from a GDI call to the Graphics Card). So, What is the lowest possible level of graphics programming on Windows ? Can I program directly to the GPU ? Or Are there any low level Graphics libraries available on Windows ?The lowest level API that you can work with, while still using GDI, is DIBSections. DIBSections allow you to update the pixels of a bitmap manually and draw that bitmap using an HDC. They have always been fast enough, and are many times faster than using the SetPixel method. Hope this helps.
For awesome websites or just to chat check out my blog for more info. . .
-
Never heard about a such thing before, but soundly cool. Any clue of how to ? :omg:
BitBlt()
is the function that does the move (commonly referred to as "bit blitting")... so just look up methods of using that effectively. -
BitBlt()
is the function that does the move (commonly referred to as "bit blitting")... so just look up methods of using that effectively.ooh the Memory DC, it's useful :thumbsup:
-
Never heard about a such thing before, but soundly cool. Any clue of how to ? :omg:
The technique is called double buffering. There are a lot of tips on how to do it with GDI+ here.