Jump to content

UI Imports for CGame?


Exmirai

Recommended Posts

Posted

Could you guys make ui imports available to cgame? things like LAN_GetServerInfo() LAN_GetPing() etc...would be great, because we could assimilate ui module and cgame module without breaking compatibility :ph34r:

Posted

Rather than approaching it from the "make cgame and UI more similar", this suggestion/request is really about exposing more engine functionality to each module, which I think is a good idea.

eezstreet and Exmirai like this
Posted

As long as you include the new imports at the end of the structure, it might not break compatibility with base.

However, I think that some CGame imports have no business being in UI (trap->R_RegisterShader, for instance. You should only be using trap->R_RegisterShaderNoMip in UI)

Posted

What if you're registering shaders ahead of time, or for player models.

 

The only issue you would have adding new traps is that they would not function when running without ojk engine since not hooked up to any syscall.

 

But I still see little use adding the server browser features to CGame.  The purpose of cgame is control over currently connected server.  The UI is handled separately regardless if the CGame shares the rendering portions of the ui, its still not the same !  Even the HUD drawing isn't really using the UI code, it just asks the menu files for the location of specific objects and renders by hand.

Posted

What if you're registering shaders ahead of time, or for player models.

 

The only issue you would have adding new traps is that they would not function when running without ojk engine since not hooked up to any syscall.

 

But I still see little use adding the server browser features to CGame.  The purpose of cgame is control over currently connected server.  The UI is handled separately regardless if the CGame shares the rendering portions of the ui, its still not the same !  Even the HUD drawing isn't really using the UI code, it just asks the menu files for the location of specific objects and renders by hand.

Why would you register shaders prior to cgame loading?

Posted

Why would you register shaders prior to cgame loading?

Model preview for character customisation. Why would you have to enforce no picmip then?
Posted

Model preview for character customisation. Why would you have to enforce no picmip then?

Shaders get registered when you init a Ghoul instance, or do any kind of precaching.

Posted

Yes, which is why it would be registered prior to CGame loading.

You are misreading what I am saying.

If you can precache the model so it can be viewed, the shaders for it also get precached internally in the same call. There is no need to register that model's shaders in a separate interrupt.

Although now that I think about it, a point can be made that one could use a shader remap/override on the display object, which would require a shader to be registered. So the import makes sense now that I think about it.

Posted

The nomip call is only required for registering images or shaders which do not already have the flag on it of course.  If the shader already has that option set, it will still be nomip etc.

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
×
×
  • Create New...