I am writing a code of drawing a colorful box with Directx11 and the graphics do not show. Here's a screenshot of debugging graphics using visualstudio graphics debugger.
It seems like the vertex buffer or indices buffer is wrong, but I cannot find the problem.
I commit my code to github. Here is the url:
https://github.com/christliu/GraphicsAPI/tree/Effect/DirectX11.
Please tell me where is the problem.
Related
I am currently trying to learn vulkan. I am using vulkan-tutorial.com, but am having som problems getting the same result as the tutorial. When the tutorial is creating a square, using index buffers, they get a square, while I get a triangle. I copied the code they posted (on the page) into my project to make shure I did not write somehting wrong
Here is a image of what I am rendering
While this is what I should be rendering
All the code I am using is found on the page, or here:
c++ code, vertex shader, fragment shader
If you need more info about anything, just ask.
Thanks for any help!
If you look at this image
you can see it just fine (with anti theft diagonals over it.) in a browser but trying copying it and opening it up in your favorite image editor. The image is mostly black with the lines and an almost impossible to see version of the shape in editors.
I'm guessing they messed with the png meta data that browsers don't generally read but editors do?
It's not image protection. The file contains an alpha channel. The area between the hash lines has an alpha of 0, which means transparent. Many image viewers do strange things in this situation. They may, for example, clear the background to black before drawing the image.
Monogame, or XNA really, is reporting the wrong screen resolution on my Surface Pro 3.
Using GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width and Height returns dimensions of 800 x 600, which is incorrect. So, I cannot set up my game size correctly.
I've been using this code without problem on an Acer V5 and can set the game resolution to a size I expect. This is because the GraphicsAdapter reports the correct screen size.
Whether using it as is, or docking the tablet with an external monitor, returns exactly the same resolution. What error is causing this?
This used to be a bug in Monogame, and was fixed.
If you are not building from the latest source code, it is possible that you still have the bug in your monogame dll.
See:
https://github.com/danzel/MonoGame/commit/0c36642129d89a12b30bcfc7d13256739d5483af
How can I fill a bitmap in Android with a specific background, with only a percentage of it being covered, like below?
There would be a icon in the middle as well so the fill would have to be behind what is drawn. I tried using a gradient, but it wasn't fruitful.
Edit: Another image:
Assuming the Processing 67% is a textview and the green is the background that fills 67% of that Textview, how would you accomplish this in Android?
You can try using Arc here is the reference Arc Android Developers
and here is a great tutorial that might be of help to you: How to draw semicircle on Android Canvas.
other than that, would require a bit more of your code to help you out.
I'm trying to draw text using CDC::ExtTextOut() to a device context (CDC), but I'm getting garbage outputs. The output text was drawn is weird fonts.
The CDC pointer that got passed to me was originated from a unicode build ActiveX control (.ocx).
The text drawing code resides in an ANSI build DLL.
It seems like there're some kind of incompatibilities in this setup.
Has anyone run into this situation and how did you solve it?
Thanks.
Have you tried setting a font on the CDC?
CFont *oldvalue = dc->SelectObject(GetStockObject(OEM_FIXED_FONT));
dc->ExtTextOut(....);
dc->SelectObject(oldvalue);