Is it possible? I'm trying either direct or indirect editing of the screen pixels like so:
#include "DarkGDK.h"
void DarkGDK ( void )
{
dbSyncOn();
dbSyncRate(60);
dbSetDisplayMode(1024, 768, 32);
//INDIRECT ONLY
//dbCreateBitmap(1, 1024, 768);
//dbSetCurrentBitmap(1);
//END INDIRECT ONLY
dbLockPixels();
char* ptrImage = (char*)dbGetPixelsPointer();
int imageWidthSize = dbGetPixelsPitch();
*ptrImage = 28;
//or should it be
//prtImage[0] = 28;
//?
dbUnlockPixels();
//INDIRECT ONLY
//dbGetImage(1, 0, 0, 1024, 768);
//dbSetCurrentBitmap(0);
//dbPasteImage(1, 0, 0);
//END INDIRECT ONLY
while ( LoopGDK ( ) )
{
dbSync ( );
}
return;
}
It crashes, with or without the indirect-method code. How should I do this differently?
EDIT: working now. Sorry.
Windows Vista Home Premium Intel Pentium Dual-Core 1.6 Ghz 1GB DDR2 RAM GeForce 8600GT Twin Turbo