Re: [osg-users] Passing multiple textures in glsl

2011-06-11 Thread Linda Lee
Hi, I tried add these lines into my code: osg::Texture2DArray* tileImgLay; tileImgLay = new osg::Texture2DArray; tileImgLay-setTextureSize(128, 128, 2); tileImgLay-setUseHardwareMipMapGeneration(false); tileImgLay-setImage(0,

Re: [osg-users] Passing multiple textures in glsl

2011-06-11 Thread Stephan Huber
Hi, Am 11.06.11 10:47, schrieb Linda Lee: and in the fragment shader: uniform sampler2DArray test; and access it using: gl_FragColor = texture2DArray(test, vec3(0, 0, 0)); Do you get any compile-error for your shader? I had to add these lines to get texure2DArrays

Re: [osg-users] Passing multiple textures in glsl

2011-06-11 Thread Linda Lee
Hi, I did not get any compiler error. The application runs successfully. However, the texture did not seem to be loaded into the shader code. The image rendered as black in color. As the lines, Where should I add them? #version 120 #extension GL_EXT_gpu_shader4 : enable #extension

Re: [osg-users] Passing multiple textures in glsl

2011-06-11 Thread Philip Taylor
Linda, Any chance of a typo?? Looks like you intended the second image file to be the same as the first - test1.bmp - except that the first letter is missing. PhilT -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org]

Re: [osg-users] Passing multiple textures in glsl

2011-06-11 Thread Linda Lee
Hi, Nope. The typo is caused when I cut and paste into the posting textbox. I am quite sure the textures were loaded correctly. Any idea what is causing the problem? :( Thank you! Cheers, Linda -- Read this topic online here:

Re: [osg-users] Passing multiple textures in glsl

2011-06-11 Thread Linda Lee
Hi, Forgot to mention to I have this msg when I run the application. Warning: detected OpenGL error 'invalid enumerant' after RenderBin::draw(,) Thank you! Cheers, Linda -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=40375#40375

Re: [osg-users] Passing multiple textures in glsl

2011-06-11 Thread Wojciech Lewandowski
Hi Linda, Your code looks correct to me. Your shader does the texture lookup at 0,0,0 coord is there a chance that your test1.bmp picture is black in the corner ? Or its res differs than 128x128 so loading them does not work or leaves some empty space ?. You may try to run the example code

Re: [osg-users] Passing multiple textures in glsl

2011-06-11 Thread Chris 'Xenon' Hanson
On 6/10/2011 11:04 PM, Linda Lee wrote: Hi, I need to handle multiple textures in glsl. Any suggestions how do I do it? Should I use sampler2DArray? How do I use it? Any links I could take reference from? Don't use 2DArray unless the textures really are related. Just use multiple

Re: [osg-users] Passing multiple textures in glsl

2011-06-11 Thread Paul Martz
On 6/11/2011 8:14 AM, Chris 'Xenon' Hanson wrote: Also, is there a limit to the amount of textures I could load into GPU. I tried loading 25 4096by4096 textures and it crashes when I tried to load more. Is there any ways to increase the amount that I could load? It's just limited by

Re: [osg-users] [build] LNK1181 fatal error ONLY for libpng.lib

2011-06-11 Thread Mohamed Alji
Hi, Since I have been mislead between the 32-bit and 64-bit... assuming it is the same case for a lot of people, I've translated the article, which I found interesting, Enabling 64-bit Support in Visual Studio 2008

Re: [osg-users] OSG 2.8.4 - CMake with GDAL (VS9-32bit)

2011-06-11 Thread Torben Dannhauer
Hi, the OSG 3rd Party Package for VS9 provides CURL and GDAL. So download that package, point your folders to the correct subfolder (x86/lib|include or x64/lib|include) and it should work. Thank you! Cheers, Torben -- Read this topic online here:

Re: [osg-users] OSG based aplication nominated in CG Architect Awards

2011-06-11 Thread Alessandro Terenzi
Thanks Alberto for spending time to answer my questions, your answers and your work are really inspiring. Looking forward to seeing other works like that. Alessandro On Fri, Jun 10, 2011 at 7:59 PM, Alberto Jaspe aja...@gmail.com wrote: Hi, Thanks Alsessandro and Ulrich for your feedback :)

Re: [osg-users] [build] How to compile OSG examples with OSX 10.5 / XCode 3.0 binaries?

2011-06-11 Thread Mohamed Alji
Hi raw, I downloaded the OpenSceneGraph-2.9.X and using CMake I generated the .xcodeproject. I compiled the Build_All and then Install. Everything seem to work fine. I am using OSX 5 Leopard with XCode 3. can you give more details please ? Mohamed ALJI