Fooling around in directx11 template
Posted: March 31st, 2017, 10:06 am
Hey Everyone!
Now it is a while since i showed myself on the forum. I read it everyday and i enjoy all topics that appears.
Now i got an problem as well. I have taken the step to create an new app with the windows DirectX 11 template. It gives you an app with some fps text and an cube rotating on the screen. And as chili says, fool around with the code is a good way to learn s*it. This inspired me to try it out.
With this new app i challanged myself to try to do small things.
-Change rotation to anti clockwise.
-Change so the cube rotate in the y direction instead.
-Change background color.
-Change so the cube uses roll pitch yaw, instead of only rotate.
-Try change text
-Modify XAML, add buttons, slides, textboxes and s*it.
These things i have accompliced with some messy code and many hours reading up on rastertek.com
directxtutorials.com and my favorite site atm msdn. Have also found some samples that helps alot, 3d shooter game, and marble maze. both have alot of documentation on msdn as well.
But there is also things i want to complete but i can't figure out how to, or even where to begin.
-Change color of the cube.
I know where the cube is created and where the in vertices are created. have found the code that:
// Load mesh vertices. Each vertex has a position and a color.
This is pretty straight forward and here i can change the color of the vertices.
But what i wanna do is to actually change the color at runtime. What i have found is the colors set when the cube is created. my idea is to create an function that set all vertices color to something else. but i have no clue how to do this...
-Make the cube change color every rotation
This will be the next goal when i have figured out how to actually change the cube color.
-Change the cube to an pyramid at runtime
-Make the cube an own class and object.
It feels like the cube is not it's own object. Have tried to implement the frustrum calling tutorial from rastertek so i would get 10 objects on the screen. This implementation has been hard to do, but i think i have managed to implement it. But this part of code is quite messy and it have been alot of try and retries.
Things i will try to implement later on:
-A grid and camera movement.
-collision control and interaction with objects.
-Try to make the cubes move around.
A lot of the things i wanna do is covered by the rastertek.com tutorials but i can not figure out how to do it. It feels like just changing color should be super simple but i can't get it to work...
Hope there is someone that could assist
Now it is a while since i showed myself on the forum. I read it everyday and i enjoy all topics that appears.
Now i got an problem as well. I have taken the step to create an new app with the windows DirectX 11 template. It gives you an app with some fps text and an cube rotating on the screen. And as chili says, fool around with the code is a good way to learn s*it. This inspired me to try it out.
With this new app i challanged myself to try to do small things.
-Change rotation to anti clockwise.
-Change so the cube rotate in the y direction instead.
-Change background color.
-Change so the cube uses roll pitch yaw, instead of only rotate.
-Try change text
-Modify XAML, add buttons, slides, textboxes and s*it.
These things i have accompliced with some messy code and many hours reading up on rastertek.com
directxtutorials.com and my favorite site atm msdn. Have also found some samples that helps alot, 3d shooter game, and marble maze. both have alot of documentation on msdn as well.
But there is also things i want to complete but i can't figure out how to, or even where to begin.
-Change color of the cube.
I know where the cube is created and where the in vertices are created. have found the code that:
// Load mesh vertices. Each vertex has a position and a color.
This is pretty straight forward and here i can change the color of the vertices.
But what i wanna do is to actually change the color at runtime. What i have found is the colors set when the cube is created. my idea is to create an function that set all vertices color to something else. but i have no clue how to do this...
-Make the cube change color every rotation
This will be the next goal when i have figured out how to actually change the cube color.
-Change the cube to an pyramid at runtime
-Make the cube an own class and object.
It feels like the cube is not it's own object. Have tried to implement the frustrum calling tutorial from rastertek so i would get 10 objects on the screen. This implementation has been hard to do, but i think i have managed to implement it. But this part of code is quite messy and it have been alot of try and retries.
Things i will try to implement later on:
-A grid and camera movement.
-collision control and interaction with objects.
-Try to make the cubes move around.
A lot of the things i wanna do is covered by the rastertek.com tutorials but i can not figure out how to do it. It feels like just changing color should be super simple but i can't get it to work...
Hope there is someone that could assist