• Advertisement
Sign in to follow this  
  • entries
    201
  • comments
    88
  • views
    100654

Vertexshaders

Sign in to follow this  

106 views

Yesterday evening I have tested the shader loading, management and creation part of my engine. I had a bug in my loading coding which made the code string longer than needed. In fact, the loader does load the content of a file. This might be everything from binary data to text. But if you have a text file, you manually have to set a 0 (null) at the end of the "string". That null is not included in the file so it was missing when loading the file.

Since I worked with strlen and strcpy afterwards, I copied more than the text file content itself. The result was that I got an assertion from deep within the shader compiler stating that a char is outside the char boundaries. I would prefer a compiler error than a straight forward assert message box which shuts down the whole application.

Nevertheless, once I fixed that bug, the loading and management code worked fine. The shader was created properly and set as expected.

But... I didn't see anything... This is due to the parameter that have to be set for the shader to work properly. I still have to think of a good way to manage those parameter and how to pass them to the render kernel.

Looking at the example codes coming with, it seems to be inevitable to "know" the different named parameters inside the C++ code. If it's really so, I'll just mirror the directx effect class behaviour.
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement