Questions tagged [texture2d]

Texture2D is a class in used to handle textures. The class allows to edit existing texture assets or to create new textures on the fly.

Texture2D documentation

661 questions
0
votes
1 answer

How do I let the user draw (like MS Paint) a picture in the given space (50x50) and saving that picture as a texture2D? XNA

I was thinking of making a windows form with a 50x50 space somewhere on it (bitmap?) and having the user draw (like MS Paint) inside the square. When the user is done, the picture can be saved by clicking on the "save" button and it will be updated…
Emily
  • 1
  • 1
  • 2
0
votes
1 answer

Reload/Reset Texture2D in XNA Windowsphone

I'm manipulating a Texture2D with Texture2D.Setdata and change its color. But i want to reset the Texture2D after a Time again, currently im having the whole Texture Datas in Memory, but now i have OutOfMemoryExceptions in my App. I Tried…
Jonathan
  • 516
  • 5
  • 20
0
votes
2 answers

How to render grayscale texture without using fragment shaders? (OpenGL)

Is it possible to draw a RGB texture as grayscale without using fragment shaders, using only fixed pipeline openGL? Otherwise I'd have to create two versions of texture, one in color and one in black and white.
JBeurer
  • 1,707
  • 3
  • 19
  • 38
0
votes
1 answer

Drawing single quad texture openGL ES 2.0

I'm pretty new at ES 2.0, I'm trying to draw a single texture in openGL ES 2.0. Here is my code: data : a pointer to the texture (it is working, I already could test it with ES 1.0) w : texture width h : texture height texture is 256x256…
0
votes
1 answer

converting a Texture2d circle to Farseer circleBody

I may have asked a similar question before, but believe me, I have searched a lot on the web. I am very new to farseer and xna , and all I want to do is convert existing set of texture2d circles to farseer circleBody? Is there a way to do that…
mag443
  • 191
  • 1
  • 4
  • 12
0
votes
1 answer

Unload the texture2D that I want to Unload

I would like to Unload some Texture2D without Unloading everything. Should I create a ContentManager for each Texture2D that I'm supposed to Unload later ? These Texture2D don't have to be Unloaded at the same time) There's something I didn't…
Sharpnel
  • 173
  • 1
  • 14
0
votes
1 answer

Load texture resized in XNA

I'm developing for Windows Phone XNA and would like to load textures with a smaller size to decrease memory impact where the full image isn't required. My current solution is to use a rendertarget to draw and return that rendertarget as a smaller…
0
votes
1 answer

Large texture2d in XNA

I am trying to store and display a map for an RTS game as a texture2d, but the map is too big, and I get the error "XNA Framework HiDef profile supports a maximum Texture2D size of 4096". The reason I wanted the entire map in one texture was so I…
Max Kessler
  • 169
  • 4
  • 12
0
votes
1 answer

How to set image in Aspect fit on Texture2D in Unity3d

Hi I am new bee in Unity and I am working on an app in which i want to load my Images in Aspect fit ratio on Texture. I Know that i can achieve this using ScaleMode.ScaleToFit but i am not getting this property in Texture 2d. I am doing following…
josh
  • 1,681
  • 4
  • 28
  • 61
0
votes
1 answer

android openGL Es 2 showing no image

I am new to Android's OpenGL ES. I have spent 3 days in texture mapping but did not get any solution to my problem. Now I have written some code but it's only showing the background color but not the image that I want to show on the surface. Here is…
0
votes
0 answers

How to apply video processing on the GPU

I have a issue in programming for the graphics Card. I write a shader for Image processing (I use DirectX 11 in combination with SharpDX), but the Transfer from the CPU to the GPU is really slow (sometime about 0.5 seconds), but I think there should…
Simon Rühle
  • 229
  • 3
  • 12
0
votes
1 answer

XNA "Texture2D" amalgamation

How can I join together multiple Texture2D's into one large Texture2D? I am trying to optimize an isometric tile game by splitting the map up into chunks. I have tried googling it, and found articles regarding "RenderTarget2D", but am unsure how to…
Sam
  • 3,070
  • 3
  • 20
  • 26
0
votes
1 answer

raw jpeg data loading in webgl texture synchronously

Hi I hava jpeg compressed data stored in Uin8Array . I read about texture in Webgl . All Link what i saw initialize texture after loading image ( created by jpeg data , image.src = "some data" image.onload ( load texture ) ) . But this is…
user894554
  • 258
  • 5
  • 18
0
votes
1 answer

XNA Texture2D cropping bug

I am having an issue where my menu an menu items for a panel are being cropped, so the stuff doesn't go below the top of the panel. Everything works fine, you just can't see the stuff below that point. When I check where that panel is with this…
Halleflux
  • 35
  • 10
0
votes
2 answers

Texture 2d resizing necessary in XNA?

Imagine, I have a picture (Texture2D in XNA) scalled 256x256, but sometimes I want to use it with a size of 64x64 in the application. I learned on regular Windows Forms or WPF applications, when I have to resize an image, I should store it in a…
user1552075