Skip to content
This repository has been archived by the owner on Apr 17, 2022. It is now read-only.

Component drawing revisited #2310

Closed
wzdev-ci opened this issue Nov 13, 2010 · 16 comments
Closed

Component drawing revisited #2310

wzdev-ci opened this issue Nov 13, 2010 · 16 comments

Comments

@wzdev-ci
Copy link
Contributor

keyword_shaders_components_drawing_opengl resolution_closed type_patch (an actual patch, not a request for one) | by Per


This is the beginning of a rewrite of how component drawing is done, using shaders. It collides unfortunately with SafetyOff's VA branch, since I did not know about it when I started this work. This is an in-progress work put here for comments and discussion of interfaces and approaches.


Issue migrated from trac:2310 at 2022-04-16 06:46:34 -0700

@wzdev-ci
Copy link
Contributor Author

Per uploaded file newrender1.diff (25.4 KiB)

First version. Speeds up drawing by only figuring out the animation frames once. Uses a shader to flatten defensive buildings. Speeds up shader binding. Removes support for OpenGL < 2.0.

@wzdev-ci
Copy link
Contributor Author

Cyp commented


OpenGL vendor string: Advanced Micro Devices, Inc.
OpenGL renderer string: Mesa DRI R600 (RV710 954F) 20090101  TCL DRI2
OpenGL version string: 2.1 Mesa 7.9
OpenGL shading language version string: 1.20
error   |06:12:04: [loadShaders] Vertex shader compilation has failed [shaders/tcmask.vert]
error   |06:12:04: [printShaderInfoLog] Shader info log: 0:19(22): error: Could not implicitly convert operands to relational operator
0:19(22): error: if-statement condition must be scalar boolean
0:21(26): error: Could not implicitly convert operands to arithmetic operator
0:21(26): error: type mismatch
0:24(16): error: if-statement condition must be scalar boolean
warzone2100: ../../../lib/ivis_opengl/piestate.c:226: pie_LoadShaders: Assertion `0' failed.

@wzdev-ci
Copy link
Contributor Author

Per uploaded file shader1.diff (12.6 KiB)

Smaller version of above, that only lays the groundwork by removing non-shader support and improving the shader framework.

@wzdev-ci
Copy link
Contributor Author

dak180 commented


Please keep in mind Mac OpenGL Support; we can likely get away with not worrying about cards that do not support at least OpenGL Version 2.0 though.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Dec 4, 2010

Per Inge Mathisen commented


Lay the groundwork for a more modern component drawing system. Removes support for OpenGL 1.x. See #2310
Changeset: 7de25a9d5b0f67088d78483c9928716f3af95d62

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Dec 4, 2010

Per uploaded file shader2.diff (14.7 KiB)

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Dec 5, 2010

Per uploaded file shader2b.diff (16.1 KiB)

Cache texture coordinate calculation on game start instead of doing them each frame. Do defensive structure stretching in the vertex shader.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Dec 5, 2010

Per Inge Mathisen commented


Cache texture coordinate calculation on game start instead of doing them each frame. Do defensive structure stretching in the vertex shader. See #2310
Changeset: 4f85821bab6332f2d034fa4169ecbc1c9410f2d5

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Dec 5, 2010

icenine457@... uploaded file warzone2100.20101205.log (5.5 KiB)

Debug output while experiencing texture corruption

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Dec 5, 2010

icenine457@... uploaded file warzone2100.20101205_corruption.jpg (18.7 KiB)

Screenshot of the corruption I'm experiencing from this patch on
warzone2100.20101205_corruption.jpg

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Dec 6, 2010

Per commented


Sounds like a problem in your Intel (Mesa) driver.

@wzdev-ci
Copy link
Contributor Author

Per Inge Mathisen commented


Lay the groundwork for a more modern component drawing system. Removes support for OpenGL 1.x. See #2310
Changeset: 7de25a9d5b0f67088d78483c9928716f3af95d62

@wzdev-ci
Copy link
Contributor Author

Per Inge Mathisen commented


Cache texture coordinate calculation on game start instead of doing them each frame. Do defensive structure stretching in the vertex shader. See #2310
Changeset: 4f85821bab6332f2d034fa4169ecbc1c9410f2d5

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Apr 5, 2011

Safety0ff commented


Is this more or less a to-do now that the patches have been applied?

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Apr 5, 2011

Per changed status from new to closed

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Apr 5, 2011

Per changed resolution from `` to closed

@wzdev-ci wzdev-ci closed this as completed Apr 5, 2011
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant