Jump to content

Minimap and scene rendering..


Chiblue
 Share

Recommended Posts

I am building a minimap in my project, I have the code working but my problem is trying to isolate the scene drawing function, All I want to project within the map is the scene from the editor file, and none of the ingame entities like players or vehicles...

 

Can someone please tell me what engine function is used to build the basic scene and terrain for the camera render?

If it's not Tactical realism then you are just playing..

Link to comment
Share on other sites

You can choose which elements to render:

http://www.leadwerks.com/wiki/index.php?title=Worlds#RenderWorld

 

So when I set my stencil buffer to the active buffer, and then call renderworld... makes sense, thanks...

 

Probably a stupid question but, the entity_??? options are the entity types defined within the LUA script for constants?

If it's not Tactical realism then you are just playing..

Link to comment
Share on other sites

The RenderFramework() command is only used for the main rendering, you can use many mini-renders with your own RenderWorld() and RenderLights() commands (mirrors, dynamic cubemaps, maps, etc...).

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

I built this function that works within a seperate pure opengl code... but when I put it into my LE project it oes not work... and I believe that the issue is that I am not rendering to the stencil buffer, does anyone have any suggestions how I can do this?

 

glViewport(0,0,size.X, size.Y);

       glStencilFunc(GL_ALWAYS, 0x1, 0xff);	
glStencilOp(GL_KEEP, GL_KEEP, GL_INCR);

glColorMask(false, false, false, false);
glDepthMask(false);

drawCircle(0,0,size.X/2,30);

glColorMask(true, true, true, true);
glDepthMask(true);

glStencilFunc(GL_NOTEQUAL, 0x00, 0xff);
glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP);

RenderWorld(ENTITY_TERRAIN);
glStencilFunc(GL_EQUAL, 0x00, 0xff);
glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP);

If it's not Tactical realism then you are just playing..

Link to comment
Share on other sites

I was hoping for to be dynamic... incase I add other entities that I want in the map... Also for fire by wire missiles (a little off yet) I want to create a panel that shows the flight and allows some control over the missile path...

If it's not Tactical realism then you are just playing..

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...