texture

CUDA float to long long conversion and texture read giving incorrect result.

I would ask this in the CUDA forums but for some reason I can't get past the first page the registration, so here goes: nVidia Card: 9800 GT CUDA toolkit 3.0 Compiled for: compute capability 1.1 Scenario 1: float result = 0; float f1 = tex2D( tex, u, v ); float f2 = tex2D( tex, u + 1; v + 1 ); long long ll1 = __float2ll_rn...

Texturing a square in OpenGL ES on Android

Alright, so I've got this OpenGL tutorial I'm basing from, my current code is equivalent to Part II of it, which is here: http://blog.jayway.com/2009/12/04/opengl-es-tutorial-for-android-%E2%80%93-part-ii-building-a-polygon/ The code for that can be downloaded near the bottom of the page. It leaves you with a white square, and I want t...

Can't call glGenTextures on multithreaded android app

I'm making an OpenGLES Android app using Android NDK, expanding from android's gljni example, which can be found here It's using GLSurfaceView. Textures are initialized in a JNI function called from onSurfaceChanged() of GLSurfaceView.Renderer When the user touches screen, the app needs more textures. In order to do so, glGenTextures(...

SDL/OpenGL Texture Transparency

So I have a seemingly simple problem, and I've searched around, but none of the solutions I've found have worked (though I probably applied them incorrectly). I'm just wondering how I can convert an SDL_Surface (loaded from a png via IMG_Load) and stick it on a quad. Here is what I have (mostly just copy pasted from a tutorial I found). ...

Texture mapping to triangle strip from atlas Opengl ES

Hi! I'm new to opengl-es on android and struggling to get my head around the concept of texturing. I am looking to produce a tilemap of various difference textures. I understand that it is better to use an atlas of all the combined textures so I don't repeatedly rebind. However I am unsure quite how to then map these textures on to my ...

OpenGL - what does glDeleteTextures actually do?

Hi all, (Mac OS X, iOS apps) Q. What does glDeleteTextures actually do, on the above platforms? (The official documentation is... sparse, at best.) In terms of mem management, do the textures actually get removed from the video card? (Or at least their space set to reusable?) Cheers. ...

XNA to render 3D video (fixed FPS!)

Hi, i have to develop an application in wich the final step is to export a video (or a single frame) of a 3D animation generated by my software calculating the user input parameters. I want to use XNA and for this. i need that the software can export FIXED FPS video (or also all single frames of the video separately). It's not a matter...

android/opengles alpha textures not semitransparent but binary transparent

Hello, I am drawing some textures with alpha channel, but when they are displayed it looks like the alpha channel is only binary. So a pixel is either transparent or opaque, although in the texture file itself the pixel is half-transparent. The blending is set up like this: gl.glEnable(GL10.GL_BLEND); gl.glBlendFunc(GL10.GL_ONE, GL10....

Xna 4.0 3D Vertex example

Hello, I'm currently trying to make a simple square by combining two triangles, like in the tutorials by Riemer (Link to tutorial), but since a lot has changed from 3.x to 4.0, I find it difficult. I would also like to know how to texture this "square", so if anyone could help me by giving some example or whatsoever, I would appreciate ...

OpenGL DevIL c++ source code

After spending hours searching for a simple way to to add an image to an openGL application written in C++, i failed, miserably. It is also apparent that many others have too. I am fairly new to OpenGL, I have written my own win32 app with OpenGL using DevIL and you guessed it, i failed. The only way i could get DevIL to work was using ...

Coloring twice in OpenGl es

hello i m doing color picking for my project, i m working with iphone sdk and my project substantially(for color picking part) load 3d models with texture, the "loader" own an array of objects, those objects are presented with drawView and are updated with redrawView. When i click with mouse on the iphone simulator i just call the method...

image Texture Feature using Gabor filter

I have the following gabor filter to extract image texture feature.. a=imread('image0001.jpg'); a=double(a); a=a-mean(a(:)); [r,c,l]=size(a); K=5; S=6; Uh=0.4; Ul=0.05; alpha=(Uh/Ul)^(1/(S-1)); sigmau=(alpha-1)*Uh/((alpha+1)*sqrt(2*log(2))); sigmav=tan(pi/(2*K))*(Uh-2*log(2)*((sigmau^2)/Uh))/sqrt((2*log(2))-(((2*log(2))^2)...

OpenGL CubeMap rendering from desktop instead of environment

This is weird, and I can't find anything like it online. I am rendering a reflective sphere in OpenGL, and I'm trying to reposition the camera and use glCopytexImage2D to render directly to the Cube Map textures. Problem is, my reflective sphere ends up reflecting everything on my desktop EXCEPT the OpenGL environment! How does something...

Why are these UV mapping coordinates represented in 0-1 and pixels? Shouldn't they use only the 0-1 system?

Well, I've got many UV coordinates of a 3D model clearly in the range 0-1 and many coords in seemingly pixel values in the range 100-300. How do I know which one to interpret the coordinates as? Is there a standard or system for this? I notice that each 3d meshes in the exported file may use either system. Is this normal procedure, and...

My OpenGL Cubemap is using 6 copies of the same texture instead of 6 different textures

Hi all, I'm new to opengl and have been able to learn a lot on my own, but i am stuck on this one. I have a room rendered, but I need a sphere that hovers in the center reflecting everything else perfectly. So far, I've been able to cube map to it with pretty good results, but the 6 textures are all the same: namely, the view I have of...

OpenGL CubeMap Texture Dimensions

After struggling all weekend, I finally have a sphere reflecting its environment in OpenGL. It almost looks good. Problem is, certain features don't line up. I can't find much information on the topic of OpenGL sphere mapping, outside of a two page section in the Red Book and a few scattered, and mostly unfinished forum topics. Not sure ...

What common texture compression, if any, is available on the Android platform?

In simplest terms, I feel that these texture compression schemes should be available on all android devices, but I'm not sure about 2, and even then, I'm not so sure about 1. compressed paletted texture ETC1 (RGB 8 bit) I can't seem to find the docs on this at developer.android.com. :( If anyone just knows this info off the top of t...

How to read successfully from a 2D texture

So I posted on Nvidia's forums (with no luck) and either 1. they just want to talk about how awesome graphics cards are or 2. My question is dumb so they don't look at it. (They don't look at my question in either case). Here's my question: How can I: Bind cudaMallocPitch float memory to a 2D texture reference Copy some host data to ...

Android: adding a bitmap texture to a non rectangular item

I have a widget which looks like this: Every cone is a "touchable element". Now I want to put a bitmap texture above each cone. However, bitmap images are all rectangular, so a bitmap texture above one cone would interfere with the bitmap texture above another cone. I'm wondering what is the best solution to this approach. Should I j...

Drawing a smaller texture on a larger OpenGL texture on iPhone

I am very new to OpenGL and this is what my goal is... Load a texture from an image. Load another texture which is much smaller than the first one. Now keep drawing the smaller texture on the larger one on some chain of events, like painting on the larger texture. Can somebody point me to some material which might help do this? I lo...