Jump to content

Functions to draw 3D GUI


harryh

Recommended Posts

So I have been thinking about drawing a 3D GUI. However, I am unsure what functions to use as there are only 3D functions there are:

DxDrawLine3D

DxDrawMaterialLine3D

DxDrawMaterialSectionLine3D

Would I have to draw lots of 3D lines one after the other to create a 3D rectangle and How would you get people clicking on the GUI etc.

Link to comment

You don't need a shader unless you want to draw the GUI on an element in the GTA world. If you just want it to float around then dxDrawMaterialLine3D is good enough. The material you would draw would be a render target created using dxCreateRenderTarget. Once you create the render target you can use that as a second screen (dxSetRenderTarget) to draw dx stuff on, after that's done you change it back to the actual screen using dxSetRenderTarget again. Do you understand or do you need an example? There are some examples on the wiki but I could write one as well if needed. The only thing is that I'm not sure how would the player interact with such GUI, I'm sure it's possible but it would require a lot of calculations and I don't think I would be able to do that.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...