Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


how tp redraw just a part of the screen in OGL


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
4 replies to this topic

#1 Spencer   Members   -  Reputation: 126

Like
Likes
Like

Posted 12 August 2001 - 08:31 PM

Hi! I am having a little problem with my game..... I am implementing a mouse cursor, but it is very slow and the cursor makes big jumps on the screen probably due to the fact that i redraw the whole screen everytime i update the mousepointer. How do i do tis for REAL? How to redraw just a part of the screen with OGL when the depth test is turned on and stuff? Any other ideas for making a mousecursor? thancks alot in advance --Spencer

Sponsor:

#2 koom   Members   -  Reputation: 122

Like
Likes
Like

Posted 12 August 2001 - 10:14 PM

Make your game faster:-))) In OpenGL, you cant be sure what will be in your front burrer after SwapBuffers, look at halp or some specifications or such. You can do a little test to determine whether it stays on computer you are running on and then take the advantage of it, but it isnt nice solution.

regards
Jindrich Kolman

#3 koom   Members   -  Reputation: 122

Like
Likes
Like

Posted 12 August 2001 - 10:15 PM

Make your game faster:-))) In OpenGL, you cant be sure what will be in your front burrer after SwapBuffers, look at halp or some specifications or such. You can do a little test to determine whether it stays on computer you are running on and then take the advantage of it, but it isnt nice solution.

regards
Jindrich Kolman

#4 Pauly   Members   -  Reputation: 122

Like
Likes
Like

Posted 13 August 2001 - 09:14 AM

Sounds like you''re using a textured quad as a mouse pointer? Go back to using the standard OS one. It''ll save you the headache

If you''ve played QuakeIII at really high resolutions, you''ll notice that its textured mouse pointer does the same - it gets all jumpy. You can redraw parts of the screen at a time, try reading up on glScissor, but I don''t think that''d be applicable here...

Paul Groves
pauls opengl page

#5 ironfroggy   Members   -  Reputation: 122

Like
Likes
Like

Posted 14 August 2001 - 08:35 AM

Should have to keep updating anyway, it is a game isnt it? However, if you dont want to update anything but the cursor image, try this:

If you arent updating the screen, you can redraw it once into the back buffer (assuming double buffering here) so that the front and back buffers are identical. Now, blit the initial cursor to the front buffer. when you need to move the mouse but not redraw the scene, follow these steps which should be faster, unless its a small scene:

1) read the pixels from the back buffer where the cursor is on the front.
2) draw the new cursor to the back.
3) swap the buffers
4) draw the image you took from the back buffer in step 1 and draw it to the new back buffer to cover up the cursor.




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