It is currently Fri Apr 28, 2017 11:07 am

All times are UTC - 5 hours




 Page 1 of 1 [ 7 posts ] 
Author Message
 Post subject: Shader VMK 28 - Shader Program Settings
PostPosted: Sun Jul 28, 2013 9:17 pm 
Site Admin

Joined: Sun Feb 11, 2007 8:59 am
Posts: 1094
Location: Ontario Canada
The ShaderProgramSettings class is created in this video. This class depends on the ShaderVariable template class which is also implemented. These classes are used to keep track of GLSL programs and variables in the vertex and fragment shaders that will be used in the ShaderManager.


Offline
 Profile  
 
 Post subject: Re: Shader VMK 28 - Shader Program Settings
PostPosted: Mon Jul 29, 2013 12:18 am 

Joined: Sat Aug 16, 2008 7:58 am
Posts: 447
Nice, It wasn't too hard to follow, and on some of my own projects I've been starting to work with Templates. Doing templated functions is easy, doing templated functions within a class is easy, but doing a templated class is where I started to get into trouble. Im sure the class definitions I am doing are okay, but not sure if it is in the implementation or in the instantiation. This video gave me some good perspective on the proper use of templates and their power. This is great for one class to have a function call that takes in a parameter that could be multiple different objects and does its task based on what is passed in without having to write a function for each that does the same thing. Once I start to get a very good handle on using templates, I should be close to being able to ultilize the power of c++. The only down side I have is the language and standards are evolving, and I can not use VS 2012 since it requires Windows 7 or Higher and I am only running Windows Vista. Some of the conventions in VS2012 are very nice, along with many of its new features that I have read, and watched videos on it. Im just hoping that as you continue this series that you stick with VS2010 conventions.


Offline
 Profile  
 
 Post subject: Re: Shader VMK 28 - Shader Program Settings
PostPosted: Tue Jul 30, 2013 5:10 am 

Joined: Sun Jul 21, 2013 5:17 pm
Posts: 17
Thank you so much. Still have many hours to go for Shaders, but I'm happy to see you are still adding new video tutorials =)


Offline
 Profile  
 
 Post subject: Re: Shader VMK 28 - Shader Program Settings
PostPosted: Fri Dec 06, 2013 9:23 am 

Joined: Mon Feb 13, 2012 7:57 am
Posts: 3
Are you going to be separating the Game from the Engine, at the moment it seems like a circular dependancy

It would seem like there should be a way of creating the attributes/program/uniforms from the game, and the game only sends its requirements to the engine

I am thinking something along the lines of a component/entity system,
that way you can name your programs and test that, instead of pre-creating them in the game headers before hand that then needs including in the engine,

the engine shouldn't depend on anything from the game (to compile), at least in my opinion


Offline
 Profile  
 
 Post subject: Re: Shader VMK 28 - Shader Program Settings
PostPosted: Fri Dec 06, 2013 10:52 pm 

Joined: Sat Aug 16, 2008 7:58 am
Posts: 447
I am not 100% certain on where Marek is going with this project, but I have a great feeling that it is being done this way temporarily until he incorporates the scene graph and memory management. He is still in the process of developing the parser to contain objects for use with the shaders and the shader manager. I have a strong feeling that once the core application of the engine is complete with all of its capabilities to handle all assets being 3D models, 2D sprites or textures, lighting, materials, fonts, GUI elements, HUD elements, sound and the ability to process physics for animation, collision detection, and motion based on user input, I think then when it is time to develop a game using the engine, all of the Game content will be loaded, process and stored in the Game Class along with the game logic and user input control. All of the shaders being used to draw the scene and rendering the objects, lights and animations will be stored and instantiated or instanced in the Game Class. The Engine class will recognize all of these through generic types and will know how to process and handle them without have to change the engine code for each different Game you develop. At least this is the direction I think he is going. It is early to tell since we are still towards the beginning of this Series. We have barely got into depth on all the different types of shader techniques there are, such as alpha maps, bump maps, soft shadows, refraction and reflection, shadows with transparencies, fog, ice and water etc. We can even do very extensive particle engines or simulators using shaders. I can not wait to see this Series in its completed state.


Offline
 Profile  
 
 Post subject: Re: Shader VMK 28 - Shader Program Settings
PostPosted: Sat Dec 07, 2013 3:57 am 

Joined: Mon Feb 13, 2012 7:57 am
Posts: 3
Oh don't get me wrong, I don't doubt Marek's abilities, the main reason I bring it up, is due to the the OpenGL series, and how he said that he knows that the game was too closely tied into the engine, rather than being separate entities,

I just wanted to make sure that from the outset it was split, instead of having to re-engineer 30 more VMKs in

I definitely understand that this is near the beginning of the series, lol, we are on video 35 and we have only just covered stuff that was covered in video 17 of OpenGL


Offline
 Profile  
 
 Post subject: Re: Shader VMK 28 - Shader Program Settings
PostPosted: Sat Dec 07, 2013 8:10 am 
Site Admin

Joined: Sun Feb 11, 2007 8:59 am
Posts: 1094
Location: Ontario Canada
Keloran wrote:
Are you going to be separating the Game from the Engine


That's a good question. In the Game Engine Series you saw that there were 4 projects (GameEngine, MathLib, ObjectLib, and SceneLib). By the time that the Ghost Toast game was written, we had put game specific code in each of those making it very hard to know what is part of the game, and what is part of the engine.

In the Shader Engine series, I've redesigned the separation between the Game part and the Engine parts and split those into two distinct projects. All the game code will now only live in the "Game" project which is the executable. The Engine code will all live inside the Engine library project that is statically linked into the Game project.

It is true that these two projects are still tied together, specifically through the Property.h file. This was the cleanest way that I could do it while still keeping everything else separated. What you are asking for is to make the Engine project a completely standalone library (possibly a dll) which it knows nothing about the Game project. Now this could be done just by removing the dependency on Property.h however that would also break the model of how the Game project is constructed. In the Shader Engine series the Game project takes advantage of all the things found in the Engine through the use of inheritance. You'll notice that Game is inherited from Engine. If you wanted to separate these two, then that would be a lot more work. I wanted to keep the Shader Engine simple to use and simple to debug so I opted to do less work :) It may seem trivial at the moment on how to separate the two, rest assured that once the OpenGL batch manager and animation framework is incorporated into the Engine, you'll see that separating Game from Engine is not easy to do.

I hope that answers your question


Offline
 Profile  
 
Display posts from previous:  Sort by  
 Page 1 of 1 [ 7 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