Skip to main content
GameDev.net gamedev.net
🔒 Locked

Scissor help

Started by relpats_eht Apr 26, 2004 at 3:36 PM 5 replies 500+ views
Original Post
relpats_eht
relpats_eht
hello ive put a scissor window into a game ive been working on, but ive found a problem, for some reason, its only showing the text, then stops showing everything elses, even though it is in the scissor window heres the code for an examle
glScissor(40,40,280,400);// Define the scissor region
glEnable(GL_SCISSOR_TEST);// Enable scissor testing

	glColor3f(0.2f,0.6f,0.2f);					// Set Color to Paleish Dark Green
	glPrint(110,400,0,1.25f,charvars[31].disp);			// Print the title

	glBindTexture(GL_TEXTURE_2D, textures[0].texID);		// Select The Button Texture
	glColor3f(0.2f,0.2f,0.9f);					// Set Color to Plae blue
	
	glBegin(GL_TRIANGLE_STRIP);					// Start the Quad for button 1
		glTexCoord2d(1,1); glVertex2d(90,400);			// Corner 1
		glTexCoord2d(0,1); glVertex2d(120,400);			// Corner 2
		glTexCoord2d(1,0); glVertex2d(90,430);			// Corner 3
		glTexCoord2d(0,0); glVertex2d(120,430);			// Corner 4
	glEnd();							// End the Quad

	glDisable(GL_SCISSOR_TEST);					// DIsable Scissor testing
 
this, for example, would only output the contents of charvars[31].disp, and not the quad... im not sure y it is doing this, as i have even tried makin the quad the size of the whole screen, and it still doesnt show up... any help would be nice... [edited by - relpats_eht on April 28, 2004 3:47:05 PM]
relpats_eht
relpats_eht
relpats_eht
someone has to know? lol

im just so annoyed by this problem, ive been trying to solve it for days now...
relpats_eht
Krohm
Krohm
quote:
Original post by relpats_eht
hello

ive put a scissor window into a game ive been working on, but ive found a problem, for some reason, its only showing the text, then stops showing everything elses, even though it is in the scissor window

Do you know what glPrint does exaclty? Maybe is xforming the coordinate system without restoring it (I find this rather difficult to happen however).

Previously "Krohm"
relpats_eht
relpats_eht
no, its a form of glPrint that is partly my own code, however, i do push and pop the matix in there (the third agrument is sent to the X and Y scale) so that shouldnt be a problem, and even if those weren''t working, all i would get is bigger buttons
relpats_eht
Goober King
Goober King
quote:
Original post by relpats_eht
no, its a form of glPrint that is partly my own code, however, i do push and pop the matix in there (the third agrument is sent to the X and Y scale) so that shouldnt be a problem, and even if those weren''t working, all i would get is bigger buttons


So what do you get when you take out the glPrint? Why do have to output text while using a scissor test? I don''t know what all you changed in the glPrint function from the lesson but the original would find where it is suposed to draw even if your draw point is way the the hell off the screen and then send you back there. The single biggest reason to not see something you want drawn is because you ARE drawing it. Just not where you thought you were.

If you dont get a visual with or without the print function I would double and triple check my draw point. If everything is OK if the print function is removed then something is up with it.
------------------------------------------------------------- neglected projects Lore and The KeepersRandom artwork
relpats_eht
relpats_eht
no, like ive think ive already said (though im sorry if i didnt)
i already dired translating to the corner of the screen, then drawing a quad the size of the whole screen, and still got nothing...
relpats_eht
relpats_eht
relpats_eht
fixed my problem, it was in glPrint, it was double loading the Ortho screen and reenableing depth test when it was done, so i deleted more code out of it, and now it works lol
relpats_eht

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.