2 EASY questions, please help !

Started by
1 comment, last by stryx 21 years, 10 months ago
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
Anything that requires finding convex hulls in realtime isstarting to sound like a bad idea. -- John Carmack
Advertisement
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.
Great Thanks,
Works now !
Texturing and Lightning, like you said were the problems
Thanks for information about the Texturesize.

Thanks,
StryX
Anything that requires finding convex hulls in realtime isstarting to sound like a bad idea. -- John Carmack

This topic is closed to new replies.

Advertisement