Jump to content

when take screen for minimap


photo

Recommended Posts

Posted

when take screen for minimap.

 

I have one problem.

 

i can't view ObjectWaterMesh.

 

< Code In update loop >

 

vec3 vCameraPos;

mat4 matView = mat4_identity;

 

vCameraPos = vec3( 100.000 , 100.000 , 300.0 );

 

matView.m03 = -vCameraPos.x;

matView.m13 = -vCameraPos.y;

matView.m23 = -vCameraPos.z;

 

int fSize = 512;

 

Image image = new Image();

mat4 orthoProjection = ortho( -fSize , fSize , -fSize , fSize , 0.6f, 10000.0f );

 

engine.render.renderImage2D( orthoProjection, matView, image, int( fSize * 2 ), int( fSize * 2 ), "", 0);

 

string filename = format("minimap.dds" );

 

image.save(filename);

 

delete image;

 

How To?

 

i have testing on sample code ( water_01.cpp )

Posted

thank for reply.

 

what was the cause?

please explain fixed.

 

because my ungine engine have customized.

 

how to fix my ungined engine?

  • 3 weeks later...
Posted

Added decomposeProjection(projection,near_clip_plane,far_clip_plane) function used each time near and far planes are calculated.

×
×
  • Create New...