Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include "stdafx.h"

#include "config.h"

#include "Headers/GFXState.h"
#include "Headers/GFXDevice.h"

namespace Divide {

GPUState::GPUState()
{
}

GPUState::~GPUState()
{
}

void GPUState::registerDisplayMode(U8 displayIndex, const GPUVideoMode& mode) {
    if (displayIndex >= _supportedDisplayModes.size()) {
        _supportedDisplayModes.push_back(vectorImpl<GPUVideoMode>());
    }

    vectorImpl<GPUVideoMode>& displayModes = _supportedDisplayModes[displayIndex];

    // this is terribly slow, but should only be called a couple of times and
    // only on video hardware init
    for (GPUVideoMode& crtMode : displayModes) {
        if (crtMode._resolution == mode._resolution &&
            crtMode._bitDepth == mode._bitDepth) {
            U8 crtRefresh = mode._refreshRate.front();
            if (std::find_if(std::begin(crtMode._refreshRate),
                std::end(crtMode._refreshRate),
                [&crtRefresh](U8 refresh)
                -> bool { return refresh == crtRefresh; }) == std::end(crtMode._refreshRate)){
                crtMode._refreshRate.push_back(crtRefresh);
            }
            return;
        }
    }

    displayModes.push_back(mode);
}

};  // namespace Divide

Commits for Divide-Framework/trunk/Source Code/Platform/Video/GFXState.cpp

Diff revisions: vs.
Revision Author Commited Message
890 Diff Diff IonutCava picture IonutCava Sun 14 May, 2017 20:54:59 +0000

[Ionut]
- Add pre-compiled header support
- Initial code for per-stage tessellation computation

851 Diff Diff IonutCava picture IonutCava Mon 06 Feb, 2017 23:38:14 +0000

[IonutCava]
- Replaced most RenderStage params with RenderStagePass types
- More work on water rendering

714 Diff Diff IonutCava picture IonutCava Thu 26 May, 2016 16:26:23 +0000

[IonutCava]
- Initial code for multithreaded scene load:
— Tasks can have a “sync with gpu” flag that will cause them to use a shared context (so they can call GL functions)
- Added per scene GUI lists that get passed to the main GUI class (still need a base class to hold the map and accessors to avoid code duplication)
- Re-enabled threading unit tests

713 Diff Diff IonutCava picture IonutCava Wed 25 May, 2016 15:43:38 +0000

[IonutCava]
- Removed all unique_ptr’s from the code with classic new/delete pairs. They were seriously not needed.
- Added the concept of SceneComponent to scene specific classes: aiManager, lightPool, sceneGraph, physicsInterface etc
— This allowed the removal of the global GET_ACTIVE_SCENEGRAPH call;

712 Diff Diff IonutCava picture IonutCava Tue 24 May, 2016 16:18:37 +0000

[IonutCava]
- Added the concept of “buffer” to be used by GenericVertexData and ShaderBuffer without caring if it’s persistent or not.
— Persistent buffers handle their own locking instead of relying on the parent class
- HiZ occlusion culling fixes and optimizations

604 Diff Diff IonutCava picture IonutCava Sun 13 Dec, 2015 19:04:57 +0000

[IonutCava]
- New post processing system:
— Simplified operators
— PostFX is always enabled. Individual operators are toggles on or off
— Fixed Bloom and adaptive exposure
- Reworked texture creation and resizing
— Saved TextureDescriptor as part of the texture state

542 Diff Diff IonutCava picture IonutCava Thu 29 Oct, 2015 23:44:59 +0000

[IonutCava]
- Improved multi-threaded culling
- Increased nodeBuffer size to avoid different render stages to override each-other’s data and wait for locks
- Added a indirect command buffer per render stage

516 Diff Diff IonutCava picture IonutCava Tue 29 Sep, 2015 18:21:34 +0000

[IonutCava]
- Fixed VBO partitioning system
- Replaced some DELEGATE_BIND calls with lambda expressions
- Some multithreaded rendering work (still not functional)

515 Diff Diff IonutCava picture IonutCava Tue 29 Sep, 2015 15:51:13 +0000

[IonutCava]
- Fix a few bugs related to geometry loading and glVertexArray offsets
— Also, optimise DVDConverter a bit
- Add a conditional toggle for texture state flushing (thus allowing us to avoid generating mipmaps for shadowmaps before the blur step and again after it)
- Add an option in config.h to disable/enable multi-context resource loading
- Added SFINAE type checks to ResourceCache class

449 IonutCava picture IonutCava Tue 26 May, 2015 22:42:37 +0000

[Ionut]
- More work on windowing system