Jump to content
  • Advertisement
Sign in to follow this  

C++ Directx 11 Shader Object memory error.

This topic is 2144 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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:


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


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
Advertisement
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

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.


How do i enable debug layer?

Share this post


Link to post
Share on other sites



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




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

Share this post


Link to post
Share on other sites

[quote name='Migi0027' timestamp='1341558582' post='4956239']

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




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

For now no


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

[quote name='Migi0027' timestamp='1341651397' post='4956598']
For now no


Well, maybe is time to do it? biggrin.png
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!