C++ Directx 11 Shader Object memory error.

Started by
7 comments, last by Migi0027 11 years, 9 months ago
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.

FastCall22: "I want to make the distinction that my laptop is a whore-box that connects to different network"

Blog about... stuff (GDNet, WordPress): www.gamedev.net/blog/1882-the-cuboid-zone/, cuboidzone.wordpress.com/

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

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?

FastCall22: "I want to make the distinction that my laptop is a whore-box that connects to different network"

Blog about... stuff (GDNet, WordPress): www.gamedev.net/blog/1882-the-cuboid-zone/, cuboidzone.wordpress.com/

Pass D3D11_CREATE_DEVICE_DEBUG when creating your device.

Pass D3D11_CREATE_DEVICE_DEBUG when creating your device.


I've done that, then what?

FastCall22: "I want to make the distinction that my laptop is a whore-box that connects to different network"

Blog about... stuff (GDNet, WordPress): www.gamedev.net/blog/1882-the-cuboid-zone/, cuboidzone.wordpress.com/




// 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
TWITTER: [twitter]KunosStefano[/twitter]
AssettoCorsa - netKar PRO - Kunos Simulazioni


[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

FastCall22: "I want to make the distinction that my laptop is a whore-box that connects to different network"

Blog about... stuff (GDNet, WordPress): www.gamedev.net/blog/1882-the-cuboid-zone/, cuboidzone.wordpress.com/


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
TWITTER: [twitter]KunosStefano[/twitter]
AssettoCorsa - netKar PRO - Kunos Simulazioni


[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!

FastCall22: "I want to make the distinction that my laptop is a whore-box that connects to different network"

Blog about... stuff (GDNet, WordPress): www.gamedev.net/blog/1882-the-cuboid-zone/, cuboidzone.wordpress.com/

This topic is closed to new replies.

Advertisement