Commit graph

26 commits

Author SHA1 Message Date
Zack Middleton
39e2113c73 OpenGL2: Misc fixes and cleanup
Fix two constants in GLSL shaders. Remove f suffix from float and fix
int to float assignment. They were causing shader compile errors in
OpenGL ES 2 context.

Remove disabling clip plane. Clip plane is unused and never enabled in
the opengl2 renderer. Remove disabling it to avoid causing a GL error
when using OpenGL 3.2 core profile or OpenGL ES.

Make VAO cache vertex stride be size of srfVert_t since that is what
is uploaded to the GPU. No behavior change. There is a disabled debug
id in srfVert_t though which if enabled changes srfVert_t size.
2018-07-20 23:40:35 -05:00
Zack Middleton
14cc4cc6cb OpenGL2: Fix world VAO cache drawing when glIndex_t is unsigned short
OpenGL ES is only required to support unsigned short for element buffer
values.

R_DrawElements() firstIndex argument was glIndex_t which caused element
indexes to wrap around to 0 when glIndex_t is an unsigned short.
(glIndex_t is an index into the vertexes buffer, not element buffer.)
Change it to 'int' like tess.firstIndex which is passed to
R_DrawElements().

World VAO cache buffer size allowed storing more vertexes than unsigned
short glIndex_t could reference. This resulted in the vertex indexes in
the element buffer wrapping around to 0.
2018-07-20 23:40:31 -05:00
Zack Middleton
e8450cae33 OpenGL2: Use ri.Error instead of Com_Error in tr_vbo.c
Com_Error is a wrapper for ri.Error. Use it directly.
2017-11-05 20:58:57 -06:00
SmileTheory
c65d2c2657 Add vao cache for static surfaces.
Remove support for draw range elements, multi draw arrays, world vao creation, surface merging.
2017-04-28 02:13:25 -07:00
SmileTheory
0672905ef1 OpenGL2: Detect Intel graphics and avoid/use certain operations there.
Also use qglCopyTextureSubImage2DEXT instead of qglCopyTextureImage2DEXT.
2016-12-07 22:30:55 -08:00
SmileTheory
2349ef038e OpenGL2: Don't interleave texCoords and lightCoords in tess. 2016-11-25 01:17:46 -08:00
SmileTheory
41ae7815c9 OpenGL2: Remove half float support.
Not enough accuracy for textures larger than 1024x1024, such as merged lightmaps.
2016-10-20 20:09:12 -07:00
SmileTheory
aa79738c50 OpenGL2: Store vertex colors and hdr lightmaps/lightgrid as RGBA16. 2016-10-11 03:28:20 -07:00
SmileTheory
8749d62bbd OpenGL2: Remove per fragment tangent space calculation code. 2016-09-14 03:57:51 -07:00
SmileTheory
dfbaf50324 OpenGL2: Store normals/tangents as int16_t[4]. 2016-09-06 00:57:15 -07:00
SmileTheory
716438168f OpenGL2: Use loader for all extension funcs. 2016-07-26 00:41:31 -07:00
SmileTheory
251c983681 OpenGL2: Require OpenGL 2.0. 2016-07-24 21:29:13 -07:00
SmileTheory
943259f6b4 OpenGL2: Support half floats for texcoords and vertex colors. 2014-11-03 19:10:35 -08:00
SmileTheory
e488663e31 OpenGL2: Change normal/tangent vertex encoding. 2014-10-28 18:15:13 -07:00
SmileTheory
3765652778 OpenGL2: Fix corrupt models. 2014-10-23 16:51:10 -07:00
SmileTheory
0578b70f38 OpenGL2: Reduce redundant GL calls. 2014-10-14 06:15:06 -07:00
SmileTheory
84206c8598 OpenGL2: Vertex array object support. 2014-10-14 01:50:44 -07:00
SmileTheory
873a02bd3c OpenGL2: VBO cleanup. 2014-10-13 21:57:06 -07:00
SmileTheory
f6f3a19f73 OpenGL2: Support GL_ARB_vertex_type_2_10_10_10_rev for normals/tangents/lightdirs 2013-12-09 17:33:54 -08:00
SmileTheory
6e5f8cc918 OpenGL2: Calculate bitangent in shader, and store normal/tangent as normalized byte arrays. 2013-11-12 19:21:51 -08:00
SmileTheory
ae57eebf52 Merge branch 'glindex_size_fixes' of https://github.com/inolen/ioq3 into inolen-glindex_size_fixes 2013-11-08 22:19:32 -08:00
SmileTheory
ef9fe17dd5 OpenGL2: Remove srfTriangle_t, and use glIndex_t instead. 2013-11-08 01:46:17 -08:00
SmileTheory
08fcecc829 OpenGL2: Clean up texmod calculations, and improve vertex animation handling. 2013-10-14 01:55:54 -07:00
Anthony Pesch
b0f0376a4f Misc fixes to IBO code to correctly use sizeof(glIndex_t) 2013-07-19 14:16:49 -07:00
Tim Angus
d201443350 Remove a few name tags 2013-02-16 21:03:56 +00:00
Tim Angus
f6fb9eb602 renderer -> renderergl1, rend2 -> renderergl2 2013-02-15 23:46:37 +00:00
Renamed from code/rend2/tr_vbo.c (Browse further)