| bio | website | |
|---|---|---|
| location | ||
| age | ||
| visits | member for | 11 months |
| seen | Jan 28 at 12:11 | |
| stats | profile views | 3 |
|
Sep 15 |
awarded | Popular Question |
|
Jun 28 |
comment |
GLSL Shader Texture Performance @mh01 Edits above. The timer is not very precise, which works for my application, and my scene is updated every 31 ms. Drawing anywhere from one 2D square to my entire scene achieves the same update interval. With the textures, most updates occur at the 31 ms. However, some, I'd estimate 25-30%, update at 62 ms. Rarely does it exceed 62 ms. I have experimented (before textures) with calling "updateGL()" in my key press handlers and resizeGL() functions instead. However, this seemed to perform worse than the timer. While the updates still came at 31 ms, the scene appeared more choppy. |
|
Jun 28 |
revised |
GLSL Shader Texture Performance added 485 characters in body |
|
Jun 28 |
revised |
GLSL Shader Texture Performance deleted 2 characters in body |
|
Jun 28 |
comment |
GLSL Shader Texture Performance @dreta I looked at my code and realized that in my hurry to post I had mistyped the shader. I updated it to the correct code. It should be correct now, as my light behaves as expected. |
|
Jun 28 |
comment |
GLSL Shader Texture Performance @zacharmarz I updated my question to include my texture loading. My textures are 1x1, 256x256, and 256x256. They are all .png files. All of the textures appear to work correctly and will display on any of my objects drawn. It is the fact that when using them my CPU loads to 100% and program lags that confuses me. |
|
Jun 28 |
comment |
GLSL Shader Texture Performance @mh01 I tried using an intermediate value, as well as consolidating it into one line. The intermediate value dropped CPU usage to 90%+ while the single line had no effect. There is a measureable performance hit. My updates are driven by a timer, and with the 100% loaded CPU it often is unable to update every timer tick. It is not a software OpenGL implementation. I am similarly confused as I thought it should be running on the GPU (and it seemed to be until adding the texturing). |
|
Jun 28 |
awarded | Editor |
|
Jun 28 |
revised |
GLSL Shader Texture Performance Fixed shader typo. Also added texture loading information. |
|
Jun 27 |
asked | GLSL Shader Texture Performance |