Jump to content

isidisi

Members
  • Posts

    94
  • Joined

  • Last visited

Everything posted by isidisi

  1. Thank you very much, cassius.
  2. I bought a Leadwerks 2 license two years ago. I received an email with a registration key and a download link http://developer.leadwerks.com that doesn't work. The problem is that I need to download Leadwerks 2 SDK in order to recompile an old project. Please could anybody tell me where can I download the latest Leadwerks 2 SDK?
  3. Yes I know this, but is not a clean solution. It will be better to add a parameter to LoadMesh function in a future version. Same with materials...
  4. I need to change materials of meshes dynamically(using PaintSurface) and I find the following problem: If I load the same .gmf using LoadMesh 2 times, LoadMesh returns the same reference. Thus when change a material in first object with PaintSurface, also changes in the second. Is there any way to load gmfs more than once and get diferent instances, to change the materials independently? Thanks
  5. Yes I think so, is run this code after normal stuff... And sure is not be subject of postprocessing efects, is after...
  6. Yes look at DrawTop new function(). Is a copy of the other for other layers. But it has ClearBuffer(BUFFER_DEPTH); line :-) And it would be nice to be possible to tweak the new Framework embedded in the engine... the one we have modified is de 2.28 version code and with time it will get older and without updates of the other...
  7. Look I modified framewerk, add some object (as axis) to new TopWorld and it will be rendered on top of all (with ambient light) hope it helps al little at least... Top.zip
  8. I have done some time ago but outside framewerk in a simpler way, hidding top objects and rendering others, clearing zbuffer, and then hiding normal objects and rendering top objects... but is the same idea, clear zbuffer and then all thing you render is on top. I checked my code, I used this to draw on top coordinate axis... I rendered main world, lights, then cleared zbuffer and draw axis... but the axis was drawn with only ambient light... that was ok for me... is ok for you too? I'm not sure how to add other kind of light to top objects, but for me was ok only ambient...
  9. I think render last doesn't mean render top. To render a world on top of another is necessary to clear zbuffer between renderworld calls. After rendering background world zbuffer is cleared, so main world and transparency world are always on top of background. But after rendering main world zbuffer is not cleared, so transparency (foreground) world is not rendered on top of main world, only is rendered later for good transparency drawing. I think the better is to create a 4th top world that renders after transparency world, and clear zbuffer before rendering it. This will be a topmain world. We can also create a 5th toptransparent world to render top transparent objects after top objects...
  10. Is there a foreground world in framewerk? I have 2.28 version of Leadwerks, in my version only background, main, and transparency worlds exists...
  11. I think you can do in a similar way as Framewerk does to draw main world over background world. Create a world with top entities. After draw normal entities, do a ClearBuffer(BUFFER_DEPTH); then set top world and render it. As tou have cleared depth buffer all thing are drawn on top. (See DrawBackground function of Renderer.cpp)
  12. I tried and not works, when I do RenderWorld() Leadwerks Engine changes projection matrix with the parameters of the world's camera... is there a way to avoid this? I tried adding some lines in Renderer.cpp: float test[16]; //To check changes in projection matrix. glMatrixMode(GL_PROJECTION); ::glLoadMatrixf(myProjectionMatrix); ::glGetFloatv(GL_PROJECTION_MATRIX, test); //Here test = myProjectionMatrix // Render the scene Wireframe( wiremode ); ::glGetFloatv(GL_PROJECTION_MATRIX, test); //Here test = myProjectionMatrix RenderWorld(); ::glGetFloatv(GL_PROJECTION_MATRIX, test); //Here test != myProjectionMatrix, RenderWorld changed projection matrix before rendering :-(
  13. Is posible to change the projection matrix of the camera to a custom matrix? I want to do a 4 x 4 grid, where each tile is a render in order to later join them and obtain a bigger image... then I have to displace and scale after projection matrix in the camera to render each tile. I tried with SetEntityMatrix but it seems not to set the projection matrix, only position and rotation of the camera... Any help?
  14. I have debugged with glslDevil and I found that the call that Leadwerks is doing when I set ShadowmapSizeto 512 is: glTexImage2D(GL_PROXY_TEXTURE_2D, 0, 33191, 1024, 1024, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_BYTE, NULL); if I set ShadowmapSizeto 1024 then I see in the debugger: glTexImage2D(GL_PROXY_TEXTURE_2D, 0, 33191, 2048, 2048, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_BYTE, NULL); so always is creating a texture 2 * ShadowmapSize Then we have to divide by 2 the max texture calculated in the routine I posted. resWidth /= 2; and replace the glTexImage2D call with glTexImage2D(GL_PROXY_TEXTURE_2D, 0, 33191, testWidth, testWidth, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_BYTE, NULL); Using 33191 and GL_DEPTH_COMPONENT as parameters, my max texture size is 8192, then my max shadomapsize is 4096. I tried this with a simple program with a rotating cube and it's ok, works with 4096 and not with 8192 :-) But if I load a big quantity of models the 4096 doesn't works anymore, I think as you say because then there's not enough memory to allocate both models and texture... but at least there's a way to detect max shadowmap size because of max texture size... Thanks lumooja
  15. yes glTexImage2D is the funcion I said to use, but what format is using Leadwerks to pass the right parameters to the function? I tried with this code: GLint testWidth = 256; GLint resWidth; while( true ) { glTexImage2D(GL_PROXY_TEXTURE_2D, 0, GL_RGBA8, testWidth, testWidth, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL); glGetTexLevelParameteriv(GL_PROXY_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, &resWidth); if (resWidth == 0 ) { resWidth = testWidth / 2; break; } else { testWidth *=2; } } and I obtained than my maximum texture size is 16384 but Leadwerks engine hungs when I select a shadowmapsize of 4096 or higher... I think is because I didn't pass the right parameters...
  16. Maybe I can use glTexImage2D(GL_PROXY_TEXTURE_2D... OPENGL function, but I doesn't know the format of the shadow texture... Any help????
  17. Thanks a lot Lumooja, it worked in my 2.28 library :-)
  18. Is posible to disable shadows of an individual light? But not globally (with SetShadowQuality I can disable shadows globally but not in an individual light). I want to have lights that produce shadows, but want also some lights to add illumination without produce shadows. Is this posible? Thanks
  19. Can I use HDR cubemaps in Leadwerks for cubemap reflection?
  20. Hello: I'm starting doing my own shaders, and after reading some book, I see something different in Leadwerks shaders. Usually (in book) gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; but in Leadwerks mesh.vert shader: gl_Position = gl_ModelViewProjectionMatrix * mat * gl_Vertex; Also normals are transformed with nmat matrix... Why is necesary multiply positions by mat and normals by nmat? Thanks
  21. I tried and works ok, but trying to understand the code, what mat and nmat matrix are in vertex shader?
  22. Ok I'll do this thanks a lot
  23. I have done a custom shader and it would be nice if I could set shader parameters in material files, and later obtain them from TMaterial object... Is there a way to do this? Thanks
  24. I updated the drivers, the train demo runs at 4 FPS :-(, but I see strange shadow artifacts that appear randomly ... I did a simple program with a light and 2 simple models and also see extrange shadows.... and all works really slow
×
×
  • Create New...