creating a graphics library

I'm trying to create a graphics library for windows. I want it to be fast. Is it possible to access the video card's memory directly instead of using the slow method of drawing pixel by pixel? I looked on the internet and found that some people use
1
2
3
4
5
6
7
8
#include <dos.h> //poke()
...
//enter mode 13
asm("mov ah,0x0/r/n");
asm("mov al,0x13/r/n");
asm("int 0x10/r/n");
//draw pixel at offset
poke(0xA000, offset);

but this seemes to limet the resolution of the window to 320 by 200 and only has 256 colors. Is there another mode that will let me have any resolution I want?
Why don't you use some graphic library which already exists?
Having a graphic library which does everything for you will result to be much more efficient than accessing the GPU yourself.
I was going to use OpenGL to create an application that I could sell. Then I found out to get a licence it costs a huge amount (like $25,000 or somthing). I want to make my own library to make a game that I can sell, and for a challenge.
Mesa is an implementation of OpenGL under the MIT license
I looked up the licence and I can sell it. Thanks.
I'm currently working on a graphical application with OpenGL. I thought I could then commercially distribute my OpenGL based application for free? Is this wrong?
No, not wrong. OpenGL is open.
From opengl.com:

If you are a software or applications developer, you do not need to license OpenGL. Generally, hardware vendors that are creating binaries to ship with their hardware, or software developers that write an OpenGL driver, are the only developers that need to have a license. If an application developer wants to use the OpenGL API, the developer needs to obtain copies of a linkable OpenGL library for a particular hardware device or machine. Those OpenGL libraries may be bundled with the development and/or run-time options or may be purchased from a third-party software vendor without licensing the source code or use of the OpenGL trademark.


Either someone played some evil trick on codist, OR he confused OpenGL with some proprietary library based on OpenGL or something.

PS @codist: Trying to implement a library that can even compare to what the OpenGL API offers would take you years, if you'd even ever get done. OpenGL is free, and I frankly see no reason to use anything else (except for DX maybe, that depends on you I guess). Most other graphics libraries out there (I mean those that people still actually use) are actually build on DX or OpenGL.
Last edited on
That's a relief! Thanks for the advice hanst99.
Topic archived. No new replies allowed.