CasparKielwein
c72fa0917b
remove unused functions in render code.
...
Left those functions in 3dmath alone, as it is more of a library.
2018-12-29 16:45:47 +01:00
Fabian Woltermann
c2c8acbf13
REdo properly
2018-08-20 17:12:38 +02:00
Fabian Woltermann
ac58950ac5
Revert "vm_vec_random_cone needs to be called with the smaller angle first."
...
This reverts commit 5b01036723 .
2018-08-20 17:10:31 +02:00
Fabian Woltermann
5b01036723
vm_vec_random_cone needs to be called with the smaller angle first.
...
This also adds a check to that function to swap the values around should that not be the case
2018-08-10 17:26:42 +02:00
asarium
8c88b68327
Use OpenGL vertex array objects for better performance
...
The original OpenGL Core changes only used a single vertex array object
for specifying the data layout of our vertex data. This uses the OpenGL
extension GL_ARB_vertex_attrib_binding to extend that so that each
vertex_layout uses a separate vertex array object which should improve
performance by reducing the CPU overhead while switching the vertex
layout. Since we need to use offsets into the vertex buffers at some
points this can not be done with the core functions since those do not
support specifying an offset when binding a vertex buffer.
GL_ARB_vertex_attrib_binding does support that and also features an
improved API for specifying the vertex layout. If that extension is not
available then the rendering engine will fall back to the current code.
In CPU intensive scenes I observed a frametime improvement of 1-2 ms.
2017-11-21 12:02:10 +01:00
asarium
4c1ed2f66a
Move graphics matrix handling out of OpenGL code
...
All transformations are now handled by shaders so there is nothing
special going on in the graphics API specific code anymore. Since model
uniform buffers require access to these matrices I moved the matrix
handling out of the graphics API code.
2017-09-05 12:36:32 +02:00
asarium
f1bf0a411c
Use OpenGL texture arrays for animations
...
This converts all usages of bmpman textures to OpenGL texture arrays.
That means that all frames of an animation are stored in a single OpenGL
texture object and can be accessed at the same time in a single draw
call. This should significantly reduce the overhead of drawing lots of
particles since all particles of a single animation can be drawn with a
single draw call.
This fixes #1169 .
2017-08-25 11:31:02 +02:00
asarium
a02c2deb69
Render correct number of vertices for shield icon
...
I also added a few graphics debug scopes since I needed those for
tracking down which code renders the shield icons.
This fixes #1261 .
2017-02-25 12:59:51 +01:00
z64555
39912e025b
Use vm_vec_equal, like you intended.
2017-02-08 18:38:56 -06:00
asarium
b13c816ecb
Fix missing braces warnings
2016-12-14 11:31:35 +01:00
SamuelCho
b75a354505
Cleaned up more rendering code. Shrunk the vertex struct since we don't use spec_rgb anymore. Removed any declarations using the old geometry batcher. Streamlined desaturation in the model shader to use the main color uniform. Removed old unneeded interp_ code. Removed stored geometry shader parameters from the shader constants since we're no longer using the EXT version of geometry shaders.
2016-08-30 23:22:09 -07:00
asarium
46d5c81b57
Fix FRED2 waypoint rendering crash
2016-08-30 23:12:55 +02:00
SamuelCho
d20aa57508
Fixed jumpnode colors not matching HUD.
2016-08-29 01:02:40 -07:00
SamuelCho
ba826df963
Removed a bunch of unused rendering code.
2016-08-28 18:47:34 -07:00
SamuelCho
f693413e26
Removed orphaned GL_state code.
2016-08-28 14:24:10 -07:00
SamuelCho
c6243cbfd9
Mopped up some graphics related warnings.
2016-08-25 23:04:47 -07:00
SamuelCho
67916a4efb
Cleaned up various warnings from orphaned variables or added by the new rendering code.
2016-08-24 21:28:24 -07:00
SamuelCho
1adf52bb04
Make sure we scale sphere meshes before rendering them.
2016-08-23 20:38:14 -07:00
SamuelCho
a481999a24
OpenGL Core support. Introduction of material based draw system. Rewrote geometry batcher.
2016-08-17 00:13:19 -07:00
MageKing17
70529dbd5a
Deprecate -nohtl and -brief_lighting.
...
-nohtl hasn't worked for years, and -brief_lighting was always supposed to be a temporary flag before making the behavior always on.
2016-07-08 09:39:29 -07:00
Peter Mitsis
180674154c
trig: Use floating point versions of trig functions
...
Replaces calls to double-precision floating point trig functions with
calls to single-precision floating point trig functions as follows:
cos() -> cosf()
sin() -> sinf()
tan() -> tanf()
acos() -> acosf()
asin() -> asinf()
atan() -> atanf()
This allows the compiler to avoid generating unnecessary instructions
that convert a float to a double and then a double back to a float.
Signed-off-by: Peter Mitsis <[email protected] >
2016-04-24 21:56:06 -04:00
The E
e0defd287a
Renaming vm_vec_crossprod to vm_vec_cross
2015-12-01 20:36:34 +01:00
Goober5000
a7dcda9000
wip to avoid const_cast
2015-10-28 00:02:35 -04:00
Goober5000
75411d92bb
const-correctness inspired by 392, because why not be masochistic
2015-10-27 22:46:35 -04:00
Echelon9
c5493bb480
Scripted sort and uniq on (internal) project includes. Improves search time and as a by product removed a number of duplicative includes.
2015-06-22 20:24:30 +10:00
Swifty
c620372357
Soft shadows, deferred lighting, and various major graphics optimizations.
2015-05-02 14:35:37 -07:00
Echelon9
4033465143
Fix Coverity reports of Uninitialized scalar variable with the vertex struct. Should vertex ever be converted to a class from a struct, these memsets as well as the pre-existing ones will need to be removed in favour of a proper constructor of the then vertex class.
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@10732 387891d4-d844-0410-90c0-e4c51a9137d3
2014-06-02 18:29:59 +10:00
m_m
c1b2d7c1ee
Fix for Mantis 3045: gr.drawImage()'s UV arguments aren't working properly
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@10721 387891d4-d844-0410-90c0-e4c51a9137d3
2014-05-25 19:03:50 +10:00
The_E
6e91857745
From Yarn: Fixes interface graphics scaling issues. If, for some reason, you want to have the interface graphics stretched, use the -stretch_menu commandline flag.
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@10544 387891d4-d844-0410-90c0-e4c51a9137d3
2014-03-30 12:39:54 +10:00
niffiwan
5c3d105f85
Fix for mantis 2789: replace shield icons drawn with 100's of lines with 6-point polygons
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk@9584 387891d4-d844-0410-90c0-e4c51a9137d3
2013-03-18 20:26:07 +10:00
Echelon9
46d854d9f0
PVS-Studio fix: There is only one PI.
...
V624 The constant 3.14159 is being utilized. The resulting value could be inaccurate.
2012-07-16 11:44:22 +00:00
IssMneur
0717ad3d13
PVS-Studio fix: V512 A call of the 'memcpy' function will lead to overflow of the buffer '& x'. (pstypes.h:131)
2011-09-08 05:39:53 +00:00
Echelon9
dd99b7b035
Documentation: Code cleanup of 3ddraw.cpp
2011-09-07 14:22:03 +00:00
Swifty
f6ba2141b4
Shockwaves and death explosions will stay oriented independently of player's bank.
2011-08-07 09:55:18 +00:00
The_E
55427f1690
Patch for sprite orientation from Valathil
2011-08-04 16:25:19 +00:00
Swifty
5283c36d34
Let's try this again without breaking the orb radar: Optimized BSG radar and cockpit displays. Fixed cockpit models not switching when changing ships.
2011-08-04 11:01:28 +00:00
The_E
4a488dd7f0
Reverting 7411 due to it breaking the standard 3D radar.
2011-08-02 13:02:34 +00:00
Swifty
043d56b3f7
For Diaspora: Optimized BSG radar rendering and cockpit displays. Fixed cockpit models not switching when changing ships.
2011-08-02 10:49:51 +00:00
taylor
05f95e05ee
fix damage lightning (from Xt tree)
2010-02-06 01:02:24 +00:00
portej05
719825f80d
The big CVS comment removal. This chops approx. 3.5mb off a full checkout.
...
I've tested this through compiling and through hand checking.
Normalises line endings in ALL files to \n.
2009-06-20 08:08:20 +00:00
Wanderer
cabc75bfe5
merge from wanderer branch. 2d and 3d radar images support
2009-05-18 22:08:13 +00:00
Goober5000
6e4021888d
add apostrophes to contractions, lol
2009-04-10 07:49:12 +00:00
taylor
9231692e48
basic commit of a few Xt tree changes
...
- updated OpenGL code (basic shader support, etc.)
- new ships lab code
- scripting RTT fixes
- don't let FRED hog CPU time
2008-07-16 02:49:19 +00:00
taylor
88693b7388
fix various compiler warnings
2008-03-29 06:30:20 +00:00
taylor
29f8a54cd9
change gr_set_cull() so that it works better (mainly part of the RTT fix)
2008-03-20 20:18:49 +00:00
WMCoolmon
322f6e7d20
g3_draw_polygon, general purpose function that was really needed. Comes in matrix or normal direction variants.
2008-03-15 09:19:13 +00:00
taylor
05db047497
handle another null vec warning which can happen during a multiplayer respawn or certain death sequences (Mantis bug #1090 )
2006-10-06 10:04:03 +00:00
taylor
0107652287
maybe optimize the (PI/2), (PI*2) and (RAND_MAX/2) stuff a little bit
2006-08-19 04:38:47 +00:00
taylor
32440a7dbc
remove some of the old batcher functions, nothing is using them now anyway
...
minor cleanup
add orient UV flipping to HTL drawing functions, like retail/non-HTL has support for
2006-05-27 16:47:12 +00:00
Goober5000
7e41877b7b
proper capitalization according to Volition
2006-04-20 06:32:30 +00:00