Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Application::Render()
- {
- //render drawbox
- SDL_Rect offset;
- offset.x = test->getxoffset();
- offset.y = test->getyoffset();
- int width = test->getwidth();
- int height = test->getheight();
- for( int j = 0; j < height; j++) {
- for( int i = 0; i < width; i++) {
- offset.x += 10;
- if(test->getarrayvalue(j,i) == 0) {
- SDL_BlitSurface( pixelnotset, NULL, mWindow.GetSurface(), &offset);
- }
- else
- SDL_BlitSurface( pixelset, NULL, mWindow.GetSurface(), &offset);
- }
- offset.x = test->getxoffset();
- offset.y += 10;
- }
- SDL_BlitSurface( neuron, NULL, mWindow.GetSurface(), NULL);
- SDL_Flip( mWindow.GetSurface() );
- //Here, we will draw our images to the screen
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement