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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#include "Headers/glImmediateModeEmulation.h"
#include "Headers/glResources.h"

#include "core.h"
#include <glim.h>

NS_GLIM::GLIM_ENUM glimPrimitiveType[PrimitiveType_PLACEHOLDER];

glIMPrimitive::glIMPrimitive() : IMPrimitive()
{
    _imInterface = New NS_GLIM::GLIM_BATCH();
    _imInterface->SetVertexAttribLocation(Divide::VERTEX_POSITION_LOCATION);
    assert(_imInterface != nullptr);
    glimPrimitiveType[API_POINTS] = NS_GLIM::GLIM_POINTS;
    glimPrimitiveType[LINES] = NS_GLIM::GLIM_LINES;
    glimPrimitiveType[LINE_LOOP] = NS_GLIM::GLIM_LINE_LOOP;
    glimPrimitiveType[LINE_STRIP] = NS_GLIM::GLIM_LINE_STRIP;
    glimPrimitiveType[TRIANGLES] = NS_GLIM::GLIM_TRIANGLES;
    glimPrimitiveType[TRIANGLE_STRIP] = NS_GLIM::GLIM_TRIANGLE_STRIP;
    glimPrimitiveType[TRIANGLE_FAN] = NS_GLIM::GLIM_TRIANGLE_FAN;
    glimPrimitiveType[QUADS] = NS_GLIM::GLIM_QUADS;
    glimPrimitiveType[QUAD_STRIP] = NS_GLIM::GLIM_QUAD_STRIP;
    glimPrimitiveType[POLYGON] = NS_GLIM::GLIM_POLYGON;
}

glIMPrimitive::~glIMPrimitive()
{
    SAFE_DELETE(_imInterface);
}

void glIMPrimitive::beginBatch() {
    _imInterface->BeginBatch();
    _inUse = true;
    _zombieCounter = 0;
}

void glIMPrimitive::begin(PrimitiveType type){
    _imInterface->Begin(glimPrimitiveType[type]);
}

void glIMPrimitive::vertex(const vec3<F32>& vert){
    _imInterface->Vertex( vert.x, vert.y, vert.z );
}

void glIMPrimitive::attribute4ub(const std::string& attribName, const vec4<U8>& value){
    _imInterface->Attribute4ub(attribName.c_str(), value.x, value.y, value.z, value.w);
}

void glIMPrimitive::attribute4f(const std::string& attribName, const vec4<F32>& value){
    _imInterface->Attribute4f(attribName.c_str(), value.x, value.y, value.z, value.w);
}

void glIMPrimitive::end(){
    _imInterface->End();
}

void glIMPrimitive::endBatch() {
    _imInterface->EndBatch();
}

void glIMPrimitive::clear() {
    _imInterface->Clear();
}

void glIMPrimitive::renderBatch(bool wireframe) {
    _imInterface->RenderBatch(wireframe);
}

void glIMPrimitive::renderBatchInstanced(I32 count, bool wireframe) {
    _imInterface->RenderBatchInstanced(count, wireframe);
}

Commits for Divide-Framework/trunk/Source Code/Hardware/Video/OpenGL/glImmediateModeEmulation.cpp

Diff revisions: vs.
Revision Author Commited Message
249 Diff Diff k1ngp1n picture k1ngp1n Mon 31 Mar, 2014 20:42:31 +0000

[Ionut] [[BR]]
- Migrated to platform toolset v100 [[BR]]
- Updated boost to 1.55 [[BR]]
- Moved from “NULL” to “nullptr” [[BR]]
- DevIL is now linked dynamically [[BR]]

248 Diff Diff k1ngp1n picture k1ngp1n Mon 24 Feb, 2014 22:35:21 +0000

[Ionut][[BR]]
- Added a GenericVertexData class that can be used to fill VBOs with generic data and upload it to the GPU (and render it, either direct or instanced) [[BR]]
- Added a basic (soft) particle system [[BR]]
- Reworked memory allocation logging [[BR]]
- Improved transparency detection for textures on load [[BR]]

221 Diff Diff k1ngp1n picture k1ngp1n Wed 08 Jan, 2014 18:50:02 +0000

[Ionut] [[BR]]
- Merged branch “Shadows And Animations” back into trunk [[BR]]
- Added DoxygenGUI project file [[BR]]

  • Buggy *
171 Diff Diff k1ngp1n picture k1ngp1n Sun 03 Nov, 2013 18:15:06 +0000

-Replaced all tabs with spaces [[BR]]

170 Diff Diff k1ngp1n picture k1ngp1n Sun 03 Nov, 2013 17:24:57 +0000

-Moved hardware related code to a separate project [[BR]]
-More work on post-processing: [[BR]]
— HDR rendering is working, but final tonemapping needs more work [[BR]]
-Important changes in BloomPreRenderOperator.cpp, PostFX.cpp and glFrameBufferObject.cpp [[BR]]
-Trailing and leading whitespace cleanups [[BR]]

157 Diff Diff k1ngp1n picture k1ngp1n Sat 06 Jul, 2013 00:07:09 +0000

[Ionut] [[BR]]
- Added per-scene ini config file for NavMesh creation [[BR]]
- Improved some IMEmulation cleanup code and fixed a memory leak with NavMesh debug rendering [[BR]]
- NavMesh debug rendering can now be toggled on/off in the Editor [[BR]]

152 k1ngp1n picture k1ngp1n Thu 20 Jun, 2013 14:23:31 +0000

[Ionut] [[BR]]
- New rendering pipeline (experimental and unstable): [[BR]]
— OpenGL 3.x clean context (glLight commands are still used for now, but UBO support is there, but not used yet) [[BR]]
— Custom matrix stacks and UBO based shader data (UBOs cause some link errors on some nVidia cards)[[BR]]
— Multi-threaded texture loading and shader compilation (mt shader compilation disabled for now. needs more tests) [[BR]]
— VAO rendering is self contained (no more enable/disable calls before a draw request) [[BR]]
— Render instance class used for rendering information [[BR]]
[[BR]]
- New unique ID generation base class: GUIDWrapper. Each class that derives from this, gets an application wide unique id on construction [[BR]]
- Added base code for an in-game editor using CEGUI [[BR]]
- Replaced some mutex locks with lockless data structures or atomic data [[BR]]
- CEGUI 0.8.2, FTGL-GL3 and GLIM 0.4 modified to support GLEW_MX if defined [[BR]]
- Dropped VS2008 support [[BR]]
- Networking library, server framework and ReCast files are now projects inside the Divide Framework solution [[BR]]
- New console command “setFov” that modifies the horizontal FoV value in realtime [[BR]]
- New console command “recompileShader” that reparses shader files, recompiles shaders and relinks shader programs who’s names match or contain the argument string [[BR]]
- New debug utility: axis angle drawn in corner of the screen if needed [[BR]]
- More ‘const’-s pasted around the code, more loop performance tweaks (allocations before a loop, tighter loops, etc), more utility member functions added to various classes [[BR]]