Ooops
October 19, 2021, 00:35:38

Author Topic: Quick question.  (Read 262 times)

Offline JBR

  • Full Member
  • ***
  • Posts: 143
Quick question.
« on: September 25, 2021, 01:14:35 »
Hi,

1) Is it possible to draw an image onto another bigger image?

2) Is there any way a texture can be drawn like an image?

Thanks, Jim.

Offline grindalf

  • Full Member
  • ***
  • Posts: 197
Re: Quick question.
« Reply #1 on: September 25, 2021, 08:40:33 »
setbuffer imagebuffer(image1handle)
drawimage image2handle,0,0
setbuffer backbuffer()

that would draw an image to another image
Im not sure how you could draw a texture to an image though

Offline RemiD

  • Hero Member
  • *****
  • Posts: 1290
Re: Quick question.
« Reply #2 on: September 26, 2021, 11:38:03 »
2 ways to draw a texture like an image :

-using copyrect( fromstartx, fromstarty, fromendx, fromendy, tostartx, tostarty, frombuffer (texturebuffer), tobuffer (backbuffer or imagebuffer or texturebuffer) )

-using a quad + texture with pixel perfect sizing + renderworld, so that one texel of the texture corresponds to one pixel of the screen.
for example :
https://www.syntaxbomb.com/blitz2d-blitzplus-blitz3d/help-error-somewhere-to-position-a-quad-precisely-at-mousex-mousey/
« Last Edit: September 26, 2021, 11:52:29 by RemiD »
DualCore AMD E-450, 1646 MHz - 6 Go DDR3 1333 SDRAM - AMD Radeon HD 6320 Graphics (384 Mo) - Windows 7 Home Premium - DirectX 11.0

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal