Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


2D-elements with GLUT?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Cone83   Members   -  Reputation: 122

Like
Likes
Like

Posted 25 October 2001 - 06:53 AM

Can I draw 2D elements like scores or energy with GLUT? If not, is using OpenGL with SDL a good choice (not DirectDraw! I want to programm for Linux)? Thanx Konstantin

Sponsor:

#2 Mayrel   Members   -  Reputation: 348

Like
Likes
Like

Posted 26 October 2001 - 01:08 AM

Some things can be drawn with gl. An energy bar with (say) ten states could be implemented as a quad and a texture that holds each of the states. When drawing the quad, use the part of the texture that holds the image for that state.

If you want to draw text, you''re better off using SDL (or some other 2D API, SDL is portable though, and that may make it your first choice, it''s also almost certainly faster than you could do it with Xlib or GDI, unless you are good are writing fast Xlib or GDI stuff (I know I''m not)).

Uuuuuulrika-ka-ka-ka-ka-ka

#3 Null and Void   Moderators   -  Reputation: 1087

Like
Likes
Like

Posted 26 October 2001 - 01:20 AM

Don''t use OpenGL when you''re using SDL''s video functions. SDL is a good way to do all the OS specific code combined with OpenGL for the graphics, just don''t use both for graphics at the same time. 2D stuff is pretty easy in OpenGL anyway. I''ve answered the how to do 2D in OpenGL question dozens of times.

[Resist Windows XP''s Invasive Production Activation Technology!]




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS