• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
MARS_999

glPolygonMode slows down[solved]

23 posts in this topic

I have never looked into this, but just figured it was they way things are. When I render with GL_LINE my FPS drop to 1fps. Now when I was playing around with DX this never happened when rendering with lines vs. fill. What would cause such a drop? thanks [Edited by - MARS_999 on September 13, 2006 3:14:50 PM]
0

Share this post


Link to post
Share on other sites
When filled polyons are rendered, the graphics can use "Hierarchical Depth Buffer" and other Features to increase render speed. But when drawing lines, those components do not work.

But 1fps seems very low. When enabling this wireframe mode, I usually get 60-70% of the speed I had before on my X1800XT (don't know on Nvidia cards though).
0

Share this post


Link to post
Share on other sites
Quote:
Original post by Enrico
When filled polyons are rendered, the graphics can use "Hierarchical Depth Buffer" and other Features to increase render speed. But when drawing lines, those components do not work.

But 1fps seems very low. When enabling this wireframe mode, I usually get 60-70% of the speed I had before on my X1800XT (don't know on Nvidia cards though).


Correct, but DX does this and I probably seen what you see and this is on a 7800GT... Only differece is GL vs. DX.
0

Share this post


Link to post
Share on other sites
I think you mean to be using GL_LINES not GL_LINE. Unless you mistyped it here, that could be your issue. Try changing it and see if that solves the problem :)
0

Share this post


Link to post
Share on other sites
I have observed that in general, wireframe mode is implemented by creating pixel wide triangles along the edges of the actual triangles being rendered. If you're clever you can expose this tactic through some carefully constructed geometry. In any case, it shouldn't be surprising that doing this is much slower.
0

Share this post


Link to post
Share on other sites
Quote:
What would cause such a drop?


Do you have any unusual states enabled, such a smooth lines or wide lines?

Quote:
Original post by Morpheus011
I think you mean to be using GL_LINES not GL_LINE. Unless you mistyped it here, that could be your issue. Try changing it and see if that solves the problem :)


GL_LINE is the correct constant for use with glPolygonMode.
0

Share this post


Link to post
Share on other sites
Quote:
Original post by bakery2k1
Quote:
What would cause such a drop?


Do you have any unusual states enabled, such a smooth lines or wide lines?

Quote:
Original post by Morpheus011
I think you mean to be using GL_LINES not GL_LINE. Unless you mistyped it here, that could be your issue. Try changing it and see if that solves the problem :)


GL_LINE is the correct constant for use with glPolygonMode.


Not that I know of. I do call a larger line at one point, but I never call it unless I hit a key and when in LINE mode the lines are default 1.0.
0

Share this post


Link to post
Share on other sites
Quote:
Original post by Ravuya
The line rendering mode is very slow; I suspect it's done in software.


In GL it's software? Because with DX it was maybe 60% slow down.
0

Share this post


Link to post
Share on other sites
Quote:
Original post by Ravuya
The line rendering mode is very slow; I suspect it's done in software.

But it shouldn't be. There must be something wrong with the states...

0

Share this post


Link to post
Share on other sites
render direct as GL_LINES - not with polygonmode. i think you will get the same performance like in DX.
0

Share this post


Link to post
Share on other sites
1 fps sounds like software
make sure u havent got something enabled that can cause that eg antialaising, eg LINE_SMOOTH or something enabled
0

Share this post


Link to post
Share on other sites
Are you specifying LINE mode for both front and back facing triangles? I can imagine scenarios where mixed polygon modes will slow down - but if you specify LINE for both faces, it should remain on the fast path.

If you have a standalone test app which demonstrates the problem, I can take a look. Source code is preferable but an executable will suffice.
0

Share this post


Link to post
Share on other sites
Quote:
Original post by gold
Are you specifying LINE mode for both front and back facing triangles? I can imagine scenarios where mixed polygon modes will slow down - but if you specify LINE for both faces, it should remain on the fast path.

Do you have a dedicated hardware path for line rendering on your non-quadro FX product line, or do you simulate lines with thin triangles ?

I remember playing around with wireframe rendering some time ago, and it was indeed pretty fast on NVidia chipsets (I think it was the 6800). But it was horribly slow an ATI X1600 card I tried (which was no surprise, to be honest).
0

Share this post


Link to post
Share on other sites
Both GeForce and Quadro have line rendering hardware, although the latter is much faster.
0

Share this post


Link to post
Share on other sites
No AA, but I am still rendering with GLSL but calling these functions


if(gRenderMode)
glPolygonMode(GL_FRONT, GL_FILL); //GL_FRONT_AND_BACK
else
glPolygonMode(GL_FRONT, GL_LINE);




and these are the hints I have set


glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
glHint(GL_POLYGON_SMOOTH_HINT, GL_NICEST);
glHint(GL_TEXTURE_COMPRESSION_HINT, GL_FASTEST);



Other than that nothing comes to mind what would cause this...

0

Share this post


Link to post
Share on other sites
as has been mentioned glPolygonMode(GL_FRONT, GL_LINE); + glPolygonMode(GL_BACK, GL_FILL); might be slow so use GL_FRONT_AND_BACK
0

Share this post


Link to post
Share on other sites
Quote:
Original post by zedzeek
as has been mentioned glPolygonMode(GL_FRONT, GL_LINE); + glPolygonMode(GL_BACK, GL_FILL); might be slow so use GL_FRONT_AND_BACK


I already did and nothing changes still 1 fps...
0

Share this post


Link to post
Share on other sites
Quote:
Original post by Ravuya
The line rendering mode is very slow; I suspect it's done in software.


I also noticed that, I was using glPolygoneMode for cell-shading, which was very slow. It's much faster using lines instead.

Could it have something to do with requirements about rendering polygon edges? If you think about it, when rendering thick edges, the expected outputs would differ in the two methods.
0

Share this post


Link to post
Share on other sites
Line thickness is not the issue, at least on NVIDIA hardware. I'll be happy to solve this mystery as soon as MARS_999 provides a reproducer. :)
0

Share this post


Link to post
Share on other sites
Solution has been found and reason why, thanks to Gold.

Reason is
It’s an interaction between user clip planes and polygon mode.


Solutions are

You have a few options to work around this.
1) Use a vertex program instead of fixed function. You’ll have to implement your own user clipping, as that is part of fixed function. We don’t fall back in this case.

2) Use lines instead of triangles in line mode

3) Disable user clipping in wireframe mode

0

Share this post


Link to post
Share on other sites

Hello Mars, excuse me to bring this thread from the grave but I'm having a major performance drop while rendering in GL_Line mode. I try to find information on how to disable the user clipping and I couldn't find anything so far... so my question is, how do you disable the user clipping?

0

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0