Sign in to follow this  
Migi0027

C++ Directx 11 Shader Object memory error.

Recommended Posts

Migi0027    4630
Hi guys, I'm porting my engine to be able to render in a panel, so far so good.But, then at random time when debugging(and now happening constantly), It says that I'm trying to write in a read/write protected area of the memory...

And from there I'm kinda stuck, is it because that i don't allocate my memory correctly?

Visual Studio breaks here:

[CODE]
// create the shader objects
dev->CreateVertexShader(VS->GetBufferPointer(), VS->GetBufferSize(), NULL, &pVS); <-------------------HERE
dev->CreatePixelShader(PS->GetBufferPointer(), PS->GetBufferSize(), NULL, &pPS);
[/CODE]

Any ideas?

Best Regards
Miguel Petersen

And between: How can i change my language for the errors that i receive, its in freaking Portuguese! Not fun.

Share this post


Link to post
Share on other sites
Tordin    625
if you enable the debug layer you will get a more detaild explenation of whats happening, post what it sas, if it sas anything.

and also check that VS is valid. that it got correct initialized.

Share this post


Link to post
Share on other sites
Migi0027    4630
[quote name='Tordin' timestamp='1341564314' post='4956260']
if you enable the debug layer you will get a more detaild explenation of whats happening, post what it sas, if it sas anything.

and also check that VS is valid. that it got correct initialized.
[/quote]

How do i enable debug layer?

Share this post


Link to post
Share on other sites
kunos    2254
[quote name='Migi0027' timestamp='1341558582' post='4956239']

[CODE]
// create the shader objects
dev->CreateVertexShader(VS->GetBufferPointer(), VS->GetBufferSize(), NULL, &pVS); <-------------------HERE
dev->CreatePixelShader(PS->GetBufferPointer(), PS->GetBufferSize(), NULL, &pPS);
[/CODE]

[/quote]

perhaps the vertex shader failed to compile? Is your code checking for that?

Share this post


Link to post
Share on other sites
Migi0027    4630
[quote name='kunos' timestamp='1341643484' post='4956584']
[quote name='Migi0027' timestamp='1341558582' post='4956239']
[CODE]
// create the shader objects
dev->CreateVertexShader(VS->GetBufferPointer(), VS->GetBufferSize(), NULL, &pVS); <-------------------HERE
dev->CreatePixelShader(PS->GetBufferPointer(), PS->GetBufferSize(), NULL, &pPS);
[/CODE]

[/quote]

perhaps the vertex shader failed to compile? Is your code checking for that?
[/quote]

For now no

Share this post


Link to post
Share on other sites
kunos    2254
[quote name='Migi0027' timestamp='1341651397' post='4956598']
For now no
[/quote]

Well, maybe is time to do it? :D
VS is nullptr or garbage probably because the vertex shader compile failed or because the file is not even there.

Share this post


Link to post
Share on other sites
Migi0027    4630
[quote name='kunos' timestamp='1341653390' post='4956601']
[quote name='Migi0027' timestamp='1341651397' post='4956598']
For now no
[/quote]

Well, maybe is time to do it? [img]http://public.gamedev.net//public/style_emoticons/default/biggrin.png[/img]
VS is nullptr or garbage probably because the vertex shader compile failed or because the file is not even there.
[/quote]

Forgot to call a method :( Well well, its fixed now, thanks!

Share this post


Link to post
Share on other sites

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

Sign in to follow this