Jump to content

  • Log In with Google      Sign In   
  • Create Account


C++ Directx 11 Shader Object memory error.


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
8 replies to this topic

#1 Migi0027   Crossbones+   -  Reputation: 1511

Like
0Likes
Like

Posted 06 July 2012 - 01:09 AM

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.

Sponsor:

#2 Tordin   Members   -  Reputation: 604

Like
0Likes
Like

Posted 06 July 2012 - 02:45 AM

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.
"There will be major features. none to be thought of yet"

#3 Migi0027   Crossbones+   -  Reputation: 1511

Like
0Likes
Like

Posted 06 July 2012 - 11:26 AM

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?

#4 MJP   Moderators   -  Reputation: 10550

Like
0Likes
Like

Posted 06 July 2012 - 11:55 AM

Pass D3D11_CREATE_DEVICE_DEBUG when creating your device.

#5 Migi0027   Crossbones+   -  Reputation: 1511

Like
0Likes
Like

Posted 06 July 2012 - 12:19 PM

Pass D3D11_CREATE_DEVICE_DEBUG when creating your device.


I've done that, then what?

#6 kunos   Crossbones+   -  Reputation: 2203

Like
0Likes
Like

Posted 07 July 2012 - 12:44 AM

	// 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?
Stefano Casillo
Lead Programmer
TWITTER: @KunosStefano
AssettoCorsa - netKar PRO - Kunos Simulazioni

#7 Migi0027   Crossbones+   -  Reputation: 1511

Like
0Likes
Like

Posted 07 July 2012 - 02:56 AM


	// 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?


For now no

#8 kunos   Crossbones+   -  Reputation: 2203

Like
0Likes
Like

Posted 07 July 2012 - 03:29 AM

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.
Stefano Casillo
Lead Programmer
TWITTER: @KunosStefano
AssettoCorsa - netKar PRO - Kunos Simulazioni

#9 Migi0027   Crossbones+   -  Reputation: 1511

Like
0Likes
Like

Posted 07 July 2012 - 05:19 AM


For now no


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


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




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS