Jump to content

Surfaces


Exmirai

Recommended Posts

Since OpenJK have modular renderer i think i can suggest following: what about creating class "Surface" which will replace/extend regular 2d draw system. We can draw text, rectangles, images, paint them ( may be even postprocess ( hello rend2 :> ) )

In ui/cgame that can look like:

Surface sufrace(640, 480);
surface.paint( Color.Red );
surface.drawrectangle( 100, 100, 10, 10, Color.Green) 
surface.drawtext( 200, 200, "Hello World")
surface.transform() -- whatever transformation

surface.render() -- queue
OR
trap->RenderSurface(surface) 

would be good :>

 

Link to comment

JKG is sorta in C++ just FYI.

 

I think a new way of drawing ui elements might be nice, but I'm not sure it'd necessarily belong in openjk...maybe it'd be best to have it as a openjk add-on or something instead.

JKG Developer

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