Jump to content
  • Advertisement


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


2 EASY questions, please help !

This topic is 6019 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

Hi, I''ve got 1 easy to solve problem (I think) in my engine. When I use GL_LINES or GL_POINTS as draw mode the lines and the points all are darkgreen. Color is (1.0f,1.0f,1.0f) wich is actually white. Does anyone know what the reason is ? 2nd question: Does the Framerate depend of TextureSize ? (64x64) faster than (256x256) ? @NeHe: If I''ve got my Engine ready, I''d love to write 1/2/.. tutorials about anything that comes in mind and/or release some of the engine code. Don''t give up StryX

Share this post

Link to post
Share on other sites
1st answer:

The most frequent problem for that effect is texturing. You should disable texturing before drawing lines and points (and probably enable texturing again after points and lines).
The second most frequent problem is lighting. You should disable lighting before drawing lines and points and enable it again after, just like texturing.

There are other problems that may cause that, but first you should try texturing and lighting.

Just a question: when you write "When I use GL_LINES or GL_POINTS", do you mean that you''re using glPolygonMode and that it works correctly with GL_FILL ?

2nd answer

Without hesitation, yes it is faster.

Also, this is relative to your texture size and your graphics card.
That is, 32x32 texture is *almost* as fast/slow as 64x64 on any card. And you won''t notice much of a difference between 8x8 and 256x256 on something like GeForce3+.

Also for your information, in some very particular cases -- known as cache issues -- you can speed up your application by choosing bigger textures.
But I''m not even sure that great masters like JC use that incredible optimization.

Share this post

Link to post
Share on other sites
Great Thanks,
Works now !
Texturing and Lightning, like you said were the problems
Thanks for information about the Texturesize.


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!