Laptop and desktop shows different results.

Started by
16 comments, last by ankhd 8 years, 1 month ago

I'm pretty sure that the OP is using Direct3D 9 and the ID3DXSprite and ID3DXFont interfaces for drawing sprites and fonts, respectively. Which would be why these items in particular are not working.

Nope, I'm using Direct3D 11. Sprite and text classes are written by me.

I'll be doing what ya'll said then. Thanks!

Advertisement

You should enable Direct3D debug layer.

Aether3D Game Engine: https://github.com/bioglaze/aether3d

Blog: http://twiren.kapsi.fi/blog.html

Control

Nope, I'm using Direct3D 11. Sprite and text classes are written by me.


Well you've probably got a bug in them then; either the classes themselves or how you're using them. Simple process of elimination: if sprites and text aren't drawing, then somewhere around your sprite and text classes are where you'll most likely find the cause of the problem.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

I found a pixel on my screen which is my sprite's. Found that pixel by changing primitive topology to D3D11_primitive_topology_pointlist

http://imgur.com/J0c1ZRg

My vertexBuffer :

http://pastebin.com/M0i38njV

Still don't know why it's only rendering one pixel. I can translate pixel's position with XMMATRIXTRANSLATION, but I can't do anything with XMMATRIXSCALING. Any thoughts?


Still don't know why it's only rendering one pixel. I can translate pixel's position with XMMATRIXTRANSLATION, but I can't do anything with XMMATRIXSCALING. Any thoughts?

A pixel itself will not get scaled, it is just a portion of rasterized object and you seem to only get this one pixel of the object, since translating transformation affects the pixel as you would expect.

I must admit I find it pretty strange combined with fact that it happens on notebook deployment, and not on development deployment. My only suggestion is, that you have not all of the resources and assets deployed on the notebook as well (images etc.)?

If you're doing something undefined, that could also cause differences with different GPUs.

Enable the directx debug layer, and check all return values from your DirectX calls. You said you would do those things... so is everything looking good? All API calls are returning success?

Sometimes some hardware is more forgiving than other hardware. My laptop for example will render my scene fine if I forget to set a scissor rectangle, but my desktop will render nothing.

Anyway thought I would finish this thread with what the actual problem was since it doesn't look like the op is going to.

His problem was that he was creating 3 different input layouts for a vertex shader, each of them having a different number of elements. Only the input layout that matched the vertex shaders signature was being set to something other than null (there was no error checking for these, except for the last one that worked). By the time he was about to draw his text, he had tried to set one of the null input layouts. When he drew his text, his input layout was then null, and apparently only a pixel was being drawn when he set the topology to point list. So either his desktop was forgiving and allowed him to create multiple input layouts that did not match the vertex shaders signature, or his desktop just assumed an input layout when it was set to null (still not sure about the last part)

Hi.

Try checking all texture sizes. Happens some time on laptops power of 2 textures only.

This topic is closed to new replies.

Advertisement