Jump to content

Display part of image


AggrorJorn
 Share

Recommended Posts

Using drawimage()?

Do drawimage use any shaders?

 

Pretty sure it doesn't. I think draw image is just plonked on the top of the rendered image once al shaders have been applied.

STS - Scarlet Thread Studios

AKA: Engineer Ken

 

Fact: Game Development is hard... very bloody hard.. If you are not prepared to accept that.. Please give up now!

Link to comment
Share on other sites

DrawImage only scales the texture based on what dimensions you provide.

 

To draw parts of texture, you can either use raw opengl commands like shown in masterxilo's opengl tut or you can just use LE commands.

LE commands:

1) Create a separate buffer

2) Draw your image oversized to that buffer using the position and scaling to determine how much is shown in the buffer

3) Use GetColorBuffer on that buffer and draw it on your screen

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...