Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


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 =A=   Crossbones+   -  Reputation: 1965

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.

Hi! Cuboid Zone
The Rule: Be polite, be professional, but have a plan to steal all their shaders!


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 =A=   Crossbones+   -  Reputation: 1965

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?

Hi! Cuboid Zone
The Rule: Be polite, be professional, but have a plan to steal all their shaders!


#4 MJP   Moderators   -  Reputation: 11573

Like
0Likes
Like

Posted 06 July 2012 - 11:55 AM

Pass D3D11_CREATE_DEVICE_DEBUG when creating your device.

#5 Migi0027 =A=   Crossbones+   -  Reputation: 1965

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?

Hi! Cuboid Zone
The Rule: Be polite, be professional, but have a plan to steal all their shaders!


#6 kunos   Crossbones+   -  Reputation: 2207

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 =A=   Crossbones+   -  Reputation: 1965

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

Hi! Cuboid Zone
The Rule: Be polite, be professional, but have a plan to steal all their shaders!


#8 kunos   Crossbones+   -  Reputation: 2207

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 =A=   Crossbones+   -  Reputation: 1965

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!

Hi! Cuboid Zone
The Rule: Be polite, be professional, but have a plan to steal all their shaders!





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