Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


VBE/AF coding problem

This topic is 6982 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

I have some problems using VBE/AF driver:
I'v load the driver, map all needed memory and initiate it.
Then i initiate video mode 640x480x8 with the following code:
int res = af_driver->SetVideoMode(0x4101,640,480,&bpp,1,NULL);
Mode seems to be initiated ok, but when i'm trying to fill it with random pixels using this code:
char *surface = af_driver->LinearMem;
for(int i = 0; i<(640*480); i++)
surface[i] = rand()%255;
i get screen filled on ~25% (like vertical screen size is larger 4 times than 480 pixels)
Also i can't get DrawLine function to work. I call it but don't see results.

Anybody can help?

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!