www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/03/30/18:55:35

Message-ID: <370158F4.503D685B@indigo.ie>
From: "B O'Donnell" <odonnllb AT indigo DOT ie>
X-Mailer: Mozilla 4.07 [en] (X11; I; Linux 2.0.36 i486)
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Help with Libgrx contexts
Lines: 27
Date: Wed, 31 Mar 1999 00:06:28 +0100
NNTP-Posting-Host: 194.125.205.135
X-Complaints-To: news AT indigo DOT ie
X-Trace: news.indigo.ie 922835367 194.125.205.135 (Wed, 31 Mar 1999 00:09:27 BST)
NNTP-Posting-Date: Wed, 31 Mar 1999 00:09:27 BST
Organization: Indigo
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

I am trying to use a context to blit my own picture onto the screen, but
doing something wrong.
I strongly suspect it's in GrCreateContext, because I can do screen to
screen blits,
but if I write

GrContext *copyfrom, *copyto;
	copyfrom=GrCreateContext(width, height, my_address, NULL);

where my_address has already been poked and pummelled without noticeable
damage, then do

	GrBitBlt(copyto, x1, y1, copyfrom, x, y, x+width-1, y+height-1,
GrWRITE);

(having printed out the numbers to make sure they're right) I get an
immediate segfault, even though the blit size is only 56*8 pixels.

If I try

	copyfrom=GrCreateContext(width, height, NULL, NULL);
	memcpy(copyfrom->gc_baseaddr, my_address, width*height);

I get no errors - and no result. Advice would be appreciated.
Regards
Brian O'Donnell
odonnllb AT indigo DOT ie

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019