Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » Is 'texture mapping' possible on Painter?
Re: Is 'texture mapping' possible on Painter? [message #52995 is a reply to message #52982] Fri, 31 January 2020 17:30 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13980
Registered: November 2005
Ultimate Member
Tom1 wrote on Tue, 28 January 2020 15:32
Hi,

I would like to 'texture map' an image in a shape of a sector or fan. Is this possible in Painter, like it is in OpenGL using a triangle fan?

(I.e. by defining the center, radius and starting and ending angles of a sector and then fill the area with an Image having its top edge touching the center point and its lower edge touching the arc defined by the radius, stretching out between the starting and ending angles.)

I would like to avoid using OpenGL in this project, partly because this is "just a simple" 2D mapping. However, rendering speed may be a factor here as the data is updated quite frequently.

Best regards,

Tom


Now that is an interesting task... Smile I think individual triagles are still affine transformations, so IMO should be possible to do this.

EDIT:

Well, not affine after all, but IMO neither this it possible in OpenGL with simple texture mapping. IMO you need to add some advanced non-affine shaders to do this 100% correctly... Probably easier to do without the fan at that point, just pixel shader that maps the texture.

Mirek

[Updated on: Fri, 31 January 2020 17:38]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Remove the transparent area around the image (sprite optimization)
Next Topic: Another BufferPainter optimization
Goto Forum:
  


Current Time: Sun Jun 02 11:37:44 CEST 2024

Total time taken to generate the page: 0.02461 seconds