Search found 25 matches
- Mon Jan 25, 2010 11:47 pm
- Forum: Advanced Help
- Topic: Obtaining VBO and IBO from mesh buffer for OpenGL usage
- Replies: 0
- Views: 589
Obtaining VBO and IBO from mesh buffer for OpenGL usage
OK, I'm trying to figure out how to do hardware instancing. It was almost impossible to find any usable code for OpenGL on the net, but I've eventually managed to find something. In order to do that, whatever I draw, I need to draw with glDrawElementsInstanced with appropriate VBOs and IBOs set. Now...
- Sat Jan 23, 2010 7:03 pm
- Forum: Open Discussion and Dev Announcements
- Topic: Irrlicht 1.7 BETA Phase
- Replies: 34
- Views: 8939
- Mon Nov 30, 2009 3:12 pm
- Forum: Beginners Help
- Topic: Reading/writing z-Buffer
- Replies: 20
- Views: 1405
- Mon Nov 30, 2009 2:07 pm
- Forum: Beginners Help
- Topic: Reading/writing z-Buffer
- Replies: 20
- Views: 1405
- Sun Nov 29, 2009 2:12 pm
- Forum: Beginners Help
- Topic: Reading/writing z-Buffer
- Replies: 20
- Views: 1405
You're doing quite a lot inside the beginScene/endScene part, it's usually better to do things outside the render part I know, but this is just showcasing weird behavior of near/far clipping planes. thout conversion, which won't help much. Simply because teh colors are interpreted as 8bit per color...
- Sun Nov 29, 2009 10:17 am
- Forum: Beginners Help
- Topic: Reading/writing z-Buffer
- Replies: 20
- Views: 1405
It should be pretty short. Well, it's abit longer but here it is #include <irrlicht.h> #ifdef _IRR_WINDOWS_ #include <windows.h> #endif #include <gl/GL.h> #include <gl/GLU.h> #include <fstream> using namespace irr; using namespace core; using namespace scene; using namespace video; using namespace ...
- Sat Nov 28, 2009 5:26 pm
- Forum: Beginners Help
- Topic: Reading/writing z-Buffer
- Replies: 20
- Views: 1405
Are you sure you're using all the precision that the texture has to offer? If you are using only 8-bit precision then you will obviously encounter problems like this. Search for some functions that pack a floating point value in 4 8-bit integer values for shaders, then do the reverse conversion whe...
- Sat Nov 28, 2009 4:38 pm
- Forum: Beginners Help
- Topic: Reading/writing z-Buffer
- Replies: 20
- Views: 1405
Here you go. Test scene contains three planes perpendicular to y axis. One is at y=0, another at y=-5, and one at y=-10. Orthogonal camera is located on y-axis at y=20, looking at origin. Initial near and far values are 15 and 35 respectively. Use Q/W to decrease/increase near value and A/S for far ...
- Fri Nov 27, 2009 6:23 pm
- Forum: Beginners Help
- Topic: rand()
- Replies: 11
- Views: 609
- Fri Nov 27, 2009 5:21 pm
- Forum: Beginners Help
- Topic: rand()
- Replies: 11
- Views: 609
Are you using rand() from C runtime library or some other library?Seraph wrote:the problem is that the code is inside a do-while. if i write srand outside, it produce ever the same code, if i write srand inside the first value is ever the same, if i write srand inside and outside, the srand inside don't work.
- Fri Nov 27, 2009 12:09 pm
- Forum: Beginners Help
- Topic: rand()
- Replies: 11
- Views: 609
Re: rand()
Because the seed is the same at each call.Seraph wrote:why this function cout<<rand()%1000+300<<endl produce ever the same number?
Try calling for example
Code: Select all
srand(clock())
- Fri Nov 27, 2009 11:34 am
- Forum: Beginners Help
- Topic: Reading/writing z-Buffer
- Replies: 20
- Views: 1405
OK, I've just got some problems with positions of near and far clipping planes. I cannot make any sense of them. I know exact positions of geometry in my scene, I set near and far values for camera and get completely nonsensical behavior. For example, I have zNear and zFar for which all of the scene...
- Fri Nov 27, 2009 10:40 am
- Forum: Beginners Help
- Topic: Reading/writing z-Buffer
- Replies: 20
- Views: 1405
Couldn't you just setup a shader to render the distance from the camera as color, similar to the depth map used for shadow mapping? Once you can render the depths, it is just a matter of saving the resulting data as an image. Travis That's not bad idea although I'll need to do conversions I'd rathe...
- Thu Nov 26, 2009 1:31 pm
- Forum: Beginners Help
- Topic: Reading/writing z-Buffer
- Replies: 20
- Views: 1405
- Thu Nov 26, 2009 11:56 am
- Forum: Beginners Help
- Topic: Reading/writing z-Buffer
- Replies: 20
- Views: 1405