Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


glVertex3f() issues?

This topic is 5658 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

If I put in actual float values insted of the float value thats is held in the array I get my triangle. If I use the code below I get nothing?

glColor3f(1.0f, 0.0f, 0.0f);
		glVertex3f(terrian[0], terrian[0], terrian[0]);
		glVertex3f(terrian[1], terrian[1], terrian[0]);
		glVertex3f(terrian[1], terrian[0], terrian[0]);		
I don''t get it? Thanks

Share this post

Link to post
Share on other sites
Have your program output what the values of terrian, either using some text output method you have or using a console window, but it seems that the data is probably being truncated or is not being written to for some reason. You need to place the ouput call immedietly before or after the glVertex3f call to find out for sure though.

Share this post

Link to post
Share on other sites
1. is the triangle in the view frustum?

2. maybe you wrote
float terrian[2] = {5, 2};

3. try glArrayElement

4. keeps your machine allocating memory all the time your program is running? if so you''ve forgotten glEndList();

5. do glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);

6. swap the buffers

it''s a bit of low information given by you o_O

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!