Removed glFlush. Added D3D adapter debug output.
This commit is contained in:
parent
1554788aa4
commit
33730efaa0
@ -153,6 +153,24 @@ namespace bgfx
|
||||
|
||||
BGFX_FATAL(m_d3d9, bgfx::Fatal::D3D9_UnableToCreateInterface, "Unable to create Direct3D.");
|
||||
|
||||
uint32_t adapterCount = m_d3d9->GetAdapterCount();
|
||||
for (uint32_t ii = 0; ii < adapterCount; ++ii)
|
||||
{
|
||||
D3DADAPTER_IDENTIFIER9 identifier;
|
||||
DX_CHECK(m_d3d9->GetAdapterIdentifier(ii, 0, &identifier) );
|
||||
|
||||
BX_TRACE("Adapter #%d", ii);
|
||||
BX_TRACE("\tDriver: %s", identifier.Driver);
|
||||
BX_TRACE("\tDescription: %s", identifier.Description);
|
||||
BX_TRACE("\tDeviceName: %s", identifier.DeviceName);
|
||||
BX_TRACE("\tVendorId: 0x%08x, DeviceId: 0x%08x, SubSysId: 0x%08x, Revision: 0x%08x"
|
||||
, identifier.VendorId
|
||||
, identifier.DeviceId
|
||||
, identifier.SubSysId
|
||||
, identifier.Revision
|
||||
);
|
||||
}
|
||||
|
||||
uint32_t behaviorFlags[] =
|
||||
{
|
||||
D3DCREATE_HARDWARE_VERTEXPROCESSING|D3DCREATE_PUREDEVICE,
|
||||
|
@ -10,17 +10,17 @@
|
||||
# include <bx/timer.h>
|
||||
# include <bx/uint32_t.h>
|
||||
|
||||
#if BX_PLATFORM_WINDOWS
|
||||
#if BGFX_CONFIG_RENDERER_OPENGL
|
||||
# define glClearDepthf(_depth) glClearDepth(_depth)
|
||||
#endif // BX_PLATFROM_WINDOWS
|
||||
#endif // BGFX_CONFIG_RENDERER_OPENGL
|
||||
|
||||
namespace bgfx
|
||||
{
|
||||
#if BX_PLATFORM_WINDOWS
|
||||
#define GL_IMPORT(_optional, _proto, _func) _proto _func
|
||||
#include "glimports.h"
|
||||
#undef GL_IMPORT
|
||||
#endif // BX_PLATFORM_WINDOWS
|
||||
#if BGFX_CONFIG_RENDERER_OPENGL
|
||||
# define GL_IMPORT(_optional, _proto, _func) _proto _func
|
||||
# include "glimports.h"
|
||||
# undef GL_IMPORT
|
||||
#endif // BGFX_CONFIG_RENDERER_OPENGL
|
||||
|
||||
typedef void (*PostSwapBuffersFn)(uint32_t _width, uint32_t _height);
|
||||
|
||||
@ -254,6 +254,13 @@ namespace bgfx
|
||||
|
||||
glXMakeCurrent(display, window, m_context);
|
||||
|
||||
# define GL_IMPORT(_optional, _proto, _func) \
|
||||
{ \
|
||||
_func = (_proto)glXGetProcAddress((const GLubyte*)#_func); \
|
||||
BGFX_FATAL(!_optional && NULL != _func, bgfx::Fatal::OPENGL_UnableToCreateContext, "Failed to create OpenGL context. glXGetProcAddress %s", #_func); \
|
||||
}
|
||||
# include "glimports.h"
|
||||
# undef GL_IMPORT
|
||||
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
glXSwapBuffers(display, window);
|
||||
@ -1573,8 +1580,6 @@ namespace bgfx
|
||||
|
||||
if (key.m_view != view)
|
||||
{
|
||||
GL_CHECK(glFlush() );
|
||||
|
||||
currentState.clear();
|
||||
changedFlags = BGFX_STATE_MASK;
|
||||
currentState.m_flags = newFlags;
|
||||
|
@ -7,7 +7,7 @@
|
||||
#define __RENDERER_GL_H__
|
||||
|
||||
#if BGFX_CONFIG_RENDERER_OPENGL
|
||||
# include <gl/GL.h>
|
||||
# include <GL/gl.h>
|
||||
# include <gl/glext.h>
|
||||
#elif BGFX_CONFIG_RENDERER_OPENGLES
|
||||
# include <GLES2/gl2.h>
|
||||
@ -65,11 +65,11 @@ namespace bgfx
|
||||
# define GL_CHECK(_call) _call
|
||||
#endif // BGFX_CONFIG_DEBUG
|
||||
|
||||
#if BX_PLATFORM_WINDOWS
|
||||
#define GL_IMPORT(_optional, _proto, _func) extern _proto _func
|
||||
#include "glimports.h"
|
||||
#undef GL_IMPORT
|
||||
#endif // BX_PLATFORM_WINDOWS
|
||||
#if BGFX_CONFIG_RENDERER_OPENGL
|
||||
# define GL_IMPORT(_optional, _proto, _func) extern _proto _func
|
||||
# include "glimports.h"
|
||||
# undef GL_IMPORT
|
||||
#endif // BGFX_CONFIG_RENDERER_OPENGL
|
||||
|
||||
class ConstantBuffer;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user