Sign in to follow this  
Followers 0
Migi0027

C++ Directx 11 Shader Object memory error.

8 posts in this topic

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.
0

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.
0

Share this post


Link to post
Share on other sites
[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?
0

Share this post


Link to post
Share on other sites
[quote name='MJP' timestamp='1341597351' post='4956399']
Pass D3D11_CREATE_DEVICE_DEBUG when creating your device.
[/quote]

I've done that, then what?
0

Share this post


Link to post
Share on other sites
[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?
0

Share this post


Link to post
Share on other sites
[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
0

Share this post


Link to post
Share on other sites
[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.
0

Share this post


Link to post
Share on other sites
[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!
0

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  
Followers 0