Questions tagged [rendertarget]
83 questions
0
votes
0 answers
CHwndRenderTarget is wrong size
This bug is driving me nuts.
I have an MFC application with a window in which I can draw and interact. The problem is that the size of the CHwndRenderTarget does not match the actual size of the window (I compare this using the CRect gotten from…

Dominic Clarke
- 1
- 1
0
votes
2 answers
XNA 4.0 Spritbatch - render target must not be set on the device
i am converting a XNA 3.0 cloud effect into XNA 4.0 but i get an error
"The render target must not be set on the device when it is used as a texture."
It happens in the second loop in this…
0
votes
1 answer
Unable to create a DX11 render target view
I'm trying to get started with DirectX 11 game programming, but for some reason I'm simply unable to create a render target view with ID3D11Device::CreateRenderTargetView().
(BTW, I use VS for Desktop 2013, and the highest feature level my GPU…
0
votes
1 answer
Three.js Updating DataTextures with a renderTarget's image data
I am working on a motion detection program in Three.js which uses the difference between the current and previous frame. For now, before the subtraction, the current and the previous frame are both blurred using a Three.EffectComposer each.
The…

Mysfarfar
- 3
- 4
0
votes
1 answer
CreateBitmapFromWicBitmap access violation
Here's my problem:
I'm working on a test project, that initializes Direct2D to draw some stuff.
For now, I am in need of creating BMP background so I looked some tutorials of loading bmp to use it with Direct2D on MSDN site. After some coding and…
0
votes
1 answer
XNA 4.0.4 use Z-buffer in rendertarget
I try to draw my 3d world in a rendertarget2d.
If I use the default rendertarget, the world looks perfect... but if i render to a rendertarget2d the z buffer does not work and object in the background will be drawed in front of others.
is…

Thomas
- 2,093
- 3
- 21
- 40
0
votes
1 answer
Custom Made inputTextBox is flickering
I'm having difficulties creating an inputbox with XNA 4.0.
I can already draw and input text into the inputTextbox, but when I type I have two problems occuring.
When I hold down a key I'd suppose it will write that character a lot of times, yet it…

Baklap4
- 3,914
- 2
- 29
- 56
0
votes
2 answers
Why do I get a "Too Large or Too Small" error when calling Texture2D.GetData?
I need to quickly save an image, and I am using Texture2D.GetData and SetData because simply saving and loading the image is way too slow. The image is 1024x1024.
RenderTarget2D Image = ChunkContainer.GetImg(x, y);
byte[] imageBuffer = new byte[1024…

ben
- 133
- 13
0
votes
1 answer
change the color of images using renderTarget
I try to draw an image on the screen with render target.
I used this code:
_renderTarget = new RenderTarget2D(
this._graphicsDevice,
this._graphicsDevice.PresentationParameters.BackBufferWidth,
…

hmimo
- 21
- 1
- 4
0
votes
1 answer
XNA Second Graphics Device for RenderToTarget
I'm creating an XNA game that creates random islands from multiple sprites. It creates them in a separate thread, then compiles them to a single texture using RenderTarget2D.
To create my RenderTarget2D I need a graphics device. If I use the…

Troutmonkey
- 21
- 4
0
votes
0 answers
RenderTargetView <-> Texture
I found this tutorial, i follow it and i create the class DirectX
class DirectX
{
private:
D3D_DRIVER_TYPE DriverType;
D3D_FEATURE_LEVEL FeatureLevel;
public:
int InitDirectX(HWND &hwnd, WinDesc &wd)
{
HRESULT result;
RECT dimensions;
…

Liuka
- 289
- 2
- 10
0
votes
2 answers
Multiple RenderTargets in different drawableComponents XNA
Hi guys i have a little problem.
I have this 2 DrawableGameComponets (bigApple, smallApple) in both I'm drawing into a RenderTarget and then draw the RenderTarget in the backbuffer but this happens independently in each DrawableGameComponent.
The…

Alan Revolver
- 15
- 1
- 5
0
votes
1 answer
How many render targets should I use?
I need to do a lot of rotations, and instead of doing extra calculations, I could draw the image as if it was at zero degrees, and then rotate it to what ever degrees I want.
Problem is, I might end up doing this +200 times per second. Should I even…

Dave
- 591
- 1
- 8
- 21
0
votes
1 answer
Using a RenderTarget2D causes blurring
If I do just this, I receive a model drawn normally:
GraphicsDevice.Clear(Color.Black);
GraphicsDevice.BlendState = BlendState.Opaque;
GraphicsDevice.DepthStencilState = DepthStencilState.Default;
DrawModel(model, modelMatrix, transforms);
However,…

Fibericon
- 5,684
- 12
- 37
- 64
0
votes
0 answers
Rendering a line into a 1x1 RenderTarget2D does not change the target's pixel color
What I am trying to achieve is the following: my pass will return a huge array with several unique numbers repeating over and over, which I need to retrieve and process on CPU.
I tried rendering into a 2000x1 texture and then sampled it on the CPU…

cubrman
- 884
- 1
- 9
- 22