It is currently Mon Jun 26, 2017 12:29 am

All times are UTC - 5 hours




 Page 1 of 1 [ 2 posts ] 
Author Message
 Post subject: Shader VMK 55 - Moving Objects
PostPosted: Mon Oct 13, 2014 7:17 am 
Site Admin

Joined: Sun Feb 11, 2007 8:59 am
Posts: 1094
Location: Ontario Canada
In this video I show how to modify the VisualMko class so that we have built in support for moving mko objects on the screen, and everything still works correctly with the BatchManager.


Offline
 Profile  
 
 Post subject: Re: Shader VMK 55 - Moving Objects
PostPosted: Mon Oct 13, 2014 8:28 am 

Joined: Mon Mar 24, 2014 2:25 pm
Posts: 69
Excellent, just implemented successfully and a bit cleaner than my hack. Went ahead and made TransformMatrix work on a vec3 to work with the Batch3D objects. One thing I'm wondering about with the Batch3D is having the GPU do the offsets. This would get a bit tricky with the batching process since we want multiple objects in the same batch if their textures align. I was attempting to add flags to the batches to allow you to switch a Shader program's uniform "offset" in the middle of the empty batch process, but this forced calling glDrawElements on a particular # of indices and then change the "offset" and run glDrawElements on the next set of indices in the same batch, which kills the entire point of the batch manager allowing multiple objects in a single batch. Unfortunately doing these calculations on the GPU seems a bit more complicated to implement successfully than I had hoped.


Offline
 Profile  
 
Display posts from previous:  Sort by  
 Page 1 of 1 [ 2 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  

cron