Mail Archives: djgpp/1997/10/15/22:16:46
> > void Buffer_Pixel(int x, int y, int color){
> > DoubleBuffer[ y*screen_width + x ] = color;
> > } ^^^
^^^
> Aren't you missing a '*2' for 2 bytes per pixel, if not
> then your screen_width is in bytes already and the '* per_pixel' in the
> copy routine is irrelevant.
Actually right now now my Double Buffer is a unsigned short * for some
reason.( I should change that to a void * so it would be better. I just
noticed my Double Buffer wasn't working right so I hacked an example up
quickly.
> Also, are you sure that the LFB enabled properly, if not, you'll get a 64K
> bank at 0A0000h linear which may cause some problems...
Plotting pixels straight to video memory seems to work fine for me in
all modes. My problem is that if I fill the Double Buffer with ,for
example, green, and then plot a few pixels of an other colour into the
double buffer, I will see those pixels for an instant and then the whole
screen will be green.
> As regards to the assembler thing, you sould not need to create or reload
> any selectors. Since the contents of memory SHOULD be mapped to one
> selector with a big limit, ds,es,fs,gs should be the same... Simply write
> to the (linear offset of buffer)+compiler base address to get your pixels
> there.
thanks
Thanks for responding
Jordan Swanson
- Raw text -