Commit Graph

723 Commits

Author SHA1 Message Date
rdb 3657eb9bce glgsg: Support texture transforms in default shader 2021-02-06 19:36:50 +01:00
rdb c73c94c862 Merge branch 'release/1.10.x' 2021-02-06 01:23:34 +01:00
rdb a1e4cf059f glgsg: Fix attempt to detect glTexStorage1D in OpenGL ES 2021-02-03 12:53:20 +01:00
rdb ef4b1d5721 glgsg: Fix compile error with OpenGL ES 1 2021-01-18 00:19:39 +01:00
rdb 842452594d Merge branch 'release/1.10.x' 2021-01-17 17:28:19 +01:00
rdb b060767bd8 glgsg: slight refactor of get_internal_image_format() 2021-01-17 15:17:09 +01:00
rdb 1fda6e7d51 texture: Add missing integer texture formats 2021-01-17 15:17:03 +01:00
rdb 38d304f2fe glgsg: Force nearest filtering on isampler/usampler
Without this, Intel drivers will sample (0, 0, 0, 1)
2021-01-17 12:10:42 +01:00
rdb 92e2c24958 Experimental InstancedNode class for hardware instancing 2020-11-22 22:01:13 +01:00
rdb 8486d286b7 Merge branch 'release/1.10.x' 2020-11-22 15:19:51 +01:00
rdb b12fcec099 glgsg: Fix handling of sized rgba formats in OpenGL ES 2020-11-22 14:21:34 +01:00
rdb d62146a317 Merge branch 'release/1.10.x' 2020-11-17 23:56:00 +01:00
rdb 3a2048e44a glgsg: Fix skinning shader being unable to render unskinned models
Panda was adding a column with weights (0, 0, 0, 0), but these weights don't add up to 1 so no useful identity matrix can be produced.  Instead it's better to fall back to the OpenGL default, (0, 0, 0, 1).

I'm also defaulting the transform_index values to (0, 1, 2, 3) to support non-indexed skinning (although that's pretty esoteric, given that that only supports 4 transforms...)
2020-11-17 21:01:56 +01:00
Brian Lach 57c9fbd86e glgsg: fix identical states never short-circuiting set_state_and_transform
Closes #1012
2020-11-02 11:02:49 +01:00
rdb 66ac3be604 Merge branch 'release/1.10.x' into master 2020-09-12 23:23:58 +02:00
rdb d997be50ff glgsg: fix state tracking bug passing view parameters to shader
These parameters are already taken care of by set_state_and_transform().

Also comment out a few lines of code that would prevent the latter from being called for transform changes, but which never triggered anyway.
2020-09-09 18:06:42 +02:00
rdb 40842ef217 gles2gsg: fix sRGB texture support 2020-09-06 09:20:34 +02:00
rdb cca84131df gles2gsg: squelch warning about missing #version line in shader 2020-09-06 09:19:51 +02:00
rdb f47b92347c glgsg: Fix framebuffer_copy_to_ram for OpenGL ES using BGRA format
Supporting BGRA doesn't necessarily mean that it supports using BGRA in glReadPixels, for OpenGL ES.  We need to check a separate extension.
2020-05-19 21:57:15 +02:00
rdb 30d9f88f8e Merge branch 'release/1.10.x' 2020-04-01 18:53:00 +02:00
rdb cefc92a775 glgsg: fix wrong shadow buffer host when rendering scene to buffer
Fixes #890
2020-03-30 14:02:31 +02:00
rdb 515ce931b9 Merge branch 'release/1.10.x' 2020-03-08 10:37:05 +01:00
rdb 17776b0666 glgsg: fix shader not being applied if same across multiple buffers
See https://discourse.panda3d.org/t/multi-pass-rendering-setinitialstate-wont-apply-shader/25712
2020-03-08 10:31:03 +01:00
rdb edc31ce9ca glgsg: change ultimate profile from vp40/fp40 to glslv/glslv
vp40 is just not "ultimate" enough.  We can alternatively pick gp5vp/gp5fp if glslv/glslf is inadequate.
2020-01-31 11:12:28 +01:00
rdb b78b7be326 Merge branch 'release/1.10.x' 2019-12-30 01:50:54 +01:00
rdb fccffb4932 glgsg: fix texture extraction of MRTs in OpenGL ES
Fixes #815
2019-12-29 17:47:36 +01:00
rdb 3c3eee2295 glgsg: attempt to fix stereo FBOs in OpenGL ES 2 (#815) 2019-12-18 18:01:42 +01:00
rdb 406268c2e9 shader: use specific PStatCollector and group markers for shader compile
This makes it possible to determine which shader is taking which amount of time to compile.
2019-12-08 15:19:38 +01:00
rdb d088263f6f Merge branch 'release/1.10.x' 2019-11-11 03:28:39 +01:00
rdb 2d836697b0 glgsg: fix issue extracting texture data for multiview textures 2019-11-10 19:20:10 +01:00
rdb cb01d45eb6 glgsg: fix RTM_copy_ram for multiview textures 2019-11-10 19:09:31 +01:00
rdb 207263c1a8 display: handle resource releases in batches, not individually
This is intended to eventually replace the old interface, since GSGs may be able to do a batch of prepare/release operations more efficiently.
2019-10-05 21:13:32 +02:00
rdb 802a08b146 glgsg: fix unnecessary create-delete-create of new textures 2019-10-05 21:13:22 +02:00
rdb 8be70ed16d glgsg: auto convert to srgb(a) if sluminance not supported
This is particularly the case when requesting a core-only profile (gl-version 3 2) where luminance textures are deprecated.

There is apparently no way to emulate them with swizzles (as we do with luminance textures), so we'll have to duplicate the channels out.

Fixes #693
2019-08-12 21:04:48 +02:00
rdb 42dff65e4d general: fix various unprotected debug() outputs
These should be protected by an is_debug() check so that they can be optimized out properly in a release build.  Setting check-debug-notify-protect in Config.prc can be used to track down cases of missed checks.
2019-08-03 10:33:43 +02:00
rdb 53612512d5 glgsg: more reliable check for core/compat profile
Fixes #643
2019-05-03 15:43:20 +02:00
rdb 83374de0ff shader: don't use GENERIC profile to compile Cg shaders
Instead, make an educated guess of what the GSG we are going to be compiling this shader for wants to use as profile.
2018-12-31 14:01:26 +01:00
rdb 669a655366 Fix ShaderBuffer cleanup assertion with state cache disabled 2018-12-26 22:47:14 +01:00
rdb 840f28ef18 glgsg: fix framebuffer_copy_to_ram format for float framebuffers 2018-12-19 12:43:39 +01:00
rdb 3adc7d977e glgsg: fix compilation in double-precision mode 2018-12-04 16:16:05 +01:00
rdb 3c6b6e47ec glgsg: don't call glLineWidth with higher value than maximum
Officially, in core profile OpenGL 3.2+, calling it with a value higher than 1.0 is an error, but many vendors seem to let us.  Apple's implementation does not.  It appears that checking the maximum line width is a way to deal with this.

Fixes #466
2018-12-04 15:53:56 +01:00
rdb 97d4e32a06 general: use nassert_raise instead of nassertv(false) et al
Even a brief error message in the assertion is infinitely more useful to a user who is not at home in the source code, especially for assertions that may reasonably be triggered by honest user mistakes.
2018-11-28 17:35:20 +01:00
rdb 272f13023e glgsg: unbind buffers after draw callback
Some libraries (eg. Kivy) leave their buffers bound, so this takes care of that.
2018-11-25 16:46:38 +01:00
rdb 3f91615a22 glgsg: reset color write mask before calling draw callback 2018-11-23 00:23:52 +01:00
rdb 8ad0cb6b57 glgsg: add support for p3d_FragData fragment output
This is necessary for GLSL 1.30 which deprecates gl_FragData but does not yet support layout(location=) specifiers

Also fix some function pointer checks for pre-GL 3.0

Fixes #455
2018-11-22 23:55:54 +01:00
rdb ec4b0825e9 glgsg: restore more OpenGL state after draw callback 2018-11-20 12:41:43 +01:00
rdb 53cec96c07 Fix draw calls being listed under Primitive Setup in PStats, etc.
Previously, all draw calls would be grouped under "Primitive Setup", rather than under the appropriate bin collector.  This commit fixes that and adds a few other useful collectors as well.
2018-11-20 12:41:30 +01:00
rdb c18cdcf36e display: add support for debug markers, to help with debugging
This is useful when running Panda in a tool like apitrace, so that the different calls in a frame are ordered in a neat hierarchy.
2018-11-20 12:41:20 +01:00
rdb 8f73f95e79 display: make PStats clear collectors per-window 2018-11-19 20:02:38 +01:00
Sam Edwards a9dfd8352e general: Distinguish local/system includes
This changes includes so that local includes are consistently
#include "localFile.h"
while system and third-party includes are consistently
#include <systemFile.h>

This commit mostly converts the former to the latter; the two
exceptions are in android_main.cxx and fmodAudioSound.h, where
the reverse was necessary.
2018-11-10 18:00:10 -07:00